Article 6CN5V slackpkg pattern search

slackpkg pattern search

by
lavoiealexandre
from LinuxQuestions.org on (#6CN5V)
Hi guys, I'm new to slackpkg but not new to Slackware, used it since version 10.1 if I recall.

Now, I'm working on automating my softwares build and packaging using Gitea Actions. I've made a setup using some Slackware XX.X images and I want to get the power of slackpkg to install missing packages as needed since the image is stripped off.

To be able to use gcc/g++/cmake/make, I've came up with this script :

Code:# Prepare slackpkg with only original packages
sed -i "s/PRIORITY.*/PRIORITY=( %PKGMAIN extra )/" /etc/slackpkg/slackpkg.conf

# Install required package for development tools (gcc/g++)
slackpkg update

slackpkg install gcc-[0-9]
slackpkg install gcc-g++-[0-9]
slackpkg install libmpc-[0-9]
slackpkg install binutils-[0-9]
slackpkg install glibc-[0-9]
slackpkg install glibc-solibs-[0-9]

slackpkg install cmake-[0-9]
slackpkg install libarchive-[0-9]
slackpkg install libxml2-[0-9]
slackpkg install cyrus-sasl-[0-9]

slackpkg install make-[0-9]
slackpkg install guile-[0-9]
slackpkg install gc-[0-9]
slackpkg install libffi-[0-9]It's not perfect because as far as I understand, it is searching a pattern and I've not been able to discriminate the start of the package name, so you can see the problem in that example :

If I want to install gd, it will pop more packages :

Code:search gd-[0-9]

Looking for gd-[0-9] in package list. Please wait... DONE

The list below shows all packages with name matching "gd-[0-9]".

[uninstalled] - aspell-gd-0.1.1_1-x86_64-5
[ installed ] - gd-2.3.3-x86_64-2
[ installed ] - sysklogd-2.3.0-x86_64-1
[ installed ] - ulogd-2.0.7-x86_64-4And if I try to discriminate with the start, it doesn't find anything :

Code:slackpkg search ^gd-[0-9]

Looking for ^gd-[0-9] in package list. Please wait... DONE

No package name matches the pattern.Probably my pattern is wrong, but in the end, that would be nice to be able to provide a specific package name so I'm not sure how it is possible.

Thank you!
Alexandre
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments