LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Upgrading packages using checkinstall (https://www.linuxquestions.org/questions/linux-newbie-8/upgrading-packages-using-checkinstall-198777/)

jrdioko 06-28-2004 03:02 PM

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!

Tinkster 06-28-2004 03:23 PM

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

jrdioko 06-28-2004 03:53 PM

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.

Tinkster 06-28-2004 04:20 PM

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

jrdioko 06-28-2004 04:41 PM

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.

jrdioko 06-28-2004 07:46 PM

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)?

Tinkster 06-28-2004 07:48 PM

Nothing wrong with it - upgradepkg would just
save you one step.



Cheers,
Tink

jrdioko 06-28-2004 08:09 PM

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?

Tinkster 06-28-2004 08:12 PM

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

jrdioko 06-28-2004 08:20 PM

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!

jrdioko 06-28-2004 08:26 PM

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.



All times are GMT -5. The time now is 09:25 PM.