LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-23-2022, 10:04 AM   #1
BenCollver
Rogue Class
 
Registered: Sep 2006
Location: OR, USA
Distribution: Slackware64-15.0
Posts: 376
Blog Entries: 2

Rep: Reputation: 172Reputation: 172
slackpkg upgrade-all error: comm: input is not in sorted order


This morning i ran "slackpkg update" and then "slackpkg upgrade-all" and it gave me the error message below [1]. My /etc/slackpkg/mirrors file is configured to use https://mirrors.osuosl.org/pub/slack...ckware64-15.0/

Is this a known issue?

[1]

Code:
# slackpkg upgrade-all

Checking local integrity... DONE
Looking for packages to upgrade. Please wait... comm: file 2 is not in sorted order
comm: input is not in sorted order
DONE

No packages match the pattern for upgrade. Try:

        /usr/sbin/slackpkg install|reinstall
 
Old 12-23-2022, 07:16 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
It seems like slackpkg had a problem creating packages list file
As a test, maybe try (as root)
Code:
cd /var/lib
mv slackpkg slackpkg.old
mkdir slackpkg
slackpkg update
slackpkg upgrade-all
edit, maybe verify before if it's not a locale collation issue (no likely but just in case)
Code:
LC_COLLATE=C slackpkg upgrade-all

Last edited by keefaz; 12-23-2022 at 07:29 PM.
 
Old 12-23-2022, 10:16 PM   #3
BenCollver
Rogue Class
 
Registered: Sep 2006
Location: OR, USA
Distribution: Slackware64-15.0
Posts: 376

Original Poster
Blog Entries: 2

Rep: Reputation: 172Reputation: 172
Neither suggestion resolved my error message. This is on Slackware64 15.0.

The following change happens to silence the error:

Code:
--- /usr/libexec/slackpkg/core-functions.sh.orig        2022-01-16 00:52:09.000000000 -0800
+++ /usr/libexec/slackpkg/core-functions.sh     2022-12-23 20:08:34.352935796 -0800
@@ -621,7 +621,7 @@
        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
+               cut -f1 -d\  | uniq | sort > ${TMPDIR}/dpkg
 }
 
 # Create a blacklist of single package names from regexps in original blacklist
Before this change, ${TMPDIR}/dpkg has libxml++ after libxml2.

After this change, ${TMPDIR}/dpkg has libxml++ before libxml2.

I suppose this error has been thrown ever since i installed SBo libxml++ and i just didn't notice it until now.
 
Old 12-24-2022, 02:49 AM   #4
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,976

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by BenCollver View Post
Neither suggestion resolved my error message. This is on Slackware64 15.0.

The following change happens to silence the error:

Code:
--- /usr/libexec/slackpkg/core-functions.sh.orig        2022-01-16 00:52:09.000000000 -0800
+++ /usr/libexec/slackpkg/core-functions.sh     2022-12-23 20:08:34.352935796 -0800
@@ -621,7 +621,7 @@
        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
+               cut -f1 -d\  | uniq | sort > ${TMPDIR}/dpkg
 }
 
 # Create a blacklist of single package names from regexps in original blacklist
Before this change, ${TMPDIR}/dpkg has libxml++ after libxml2.

After this change, ${TMPDIR}/dpkg has libxml++ before libxml2.

I suppose this error has been thrown ever since i installed SBo libxml++ and i just didn't notice it until now.
I have had libxml++ installed for a number of years, no such is issue here. I just tested this by changing the build number of my package from libxml++-2.42.2-x86_64-1cgs.txz to libxml++-2.42.2-x86_64-2cgs.txz, ran update & upgrade-all, works fine, had additional updates in the upgrade-all too. (Fri Dec 23 20:27:02 UTC 2022; Fri Dec 23 02:37:47 UTC 2022; Thu Dec 22 03:40:55 UTC 2022)

This is in the complete unmodified function from core-functions.sh in my installed version of slackpkg (slackpkg-15.0.10-noarch-2.txz) which is for -current only, slackpkg-15.0.10-noarch-1.txz has the exact same code.
Code:
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
}
Just to clarify what I am saying, it it works without modification to core-functions.sh, it must be something else.

Last edited by chrisretusn; 12-24-2022 at 03:47 AM. Reason: clarify
 
Old 12-24-2022, 03:20 AM   #5
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 978

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Quote:
Originally Posted by BenCollver View Post
Code:
-               cut -f1 -d\  | uniq > ${TMPDIR}/dpkg
+               cut -f1 -d\  | uniq | sort > ${TMPDIR}/dpkg
The odd thing with that solution, sorting the output from uniq, is that uniq itself assumes that its input is sorted. From the man-page of uniq:

Quote:
Note: 'uniq' does not detect repeated lines unless they are adjacent. You may want to sort the input first, or use 'sort -u' without 'uniq'.
regards Henrik
 
Old 12-24-2022, 10:42 AM   #6
BenCollver
Rogue Class
 
Registered: Sep 2006
Location: OR, USA
Distribution: Slackware64-15.0
Posts: 376

Original Poster
Blog Entries: 2

Rep: Reputation: 172Reputation: 172
I reverted to the original code and reproduced the error.

I unset LC_ALL and that resolved the error.

I originally had LC_ALL=en_US.UTF-8

Perhaps it was a locale issue after all.
 
Old 12-24-2022, 11:00 AM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Maybe you made slackpkg delete, modify the culprit file, I could not find a locale setting which would make sort put libxml2 before libxml++
 
Old 12-24-2022, 11:50 AM   #8
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,976

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by BenCollver View Post
I reverted to the original code and reproduced the error.

I unset LC_ALL and that resolved the error.

I originally had LC_ALL=en_US.UTF-8

Perhaps it was a locale issue after all.
This could explain why I was not having this issue. I've never set LC_ALL, just about everything else is set to en_US.UTF-8.

It is late, time for bed. I will set LC_ALL to en_US.UTF-8 and see what happens tomorrow.

Last edited by chrisretusn; 12-24-2022 at 11:53 AM.
 
Old 04-09-2024, 08:14 AM   #9
BenCollver
Rogue Class
 
Registered: Sep 2006
Location: OR, USA
Distribution: Slackware64-15.0
Posts: 376

Original Poster
Blog Entries: 2

Rep: Reputation: 172Reputation: 172
As it turns out, en_US.UTF-8 is not a valid locale. On Slackware 15.0 it is en_US.utf8 as shown in locale -a
 
Old 04-09-2024, 08:43 AM   #10
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,817

Rep: Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493Reputation: 1493
Quote:
Originally Posted by BenCollver View Post
As it turns out, en_US.UTF-8 is not a valid locale. On Slackware 15.0 it is en_US.utf8 as shown in locale -a
en_US.UTF-8 is ok. Then the directories under /usr/lib64/locale are searched in this order:
  • en_US.UTF-8
  • en_US.utf8
  • en_US
  • en.UTF-8
  • en.utf8
  • en
The first one found is en_US.utf8.
 
1 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
I stopped a slackpkg upgrade-all in midstream and now I cannot slackpkg upgrade-all jkh2cpu Slackware 5 02-13-2022 03:05 AM
[SOLVED] Slackpkg upgrade-all returns 'no packages to upgrade' after slackpkg-update has downloaded files san2ban Slackware 8 11-01-2019 05:44 AM
slackpkg upgrade-all: comm: file 2 is not in sorted order hba Slackware 7 07-11-2015 10:39 PM
How can this list be sorted in date order of YYYY-MMM-DD order. Glenn D. Linux - Software 4 06-26-2014 12:08 AM

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

All times are GMT -5. The time now is 06:36 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