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.
In package net-snmp-5.8-i586-1 library /usr/lib/perl5/vendor_perl/auto/NetSNMP/agent/agent.so is broken.
ldd /usr/lib/perl5/vendor_perl/auto/NetSNMP/agent/agent.so
linux-gate.so.1 (0xb7f7b000)
libnetsnmpmibs.so.30 => not found
libnetsnmpagent.so.30 => not found
libnetsnmp.so.30 => not found
libc.so.6 => /lib/libc.so.6 (0xb7d56000)
/lib/ld-linux.so.2 (0xb7f7d000)
# removepkg haskell-*
/sbin/removepkg: line 317: [: too many arguments
/sbin/removepkg: line 331: [: too many arguments
basename: extra operand '/var/lib/pkgtools/packages/haskell-aeson-1.4.1.0-x86_64-1_SBo'
Try 'basename --help' for more information.
No such package: . Can't remove.
With adding some quotes to lines 317 and 331 it will now remove a single haskell package.
Code:
--- removepkg.orig 2018-11-12 10:09:30.810016947 -0800
+++ removepkg 2018-11-12 10:17:51.059847322 -0800
@@ -314,7 +314,7 @@
# we don't enforce this policy. If there's more than one, only one will
# be removed. If you want to remove them all, you'll need to run
# removepkg again until it removes all the same-named packages.
- if [ ! -e $ADM_DIR/packages/$PKGNAME ]; then
+ if [ ! -e "$ADM_DIR/packages/$PKGNAME" ]; then
# Short name not found - finally try looking for full name - e.g. foo-1.0-arm-1
pushd $ADM_DIR/packages > /dev/null
# Don't set PKGNAME if there are no matches:
@@ -328,7 +328,7 @@
popd > /dev/null
fi
- if [ -r $ADM_DIR/packages/$PKGNAME ]; then
+ if [ -r "$ADM_DIR/packages/$PKGNAME" ]; then
if [ ! "$WARN" = true ]; then
echo "Removing package: $(basename $ADM_DIR/packages/$PKGNAME)"
fi
Given this comment from removepkg I suppose this is the correct behavior?
Code:
# If we don't have a package match here, then we will attempt to find
# a package using the long name format (name-version-arch-build) for
# which the base package name was given. On a properly-managed machine,
# there should only be one package installed with a given basename, but
# we don't enforce this policy. If there's more than one, only one will
# be removed. If you want to remove them all, you'll need to run
# removepkg again until it removes all the same-named packages.
# removepkg haskell-*
/sbin/removepkg: line 317: [: too many arguments
/sbin/removepkg: line 331: [: too many arguments
basename: extra operand '/var/lib/pkgtools/packages/haskell-aeson-1.4.1.0-x86_64-1_SBo'
Try 'basename --help' for more information.
No such package: . Can't remove.
Try changing to the /var/lib/pkgtools/packages directory first.
Try changing to the /var/lib/pkgtools/packages directory first.
Sorry, I didn't make it clear that I did that next where it of course worked. Regardless it was an unexpected failure and I thought it was worth mentioning.
The problem was that I was feeding it a literal "haskell-*" instead of all the haskell-* packages since I was in the wrong directory and the glob didn't match any files. My suggestion was just so that it would not fail in an unexpected manner, my usage was wrong regardless.
... represents a blank separated list of packages to remove.
OK, the man page didn't give those ... (note: I'm not using -current, so this is from the pkgtools-14.2-noarch-13 package) and it explicitly has in the description:
Code:
removepkg removes a previously installed Slackware package, while writing a progress
report to the standard output. A package may be specified either by the full package name
(as you'd see listed in /var/log/packages/), or by the base package name.
All about a single package name. I didn't check the code itself, but relied on that man page.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.