LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-28-2004, 03:02 PM   #1
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Question Upgrading packages using checkinstall


I've started to get the hang of installing and using programs, but I'm still a little confused on the upgrading process. If I install a program from source using checkinstall to make a slack package, how do I later upgrade the program to a newer version. Do I removepkg the old package and download and install the new one (and, if this is the case, does this always retain my configurations and settings)? Are there cases when I just repeat the same process, installing the new version "over" the old one? How does upgrading work in Linux? Thanks in advance!
 
Old 06-28-2004, 03:23 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
checkinstall doesn't support that by default, but it's
just a shell-script. You can easily enough add that as
an option, I'd think ... as a matter of fact, I might try
that when I come home :) Good idea!



Cheers,
Tink
 
Old 06-28-2004, 03:53 PM   #3
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
I'm glad I helped but... I still don't understand. What shell script are you talking about? Maybe I should start out at a more basic step: What is the process for upgrading programs when you're not using packages but just doing it from source? Should you uninstall the previous version (using whatever means) and install the new version, just install the new version on top of the old one, or use some other method? If the uninstall/reinstall method is right, does that always retain your configurations/settings?

Thanks again.
 
Old 06-28-2004, 04:20 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Sorry, I wasn't quite clear in my response...


checkinstall doesn't have a feature to do
upgradepkg...
It will just install a newer version along the old
one, and if you use removepkg to uninstall the
old one you're bound to get warning messages
about files being found in another package
(which is what an upgradepkg would have
avoided).

Now, checkinstall itself is a shell-script. Try a
less `which checkinstall`
and you'll see what I mean. It shouldn't be to
difficult to add a switch that will allow you to
run upgradepkg rather than installpkg.

Both upgradepkg and installpkg should preserve
conifguration files, and add one with the
extension .new to the target directory (very
helpful if, for instance, there's a change like
the one in rc.inet1 in the version jump from
Slack 8.1 to 9).


Cheers,
Tink
 
Old 06-28-2004, 04:41 PM   #5
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Ok, now I see what you're saying. Well, I'm sure there's a way to do it other than modifying checkinstall itself since people have been running programs on slack for a long time . How do most people who use checkinstall and slack successfully upgrade programs to a newer version... let's phrase it that way.
 
Old 06-28-2004, 07:46 PM   #6
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Also, what is wrong with using removepkg? I did that with gaim to upgrade from 0.78 to 0.79 without any problems, and I recently used swaret to upgrade just the packages from the official 9.1 source to make sure I was covered security-wise and I see that that tool just removes then installs packages rather than using upgradepkg. What is wrong with this method (removing old, installing new)?
 
Old 06-28-2004, 07:48 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Nothing wrong with it - upgradepkg would just
save you one step.



Cheers,
Tink
 
Old 06-28-2004, 08:09 PM   #8
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
So using upgradepkg to make an upgrade and installpkg new;removepkg old will both accomplish the exact same thing? I thought upgradepkg did something else that the other two tools can't do alone.

If they do both do the same thing, then is the best way to upgrade to download the new version source, checkinstall -S that, then removepkg the old version?
 
Old 06-28-2004, 08:12 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
I thought upgradepkg did something else that the other two tools can't do alone.
I think you have gotten that bit wrong ...


Code:
UPGRADEPKG(8)                                       UPGRADEPKG(8)

NAME
       upgradepkg - upgrade Slackware packages.

SYNOPSIS
       upgradepkg [ --dry-run ] [ --install-new ] [ --reinstall ]
       [ --verbose ] newpackagename [newpackagename2]

       upgradepkg [ --dry-run ] [ --install-new ] [ --reinstall ]
       [ --verbose ] oldpackagename%newpackagename [old2%new2]

DESCRIPTION
       upgradepkg upgrades a Slackware .tgz package from an older
       version to a newer one.  It does this  by  INSTALLING  the
       new  package  onto the system, and then REMOVING any files
       from the old package that aren't in the new  package.   If
       the  old  and  new  packages  have the same name, a single
       argument is all that is required.  If  the  packages  have
       different  names,  supply the name of the old package fol-
       lowed by a percent symbol (%), then the name  of  the  new
       package.  Do not add any extra whitespace between pairs of
       old/new package names.

Cheers,
Tink
 
Old 06-28-2004, 08:20 PM   #10
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
Ok, but does the order in which you do those two steps matter? If you removepkg old;installpkg new, it seems like that accomplishes the same as upgradepkg. However, if you checkinstall -S new;removepkg old, it isn't intelligent enough to "[remove] any files from the old package that aren't in the new package," is it? I guess removepkg old;checkinstall -S new seems like the best way to handle this though. Thanks for your help!
 
Old 06-28-2004, 08:26 PM   #11
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Original Poster
Rep: Reputation: 30
It's always important to read the man pages .

Code:
When deleting files, removepkg will analyze  the  contents
of  the  other packages installed on your system, and will
only delete the files that are unique to the package being
removed.   Similarly, the installation scripts for all the
other packages will be considered when deciding whether or
not to delete symbolic links from the package.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkinstall backup packages jrdioko Linux - Software 12 07-26-2005 08:26 PM
Checkinstall Package Upgrading? Kenji Miyamoto Slackware 2 05-23-2005 10:53 PM
upgrading packages paulr1984 Linux - Software 6 03-23-2005 03:42 PM
Upgrading packages linuxhippy Slackware 2 03-21-2005 06:18 PM
Checkinstall faults after upgrading to "current" Waldi Slackware 0 01-16-2004 02:55 AM


All times are GMT -5. The time now is 01:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration