Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create slackpkg.yaml #316

Merged
merged 6 commits into from
Jan 26, 2025
Merged

Create slackpkg.yaml #316

merged 6 commits into from
Jan 26, 2025

Conversation

Pierre-Gronau-ndaal
Copy link
Contributor

No description provided.

@tclahr
Copy link
Owner

tclahr commented Jan 22, 2025

I did not manage to get the list of installed packages on a Slackware 15 using slackpkg search installed.

root@uac-slackware-15:~# slackpkg search installed
Looking for installed in package list. Please wait... DONE
No package name matches the pattern.
root@uac-slackware-15:~# 

I did some research and I got the list of installed packages by using the following 2 methods:
ls /var/log/packages/*
or
slackpkg search * | grep -v "uninstalled"

The second one also shows information about packages that need to be upgraded, so I would use it instead.

Can you do some tests and let me know if you have the same results? Thanks!

@Pierre-Gronau-ndaal
Copy link
Contributor Author

sudo cat /etc/slackware-version
Slackware 14.2

excerpt:

vagrant@vagrant-slackware64-14-2:~$ sudo ls /var/log/packages/*
/var/log/packages/ConsoleKit2-1.0.0-x86_64-3 /var/log/packages/hplip-3.16.5-x86_64-3 /var/log/packages/netdate-bsd4-x86_64-1
/var/log/packages/Cython-0.23.4-x86_64-1 /var/log/packages/htdig-3.2.0b6-x86_64-4 /var/log/packages/netkit-bootparamd-0.17-x86_64-2
/var/log/packages/GConf-3.2.6-x86_64-3 /var/log/packages/htop-2.0.1-x86_64-1 /var/log/packages/netkit-ftp-0.17-x86_64-2
/var/log/packages/LibRaw-0.17.2-x86_64-1 /var/log/packages/httpd-2.4.20-x86_64-1 /var/log/packages/netkit-ntalk-0.17-x86_64-3
/var/log/packages/M2Crypto-0.23.0-x86_64-1 /var/log/packages/hunspell-1.3.3-x86_64-1 /var/log/packages/netkit-routed-0.17-x86_64-1
/var/log/packages/ModemManager-1.4.14-x86_64-1 /var/log/packages/hwdata-0.284-noarch-1 /var/log/packages/netkit-rsh-0.17-x86_64-1
/var/log/packages/NetworkManager-1.2.2-x86_64-2 /var/log/packages/icmpinfo-1.11-x86_64-2 /var/log/packages/netkit-rusers-0.17-x86_64-1
/var/log/packages/PyQt-4.11.4-x86_64-1 /var/log/packages/icon-naming-utils-0.8.90-x86_64-2 /var/log/packages/netkit-rwall-0.17-x86_64-1
/var/log/packages/QScintilla-2.9.1-x86_64-1 /var/log/packages/icu4c-56.1-x86_64-2 /var/log/packages/netkit-rwho-0.17-x86_64-2

sudo /usr/sbin/slackpkg search * | grep -v "uninstalled"

Looking for * in package list. Please wait... DONE

The list below shows all packages with name matching "*".

[ upgrade ] - NetworkManager-1.2.2-x86_64-2 --> NetworkManager-1.8.4-x86_64-2_slack14.2
[ upgrade ] - alpine-2.20-x86_64-2 --> alpine-2.25-x86_64-1_slack14.2
[ upgrade ] - bash-4.3.046-x86_64-1 --> bash-4.3.048-x86_64-1_slack14.2
[ upgrade ] - bind-9.10.4_P1-x86_64-1 --> bind-9.11.37-x86_64-1_slack14.2
[ upgrade ] - bluez-5.40-x86_64-1 --> bluez-5.47-x86_64-1_slack14.2
[ upgrade ] - bzip2-1.0.6-x86_64-1 --> bzip2-1.0.8-x86_64-1_slack14.2
[ upgrade ] - ca-certificates-20160104-noarch-1 --> ca-certificates-20231117-noarch-1_slack14.2
[ upgrade ] - cups-2.1.4-x86_64-1 --> cups-2.1.4-x86_64-5_slack14.2
[ upgrade ] - curl-7.49.1-x86_64-1 --> curl-8.4.0-x86_64-1_slack14.2

sudo find /var/log/packages -type f
/var/log/packages/icu4c-56.1-x86_64-2
/var/log/packages/svgalib-1.9.25-x86_64-3
/var/log/packages/at-spi2-core-2.18.3-x86_64-1
/var/log/packages/libart_lgpl-2.3.21-x86_64-1
/var/log/packages/speexdsp-1.2rc3-x86_64-1
/var/log/packages/efibootmgr-0.5.4-x86_64-1
/var/log/packages/libcdio-0.93-x86_64-1
/var/log/packages/procmail-3.22-x86_64-2
/var/log/packages/gsettings-desktop-schemas-3.18.1-x86_64-1
/var/log/packages/fftw-3.3.4-x86_64-1
/var/log/packages/cdparanoia-III_10.2-x86_64-1
/var/log/packages/glib-networking-2.46.1-x86_64-1
/var/log/packages/gutenprint-5.2.11-x86_64-2
/var/log/packages/mercurial-3.8.2-x86_64-1
/var/log/packages/binutils-2.26-x86_64-3

sudo /usr/sbin/slackpkg
slackpkg - version 2.82.1

Usage:
slackpkg [OPTIONS] {install|remove|search|file-search|
upgrade|reinstall|blacklist} {PATTERN|FILE}
slackpkg [OPTIONS] {generate-template|install-template|remove-template}
TEMPLATENAME
slackpkg [OPTIONS] info PACKAGE
slackpkg [OPTIONS] update [gpg]
slackpkg [OPTIONS] {clean-system|upgrade-all|install-new}
slackpkg [OPTIONS] {new-config|check-updates|help}

If you need more information try to use 'slackpkg help' or look the
slackpkg's manpage.

sudo /usr/sbin/slackpkg info *

bash:
bash: The GNU Bourne-Again SHell. Bash is a sh-compatible command
bash: interpreter that executes commands read from the standard input or
bash: from a file. Bash also incorporates useful features from the Korn
bash: and C shells (ksh and csh). Bash is ultimately intended to be a
bash: conformant implementation of the IEEE Posix Shell and Tools
bash: specification (IEEE Working Group 1003.2).
bash:
bash: Bash must be present for the system to boot properly.
bash:

PACKAGE NAME: bind-9.11.37-x86_64-1_slack14.2.txz
PACKAGE LOCATION: ./patches/packages
PACKAGE SIZE (compressed): 2240 K
PACKAGE SIZE (uncompressed): 9710 K
PACKAGE DESCRIPTION:
bind: bind (DNS server and utilities)
bind:
bind: The named daemon and support utilities such as dig, host, and
bind: nslookup. Sample configuration fi

my approach is wrong, I would take now a combination:

sudo /usr/sbin/slackpkg info *
sudo find /var/log/packages -type f
sudo /usr/sbin/slackpkg search * | grep -v "uninstalled"

choose now three approaches
@tclahr
Copy link
Owner

tclahr commented Jan 25, 2025

I have just noticed that both sudo /usr/sbin/slackpkg info * and sudo /usr/sbin/slackpkg search * only work if you run them from an empty directory, in the other hand the asterisk (glob) will select all existing file names in the current directory and try to search for them.

uac@uac-slackware-15:~/test$ pwd
/home/uac/test
uac@uac-slackware-15:~/test$ ls
file001  file002  file003
uac@uac-slackware-15:~/test$ sudo /usr/sbin/slackpkg search *

search: Ignoring extra arguments: file002 file003

Looking for file001 in package list. Please wait... DONE

No package name matches the pattern.

uac@uac-slackware-15:~/test$

So I think the only reliable way would be listing the files in /var/log/packages as UAC runs commands by its default directory.

@tclahr tclahr merged commit e8fac13 into tclahr:develop Jan 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants