LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   regex in blacklist for slackpkg - how to use it? (http://www.linuxquestions.org/questions/slackware-14/regex-in-blacklist-for-slackpkg-how-to-use-it-871992/)

markush 03-30-2011 04:30 PM

regex in blacklist for slackpkg - how to use it?
 
Hello together,

today I moved my Slackware64-current installations to multilib. I blacklisted the gcc and glib packages in the blacklist-file for slackpkg. In the blacklistfile they say:
Code:

# Now we can blacklist using regular expressions.
# This one will blacklist all SBo packages:
#[0-9]+_SBo

I have blacklisted
Code:

...
# The gcc compiler suite:
gcc
gcc-g++
gcc-gfortran
gcc-gnat
gcc-java
gcc-objc

# The GNU libc libraries:
glibc
glibc-i18n
glibc-profile
glibc-solibs
glibc-zoneinfo
glibc-debug
...

does anyone know, how I can use the mentioned regular expressions in order to make blacklisting more efficient?

Thanks in advance

Markus

55020 03-30-2011 05:20 PM

Apparently every line of /etc/slackpkg/blacklist is now considered to be a regular expression, which can match *any* part of the package name (and/or version, and/or build number, and/or tag). So, in your example, 'gcc' is a regular expression that blacklists gcc, gcc-g++, gcc-gfortran, etc etc. Also, 'glibc' is a regular expression that blacklists glibc, glibc-i18n, glibc-profile, etc etc. To blacklist the whole of Multilib you could just write

Code:

gcc
glibc
compat32

Yes, it will probably cause a small amount of confusion until we all learn the best way to use it!

markush 03-30-2011 05:31 PM

Hello,

thanks for the answer, I've got it now. I fiddeld with regex and found a way to blacklist even the compat32 files, here's the solution
Code:

...
gcc
glibc

compat32
.+-compat32

digikam
libreoffice
texlive
vlc
...

this blacklists all packages with a "-compat32" in their name, libreoffice-l10n and vlc-mozplugins are also blacklisted now.

Markus


All times are GMT -5. The time now is 02:45 AM.