[SOLVED] slackpkg upgrade-all and two version of multiple packages
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
At the moment, I have just finished getting slackpkg+ set up. But even before I finished getting that configured, I was running into a problem when I used
Code:
slackpkg upgrade-all
The output is a huge list of packages. Nearly every package is listed with two versions. For example,
I can't page back through the list of all the packages, so I don't know what is at the start of the list, like warnings or error messages. At the end of the list, there is
Code:
You can (B)lacklist, (R)emove, or (I)gnore these packages.
I don't know what led to this. I installed -current only like a month ago and probably ran
after that, don't know anything else about package management on Slackware, so I probably wouldn't have tried anything else. I don't know if or how running the slackpkg steps would have led to two versions of each package.
How do I get the packages pared back to one version of each? Will this solve the problem, or is there something less obvious and more ominous (besides being a newb) I am missing?
That is strange, it seems that there are Slackware 14.2 packages installed in your -current installation. How did you installed -current? I think you installed -current on top of existing 14.2 installation without deleting 14.2 installation first. Maybe you skipped the "format the partition" step when installing -current?
Last edited by mumahendras3; 08-09-2019 at 10:42 PM.
I used an ISO and made a clean install with it. I wonder if I didn't have the right repository in the configuration for slackpkg. Would that cause this problem to occur?
I used an ISO and made a clean install with it. I wonder if I didn't have the right repository in the configuration for slackpkg. Would that cause this problem to occur?
It's listing both 14.2 and -current packages, maybe you have more than one mirror uncommented?
I would first of all do things my elimination. Disable slackpkg+, run slackpkg-update and then look at the standard mirror list and then upgrade-all and see the output. Then go through slackpkg+.
Last edited by Lysander666; 08-10-2019 at 06:30 AM.
At my -current installation, slackpkg will complain if there are more than one mirrors uncommented. Did the same error happened if you run "slackpkg update" ? (You can redirect slackpkg output to a file so that you can check what the error is)
Slackpkg clean-system removes obsolete packages [i.e. removed from the official tree in stable or current], it will also remove unofficial packages. So if the packages are official and still in use in 14.2/current, they'll stay there.
I turned slackpkg+ off, by going to slackpkgplus.conf and changing the param to "off". I ran
Quote:
slackpkg update gpg
slackpkg update
because I wasn't sure how to finish "turning off" slackpkg+. I figured I needed some way to get the system to read the configuration file and realize that I didn't want slackpkg+ running.
Then I checked the mirror in /etc/slackpkg/mirrors and only one -current mirror is selected.
I used
Quote:
slackpkg upgrade-all
and I still get the duplicate packages. Maybe I didn't disable slackpkg+ correctly? Is there a different step after changing the config setting to "off" that I need to take?
Last edited by deretsigernu; 08-10-2019 at 11:48 AM.
Reason: hit save too soon
Lysander666,
'slackpkg clean-system' can help only if right versions were installed after wrong versions -- after 'slackpkg clean-system' right files stay on disk.
For ex. package pkg with versions 1 and 2 has file /usr/bin/somefile.
1) installpkg pkg-1-*t?z
after this /usr/bin/somefile is in version 1, /var/log/packages/ has only pkg-1
2) installpkg pkg-2-*t?z
after this /usr/bin/somefile is in version 2, /var/log/packages/ has pkg-1 and pkg-2
3) slackpkg clean-system calls removepkg to remove selected packages.
case 1: removepkg pkg-1
all ok -- /usr/bin/somefile is in version 2, /var/log/packages/ has only pkg-2
case 2: removepkg pkg-2
Ups! -- /usr/bin/somefile is in version 2, but /var/log/packages/ has only pkg-1
I saw an earlier comment that mentioned "clean-system". Thought it sounded a good idea.
I ran
Quote:
slackpkg clean-system
and there was a long list of packages to remove.
And I said yes.
And as many of you probably knew would happen, I created a digital black hole in my computer... when I rebooted, there was no image or anything linux-wise to boot.
So, I just finished a fresh install of slackware-current. I have not run slackpkg yet. I did set up one -current mirror for slackpkg. I also ran
Quote:
slackpkg update gpg
slackpkg update
but not
Quote:
slackpkg upgrade-all
or any other slackpkg commands. I want to install slackpkg+ to access to other respositories, but will hold off on that while I make sure I avoid the missteps that led to the problem that started this thread: apparently installing packages for 14.2 and -current.
and I get the list of duplicate packages all over again. I made a fresh install of -current yesterday with the ISO I have on a USB drive. I did not run any other slackpkg scripts or other package management apps except for what I did in the previous post. I only have a -current mirror active in /etc/slackpkg/mirrors. The ISO I used came from the main slackware mirror for 64-current and I checked the MD5 hash at the time.
Well, you can try to remove the duplicates in pkgtools packages database in /var/lib/pkgtools/packages (everything inside this directory are just text files). For instance, you can go to /var/lib/pkgtools/packages and search for zsh-5.2-x86_64-1 and zsh-5.7.1-x86_64-1, then move the newer version (zsh-5.7.1-x86_64-1) out of that directory. That way, when you run
Code:
slackpkg upgrade-all
it should not complain about the duplicate anymore and it will try to upgrade that package to the newest version. That way you could be sure than you are going to use the newest version of said package.
If that doesn't work, you can always move back the duplicate.
Last edited by mumahendras3; 08-12-2019 at 09:55 AM.
Reason: Some grammar and addition
I'd recommend downloading manually all the ones with duplicates; and running upgradepkg --reinstall $DUPLICATE_PROGRAM. If memory serves me right, this will remove both the current program, and the duplicate, and reinstall them with just the one.
@kronosschoty, there about 1200 packages that are duplicated. I literally don't know what I would put into a bash script to automate what you've suggested. For example, what code would I use to select the newest version of a duplicated package? I assume that I should only download the newer version of each of the duplicates? For example, using the short list I have at start of this thread:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.