LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-19-2020, 06:58 AM   #31
maltux
LQ Newbie
 
Registered: Jul 2015
Location: Williamsville, NY
Distribution: Slackware64-current, Debian, Fedora
Posts: 26

Rep: Reputation: 12
same issue as well


Same issue as well.


Click image for larger version

Name:	Screenshot_2020-11-19_07-51-50.png
Views:	72
Size:	24.2 KB
ID:	34608
 
Old 11-19-2020, 09:58 AM   #32
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Maybe it'd be a good idea to post in this thread. Might get the right eyes on it and they could provide better guidance...
 
1 members found this post helpful.
Old 11-19-2020, 10:36 AM   #33
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

This issue is triggered each time there's at least one package in /var/log/packages that does not match the slackware package naming scheme, ie. name-version-arch-build :
Code:
# no version
my-package--x86_64-1

# no arch
my-package-1.2.3--2

# no build
my-package-1.2.3-x86-64-

Example (done on an old VM...) :
Code:
$ echo "" > /var/log/packages/my-package--x86_64-1
$ slackpkg -dialog=off -batch=on -default_answer=no clean-system
Looking for packages to remove. Please wait... DONE
[...]
cairo-clock-0.3.4-x86_64-1_SBo
lua-5.1.5-x86_64-1_SBo
lxdm-20170805_e3e7517-x86_64-1_SBo
mame-0.205-x86_64-1_SBo
mozjs52-52.9.0esr-x86_64-2
mozjs60-60.9.0esr-x86_64-1
murrine-0.98.2-x86_64-1_SBo
/var/log/packages
[...]
numlockx-1.2-x86_64-1_SBo
openldap-client-2.4.49-x86_64-1
p7zip-16.02-x86_64-2_SBo
pangox-compat-0.0.2-x86_64-1_SBo
pasystray-0.7.1-x86_64-1_SeB
...

The script below (code extracted, and slightly modified, from slackpkg core-functions.sh) allows to identify the packages with wrong name :
Code:
ROOT=""
TMPDIR="/tmp/slackpkg.debug"
WORKDIR=/var/lib/slackpkg
CONF="/etc/slackpkg"


[ ! -e "$TMPDIR" ] && mkdir -p $TMPDIR

# Creates files with mirror package names (spkg), local package
# names (lpkg) and packages unique to one or other file (dpkg)
#
function listpkgname() {
	cut -f2 -d\  ${TMPDIR}/pkglist | sort > ${TMPDIR}/spkg
	cut -f2 -d\  ${TMPDIR}/tmplist | sort > ${TMPDIR}/lpkg
	cat ${TMPDIR}/pkglist ${TMPDIR}/tmplist | \
		cut -f2-6 -d\ |sort | uniq -u | \
		cut -f1 -d\  | uniq > ${TMPDIR}/dpkg
}

function applyblacklist() {
	grep -vEw -f ${TMPDIR}/blacklist
}

# Function to make install/reinstall/upgrade lists
#
function makelist() {
	local i

	grep -vE "(^#|^[[:blank:]]*$)" ${CONF}/blacklist > ${TMPDIR}/blacklist

	ls -1 $ROOT/var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk | applyblacklist > ${TMPDIR}/tmplist
	cat ${ROOT}/${WORKDIR}/pkglist | applyblacklist > ${TMPDIR}/pkglist

	listpkgname
	for i in $(comm -2 -3 ${TMPDIR}/lpkg ${TMPDIR}/spkg) ; do
		PKGDATA=( $(grep -- "^local $i " ${TMPDIR}/tmplist) )
		[ ! "$PKGDATA" ] && continue
		if [ "${PKGDATA[5]}" = "/var/log/packages" ]  ; then
                  echo "found package that does not match slackware package naming scheme !!!"
                  echo "  PKGDATA=${PKGDATA[*]}"
                  echo ""
                fi
		LIST="$LIST ${PKGDATA[5]}" 
		unset PKGDATA
	done
	

	#echo -e $LIST | tr \  "\n" | uniq
}

makelist
Usage sample:
Code:
$ bash debug-slackpkg.sh
found package that does not match slackware package naming scheme !!!
  PKGDATA=local my-package x86_64 1 my-package--x86_64-1 /var/log/packages tgz
Hope this helps.

--
SeB
 
9 members found this post helpful.
Old 11-19-2020, 11:10 AM   #34
maltux
LQ Newbie
 
Registered: Jul 2015
Location: Williamsville, NY
Distribution: Slackware64-current, Debian, Fedora
Posts: 26

Rep: Reputation: 12
found the culprit:

I installed Google Chrome from SBO package and I am guessing this is when the problem started.

google-chrome-x86_64-1

not sure what the cure is. I deleted the file but still the same error.

I do appreciate the help.
 
Old 11-19-2020, 11:28 AM   #35
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
Quote:
Originally Posted by phenixia2003 View Post
Hello,

This issue is triggered each time there's at least one package in /var/log/packages that does not match the slackware package naming scheme, ie. name-version-arch-build :
[...]

--
SeB

This was it!!!

Your script found an entry for Google Chrome that didn't comply with Slackware package naming conventions. Now, out of curiosity: How did you find out??? I mean, that something like a stupid package name could cause an effect like this?

Fun fact: I didn't have Google Chrome installed, actually. Still, running
Code:
# removepkg google-chrome--x86_64-1
removed a ton of empty folders. I guess I had Chrome installed quite a while back in time, not using a SlackBuild script, but the Google installer.

Learning: Not following the Slackware path will earn you a slap in the face sooner or later, always.

Again, so many thanks for tracking this down and adapting and sharing the script! And thanks to all of you guys here for sharing your ideas and your efforts in tracking this down. I'll mark the thread as SOLVED.

gargamel
 
Old 11-19-2020, 11:54 AM   #36
maltux
LQ Newbie
 
Registered: Jul 2015
Location: Williamsville, NY
Distribution: Slackware64-current, Debian, Fedora
Posts: 26

Rep: Reputation: 12
thank you phenixia2003;

your script helped me find the bad file but I....

tried:

removepkg google-chrome--x86_64-1

it did uninstall google chrome but I am still getting the same error.

thanks for everyones help;

cheers,

....dazed and confused
 
Old 11-19-2020, 01:37 PM   #37
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by gargamel View Post
Now, out of curiosity: How did you find out??? I mean, that something like a stupid package name could cause an effect like this?
I guess that's because I'm used to slackpkg code and the file structure it uses, which is :
Code:
   #0         #1        #2       #3     #4      #5     #6      #7
<dirname> <basename> <version> <arch> <build> <name> <path> <extension>
If you look at makelist(), you'll see that package names are extracted from the column #5 (ie <name>) in file TMPDIR/pkglist :
Code:
LIST="$LIST ${PKGDATA[5]}"
In the case of local packages, the column #6 (<path>) is always "/var/log/packages", so, the statement "LIST=$LIST ${PKGDATA[5]}" can only returns the path instead of the name when one of the columns on left of #5 is missing.

--
SeB
 
5 members found this post helpful.
Old 11-19-2020, 03:15 PM   #38
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by maltux View Post
thank you phenixia2003;

your script helped me find the bad file but I....

tried:

removepkg google-chrome--x86_64-1

it did uninstall google chrome but I am still getting the same error.

thanks for everyones help;

cheers,

....dazed and confused
If you run it again, do you get another (or the same) package?
 
Old 11-19-2020, 03:33 PM   #39
maltux
LQ Newbie
 
Registered: Jul 2015
Location: Williamsville, NY
Distribution: Slackware64-current, Debian, Fedora
Posts: 26

Rep: Reputation: 12
Quote:
Originally Posted by bassmadrigal View Post
If you run it again, do you get another (or the same) package?
After I remove the package and I run your script there are no more packages but I still cannot clean my system without getting the /var/log/packages messages as I did originally. I also reboot, shutdown and reboot as well. I ran upgrade and update as well.

I am running the newest kernel as well
5.4.77 SMP

Last edited by maltux; 11-19-2020 at 03:37 PM.
 
Old 11-20-2020, 02:17 AM   #40
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by maltux View Post
After I remove the package and I run your script there are no more packages but I still cannot clean my system without getting the /var/log/packages messages as I did originally. I also reboot, shutdown and reboot as well. I ran upgrade and update as well.

I am running the newest kernel as well
5.4.77 SMP
Can you run the command below and attach the generated file :

Code:
ls -1 /var/log/packages/ > /tmp/package-list.txt
--
SeB
 
5 members found this post helpful.
Old 11-20-2020, 07:31 AM   #41
maltux
LQ Newbie
 
Registered: Jul 2015
Location: Williamsville, NY
Distribution: Slackware64-current, Debian, Fedora
Posts: 26

Rep: Reputation: 12
Thumbs up

Quote:
Originally Posted by phenixia2003 View Post
Hello,



Can you run the command below and attach the generated file :

Code:
ls -1 /var/log/packages/ > /tmp/package-list.txt
--
SeB
I appreciate your help. Here is the file:
Attached Files
File Type: txt package-list.txt (91.6 KB, 30 views)
 
Old 11-20-2020, 09:24 AM   #42
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by maltux View Post
I appreciate your help. Here is the file:
slackpkg continues to show you '/var/log/package' because of the following file.

Code:
-rw-r--r-- 1 root root       1 Nov 19 11:46 my-package--x86_64-1
Once you removed this file, verify that /var/log/packages is no longer listed when you run 'slackpkg clean-system'.

If you continue to have trouble, run the following command and post the generated file :
Code:
ls -1 /var/log/packages/* | awk -f /usr/libexec/slackpkg/pkglist.awk > /tmp/pkglist.txt
Hope this helps.

--
SeB

Last edited by phenixia2003; 11-20-2020 at 09:26 AM.
 
4 members found this post helpful.
Old 11-20-2020, 09:31 AM   #43
maltux
LQ Newbie
 
Registered: Jul 2015
Location: Williamsville, NY
Distribution: Slackware64-current, Debian, Fedora
Posts: 26

Rep: Reputation: 12
Talking

Quote:
Originally Posted by phenixia2003 View Post
Hello,



slackpkg continues to show you '/var/log/package' because of the following file.

Code:
-rw-r--r-- 1 root root       1 Nov 19 11:46 my-package--x86_64-1
Once you removed this file, verify that /var/log/packages is no longer listed when you run 'slackpkg clean-system'.


Hope this helps.

--
SeB
I can't believe I left that package in. The later the day gets the more dumb I get.

Everything now works as it should

Thank you very much!
 
Old 11-20-2020, 09:40 AM   #44
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Original Poster
Rep: Reputation: 242Reputation: 242Reputation: 242
I was actually considering to set this thread to "UNRESOLVED" again --- glad that I don't have to, and many thanks again, @phenixia2003!

gargamel
 
1 members found this post helpful.
Old 11-20-2020, 12:52 PM   #45
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

I wrote a patch (pkglist-fix-missing-fields.patch.txt) to fix this issue:

Code:
--- pkglist.awk.orig	2018-04-04 05:26:15.000000000 +0200
+++ pkglist.awk	2020-11-20 19:57:07.278034198 +0100
@@ -23,13 +23,20 @@
 			VERSION=$(NF-2)
 			NF=NF-3
 			NAME=$0
+
+			PKGNAME=NAME"-"VERSION"-"ARCH"-"RELEASE
+			if (VERSION == "") { VERSION="UNKNOWN" ; }
+			if (ARCH == "") { ARCH= "UNKNOWN" ; }
+			if (RELEASE == "") { RELEASE= "UNKNOWN" ; }
 		} else {
 			RELEASE=none
 			ARCH=none
 			VERSION=none
 			EXTENSION=tgz
 			NAME=$0
+
+			PKGNAME=NAME"-"VERSION"-"ARCH"-"RELEASE
 		}
 		FS=fs 
-		print DIR" "NAME" "VERSION" "ARCH" "RELEASE" "NAME"-"VERSION"-"ARCH"-"RELEASE" "PATH" "EXTENSION
+		print DIR" "NAME" "VERSION" "ARCH" "RELEASE" "PKGNAME" "PATH" "EXTENSION
 }
To apply it :
Code:
$ su
$ cd /usr/libexec/slackpkg
$ patch -p0 < /path/to/pkglist-fix-missing-fields.patch.txt
Hope this helps.

--
SeB
 
7 members found this post helpful.
  


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] iptables troubleshooting icmp and best place to log /var/log/messages or /var/log/iptables JockVSJock Linux - Security 18 02-12-2016 12:31 AM
slackpkg search problem - not using /var/log/packages? plunder Slackware 2 09-21-2010 05:15 PM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 04:13 PM
/var/log/packages and /var/log/setup sunny_5252 Slackware 4 05-17-2007 08:17 PM
me wants cluster me wants cluster me wants cluster funkymunky Linux - Networking 3 01-06-2004 07:51 AM

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

All times are GMT -5. The time now is 03:41 PM.

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