Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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!
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?
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).
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.
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)?
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?
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.
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!
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.