LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-28-2018, 11:32 AM   #1
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Rep: Reputation: 114Reputation: 114
Exclamation Current64: removepkg fails to find an installed package


Current64: Today after doing an "upgradepkg --reinstall --install-new" I noticed both the old and the new package to be listed in /var/log/packages.
So I restored my backup and tried again: same problem.
So I restored my backup once more and tried a "removepkg: package not found ...
Code:
root@riposo:~/works/pmagic# ROOT=$(readlink -f squashfs-root/)
root@riposo:~/works/pmagic# echo $ROOT
/root/works/pmagic/squashfs-root
root@riposo:~/works/pmagic# ls $ROOT/var/log/packages/spl*
/root/works/pmagic/squashfs-root/var/log/packages/spl-solaris-0.7.5_4.14.11-pmagic-i586-1_pmagic
root@riposo:~/works/pmagic# ROOT=$ROOT sh -x /sbin/removepkg spl-solaris |& tee log.log
+ shopt -s extglob
+ export LC_ALL=C
+ LC_ALL=C
+ TMP=/root/works/pmagic/squashfs-root/var/log/setup/tmp
+ '[' '!' -d /root/works/pmagic/squashfs-root/var/log/setup/tmp ']'
+ ADM_DIR=/root/works/pmagic/squashfs-root/var/log
+ PRES_DIR=/root/works/pmagic/squashfs-root/var/log/setup/tmp/preserved_packages
+ '[' 1 = 0 ']'
+ :
+ case "$1" in
+ break
+ '[' '' = true ']'
+ '[' '' = true ']'
+ remove_packages spl-solaris
+ for PKGLIST in $*
++ pkgbase spl-solaris
++ echo spl-solaris
++ sed 's?.*/??;s/\.t[bglx]z$//'
+ PKGNAME=spl-solaris
+ echo

+ '[' '!' -e /root/works/pmagic/squashfs-root/var/log/packages/spl-solaris ']'
+ pushd /root/works/pmagic/squashfs-root/var/log/packages
++ wc -l
++ ls -1 'spl-solaris-+([^-])-+([^-])-+([^-])'
+ '[' '!' 0 = 0 ']'
+ popd
+ '[' -r /root/works/pmagic/squashfs-root/var/log/packages/spl-solaris ']'
+ echo 'No such package: /root/works/pmagic/squashfs-root/var/log/packages/spl-solaris. Can'\''t remove.'
No such package: /root/works/pmagic/squashfs-root/var/log/packages/spl-solaris. Can't remove.
root@riposo:~/works/pmagic#
It looks like the Sep 14/15 2016 (!) changes to removepkg do not work as expected (in all cases?):
Code:
# Thu Sep 15 17:46:28 UTC 2016 <volkerdi>
# If removepkg is called with a short package name (no -$VERSION-$ARCH-$BUILD),
# remove the most recently installed matching package, not the oldest one.
#
# Thu Sep 15 08:09:01 BST 2016 <mozes>
# - Handle finding >1 match for a package.  Thanks to SeB on LQ for the feedback.
#
# Wed Sep 14 20:44:00 BST 2016 <mozes>
# - Modify package_name function to cater for package file names that contain
#   >=4 hyphens.
#   Thanks to coralfang on LQ for the report and to Jim Hawkins for the patch.
# - Modified to handle packages that contain file names with backslashes
#   Thanks to aaazen on LQ for the report and the patch.

Last edited by burdi01; 02-28-2018 at 11:40 AM.
 
Old 02-28-2018, 11:53 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
when that happens to me I get the entire name of it all the way down to tzx or tgz then run that with removepkg and it removes it.
have you tired doing something like this
Code:
$ ls /var/log/packages | grep pavucontrol
pavucontrol-3.0-x86_64-1

removepkg pavucontrol-3.0-x86_64-1
it does not really take a lot of energy.

Last edited by BW-userx; 02-28-2018 at 11:56 AM.
 
Old 02-28-2018, 12:32 PM   #3
Markus Wiesner
Member
 
Registered: Mar 2016
Distribution: Slackware
Posts: 146

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by burdi01 View Post
Code:
root@riposo:~/works/pmagic# ls $ROOT/var/log/packages/spl*
/root/works/pmagic/squashfs-root/var/log/packages/spl-solaris-0.7.5_4.14.11-pmagic-i586-1_pmagic
root@riposo:~/works/pmagic# ROOT=$ROOT sh -x /sbin/removepkg spl-solaris |& tee log.log
Your package name is malformed. The name is not "spl-solaris" but "spl-solaris-0.7.5_4.14.11" (with VERSION="pmagic", ARCH="i586" and BUILD="1_pmagic").
 
2 members found this post helpful.
Old 02-28-2018, 02:02 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
I agree with Markus.
Code:
didier[~]$ filename=spl-solaris-0.7.5_4.14.11-pmagic-i586-1_pmagic
pkgname=$(echo $filename|sed 's/-[^-]*-[^-]*-[^-]*$//')
didier[~]$ echo $pkgname 
spl-solaris-0.7.5_4.14.11
didier[~]$
A well formed filename for a Slackware package is:
<package name>-<version>-<arch>-<build> where only <package name> can include hyphens.

The previous version of removepkg was just more lenient, not better.

Also, it doesn't matter that the filename include an extension or not.

Last edited by Didier Spaier; 02-28-2018 at 04:34 PM.
 
Old 02-28-2018, 03:46 PM   #5
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
Thank you guys!
Why on earth I did not notice the malformed filename, even after looking at things for literally hours, will forever be a mystery ...
Closing this thread as a user error ..,
 
Old 02-28-2018, 04:17 PM   #6
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
During January 2018 there was a bug in the SBo SlackBuilds for spl-solaris and zfs-on-linux that created malformed package names if the Linux kernel had an extraversion (e.g. -smp on 32 bit, or -pmagic as above). Sorry about that. It was fixed at the end of January, but of course, that doesn't help with existing packages. burdi01, it's worth checking your zfs-on-linux package for the same problem.
 
1 members found this post helpful.
Old 02-28-2018, 04:56 PM   #7
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware Current64, PartedMagic, Xubuntu
Posts: 465

Original Poster
Rep: Reputation: 114Reputation: 114
@55020: Thks for the info. I already fixed both the spl-solaris and zfs-on-linux packages.
 
  


Reply



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
[SOLVED] How to make package when removepkg also remove symlinks ? gildbg Slackware 2 11-13-2017 01:52 AM
[SOLVED] current: removepkg fails to remove all files from kbd-1.15.3 package aaazen Slackware 14 09-16-2016 01:15 PM
[SOLVED] why removepkg cannot find software I have installed? hgdcjq Slackware 5 09-06-2012 10:04 PM
Can't find or use installed package via Synaptic Package Manager. SH1938 Linux - Software 1 09-02-2012 05:13 PM
Package for 'installpkg,removepkg,makepkg," bongski55 Slackware 4 09-15-2003 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:45 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
Open Source Consulting | Domain Registration