LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


Search this Thread
Old 12-15-2009, 11:55 AM   #1
Senior Member
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Rep: Reputation: 62
slackpkg blacklisting ; can a wildcard be used?

Hello all,

Sorry if I've missed this in the doc's, but I don't see the ability to "wildcard" blacklist for packages to _not_ be changed out via the slackpkg program.

More specifically, I tagged all my packages like this:


note the "OLDFOGIE" in my package name?

So can something such as:

be put into slackpkg blacklist file?

Thank you in advance.

Old 12-15-2009, 02:58 PM   #2
Didier Spaier
Senior Member
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,249

Rep: Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044Reputation: 1044
Just tried (glibc* and gcc*), doesn't work.

So either blacklist individual packages, or blacklist directories containing packages, as shown in /etc/slackpkg/blacklist.
Old 12-16-2009, 08:15 AM   #3
Slackware Contributor
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
No, regex blacklisting isn't supported (yet?). It's something that I've been wanting (to do) for a while, and I think PiterPUNK wants (to do) it too, but time has been friendly to neither of us.

Last edited by rworkman; 12-16-2009 at 10:48 AM.
Old 12-16-2009, 10:38 AM   #4
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 111Reputation: 111
function checkblacklist {
   grep -Ev "[:space:]*#.*" "${CONF}/blacklist" |
   while read PATTERN ; do
      if test "$PATTERN" ; then
         local i
         local BLKNAME="${PKGDATA[1]}"
         for i in 2 3 4; do
            if echo "${BLKNAME}" | grep -Eq "${PATTERN}" ; then
               return 0
         if echo "${PKGDATA[6]/./}" | grep -Eq ${CONF}/blacklist ; then
            return 0
Seems to work for me, but rather slow, YMMV. May break things horribly since I just did it in 15-30 min without trying to understand the rest of slackpkg.

Last edited by tuxdev; 12-16-2009 at 10:43 AM.
Old 12-17-2009, 08:43 PM   #5
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 111Reputation: 111
BTW, if this is actually supposed to be bash, not POSIX, then I'd use the =~ regex matching.
Old 12-18-2009, 12:49 AM   #6
Senior Member
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Original Poster
Rep: Reputation: 62
Thanks for the update.

@tuxdev : I'll give that a whirl in a vm and see.

@rworkman : get back to work!

I've been toying with this in my head as well for the past few days.

For sake of simplicity (or what works in my head ) Yes, I know this is very 'debianista' but hear me out on this one

The stock blacklist file is comprised of three sections:

So what if the blacklist file was changed to be four files:
1. blacklist.kernels
2. blacklist.packages
3. blacklist.folders
4. blacklist.variables (this would be a file, where the admin would simply put in his/her/it's desired buzzwords, wildcards, such as "OLDFOGIE" or "SBo" or "rlw" or "alien".

Then slackpkg would simply have to "source" the four text files (blacklist.kernels , blacklist.packages, blacklist.folders, and blacklist.variables)

Then when 'slackpkg update' is called, it would run a simple "ls /var/log/packages |grep OLDFOGIE" (and whatever else is in blacklist.variables) and put that into blacklist.packages file. So the blacklist.packages file is always updated to reflect the present state of the custom user installed packages, eg the "OLDFOGIE", etc.

Just a thought, whew too much thinking.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Blacklisting dad Mandriva 1 07-01-2008 02:23 AM
blacklisting driver unisol Linux - Networking 1 06-09-2007 10:21 AM
Blacklisting packages with "slackpkg"??? Southpaw76 Slackware 2 05-19-2007 03:50 PM
Slackpkg: missing something in /usr/libexec/slackpkg/functions.d/ michelino Slackware 4 03-20-2007 12:22 PM
blacklisting bcm43xx crashsystems Linux - Wireless Networking 3 10-29-2006 12:52 PM

All times are GMT -5. The time now is 05:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration