LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-02-2021, 05:03 AM   #1
zdolar
Member
 
Registered: Jul 2009
Location: Slovenija
Distribution: Slackware
Posts: 114

Rep: Reputation: 17
slackpkg+ blacklist - how to blacklist third party package set?


Slackware64-current updated (slackpkg+-1.7.6-noarch-5mt)

How to properly blacklist certain package set from a third party repo?

Case: blacklist perl-*-?alien packages?
I wish to blacklist ONLY perl* packages from alienbob repository, as they are old (not for latest current) and they are messed up my sistem in the past. The perl package from slackware repository (perl-5.xxx86_64-?) must be excluded from the blacklist and so on the list for upgrade and enabled.
I install current perl scripts packages I need with cpan2tgz.
 
Old 06-02-2021, 05:23 AM   #2
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,919

Rep: Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802Reputation: 802
You shouldn't need to blacklist third party packages using slackpkg with slackpkg+

Here is my slackpkplus.conf (applicable sections) as a reference
Code:
PKGS_PRIORITY=( slackware64:id3lib ) # 2018-01-09, also in alienbob
PKGS_PRIORITY+=( slackware64:gcc ) # 2020-09-17 override multilib.
PKGS_PRIORITY+=( slackware64:mariadb ) # 2021-05-04 overide testing.
PKGS_PRIORITY+=( justpkgs )
PKGS_PRIORITY+=( nonslack )
PKGS_PRIORITY+=( slackpkgplus )
PKGS_PRIORITY+=( multilib restricted alienbob )

REPOPLUS+=( justpkgs )
REPOPLUS+=( nonslack )
REPOPLUS+=( slackpkgplus )
REPOPLUS+=( multilib restricted alienbob )

MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+dev/
MIRRORPLUS['nonslack']=file://home/non-slack/slackbuilds/
MIRRORPLUS['justpkgs']=dir://home/non-slack/justpkgs/
MIRRORPLUS['multilib']=file://home/non-slack/multilib/current/
MIRRORPLUS['alienbob']=file://home/non-slack/alienbob/current/x86_64/
MIRRORPLUS['restricted']=file://home/non-slack/alienbob_restricted/current/x86_64/
Note the first PKGS_PRIORITY which puts slackware first over a same named package in alienbob.

You can add this to greylist to keep those packages from being selected by default. This is useful with 'slackpkg install alienbob' and slackpkg upgrade-all' in that alienbob packages will not be selected by default. You will have to review the list and select them manually.
Code:
SLACKPKGPLUS_alienbob
Edit: Also note that nonslack is my third party local repository for my own SlackBuilds. This repository has priority over alienbob.

Edit2: justpkgs is a local directory that has only packages, no metadata required.

Last edited by chrisretusn; 06-02-2021 at 10:19 AM. Reason: metadate > metadata
 
2 members found this post helpful.
Old 06-04-2021, 02:13 AM   #3
zdolar
Member
 
Registered: Jul 2009
Location: Slovenija
Distribution: Slackware
Posts: 114

Original Poster
Rep: Reputation: 17
Thank you "chrisretusn".

My question was not exact. I already have slackpkplus.conf configured that way and regarding packages are listed in update list but not marked.

My goal is to configure updates the way that packages, I do not want to upgrade are NOT even on the list, not only "not marked for update" I do not want to see those packages on a list. That list is sometimes huge, and can accidentally mark undesired package for upgrade - when I mark all multilib packages.

regex in blacklist do not work right.
For example perl-*-?alien do not hide those packages.
 
Old 06-04-2021, 03:11 AM   #4
marav
Member
 
Registered: Sep 2018
Location: Paris, France
Distribution: Slackware
Posts: 344

Rep: Reputation: 196Reputation: 196
According to :
Code:
man /etc/slackpkg/blacklist
The right syntax is :
<package>-.*

So if you want to blacklist alienbob's perl packages - which is not fair :-) - the syntax would be :
Code:
perl-.*?alien

Last edited by marav; 06-04-2021 at 03:13 AM.
 
Old 06-04-2021, 03:37 AM   #5
zdolar
Member
 
Registered: Jul 2009
Location: Slovenija
Distribution: Slackware
Posts: 114

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by marav View Post
According to :
Code:
man /etc/slackpkg/blacklist
The right syntax is :
<package>-.*

So if you want to blacklist alienbob's perl packages - which is not fair :-) - the syntax would be :
Code:
perl-.*?alien
Thank you!

And "- which is not fair" - agree 100% with you. Eric is one of the best and respectable contributors/developers.
But his perl packages, the one I need, are all outdated and not for latest current (pre slackware-15).
I've broken my system with them and spent a lot of time to find out the reason.
I use >90 perl scripts - Zoneminder dependencies, and to find a sinner among them..
 
Old 06-04-2021, 04:02 AM   #6
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 689

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Why is the question mark there? Maybe you are confusing regular expressions and shell globbing (wild cards)?

Last edited by Petri Kaukasoina; 06-04-2021 at 04:09 AM.
 
Old 06-04-2021, 04:11 AM   #7
marav
Member
 
Registered: Sep 2018
Location: Paris, France
Distribution: Slackware
Posts: 344

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by Petri Kaukasoina View Post
Why is the question mark there? Maybe you are confusing regular expressions to shell globbing (wild cards)?
slackpkgplus use a specific syntax for blacklisting packages
And since the 24/02/2021 the syntax has change
Code:
Wed Feb 24 22:07:25 CET 2021
pkg/slackpkg+-1.7.2-noarch-1mt.txz: Upgrade
[...]
Note:
  - slackpkg+ currently does not support $ROOT
  - slackpkg-15 uses a new blacklist syntax; this works fine with slackpkg+
    but just for blacklist; don't use it for greylist
So, it needs some adjustments
 
Old 06-04-2021, 04:13 AM   #8
zdolar
Member
 
Registered: Jul 2009
Location: Slovenija
Distribution: Slackware
Posts: 114

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by Petri Kaukasoina View Post
Why is the question mark there? Maybe you are confusing regular expressions to shell globbing (wild cards)?
Solved, as noted.
Tested working:
Quote:
perl-.*alien
As you see there is no "?" any more, as *? is the same as *

Last edited by zdolar; 06-04-2021 at 04:16 AM.
 
Old 06-04-2021, 04:31 AM   #9
marav
Member
 
Registered: Sep 2018
Location: Paris, France
Distribution: Slackware
Posts: 344

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by zdolar View Post
Solved, as noted.
Tested working:

As you see there is no "?" any more, as *? is the same as *
Right
the good one with ?:
Code:
perl-.*-?alien
 
Old 06-04-2021, 06:49 AM   #10
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 689

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Quote:
Originally Posted by marav View Post
Right
the good one with ?:
Code:
perl-.*-?alien
(A disclaimer: I don't use slackpkg+ and I don't know anything about it.)

I'm sure you know your regular expressions but for those who don't, a little recap:

a matches 'a'
a? matches '' and 'a'
a+ matches 'a', 'aa', 'aaa', 'aaaa',...
a* matches '', 'a', 'aa', 'aaa', 'aaaa',...

A dot matches any single character, so naturally:

. matches any character, e.g. 'b'
.? matches zero or one character, e.g. '', 'b'
.+ matches one or more characters, e.g. 'b', 'be', 'beg7z'
.* matches zero or more characters, e.g. '', 'b', 'be', 'beg7z'

(Literal dot, question mark etc need to be escaped by a backslash: \. \? \+ \* )

So, what does perl-.*-?alien match? It has 'perl-', then after that any characters, zero times or more, then a hyphen zero times or once, and then 'alien'. For example perl-anythingalien and perl-anything-alien. It seems -? is superfluous, as a hyphen is also an 'any character', and perl-.*alien would match even with a hyphen immediately before 'alien'. As a matter of fact, alien's package names don't even contain a substring '-alien'. Instead, they have a version number between the hyphen and 'alien'.

What if you wanted to check for the version number? [0-9] matches any single character between 0 and 9 (i.e. a digit), so [0-9]+ matches one or more digits. You could then use
Code:
perl-.*[0-9]+alien

Last edited by Petri Kaukasoina; 06-04-2021 at 06:52 AM.
 
1 members found this post helpful.
Old 06-04-2021, 07:09 AM   #11
marav
Member
 
Registered: Sep 2018
Location: Paris, France
Distribution: Slackware
Posts: 344

Rep: Reputation: 196Reputation: 196
Thanks for the explanation ;-)

The right method is the one that works, anyway
 
Old 06-05-2021, 09:40 AM   #12
macondo
Senior Member
 
Registered: Jul 2003
Distribution: Devuan, Slackwre64-current
Posts: 1,022

Rep: Reputation: 62
what if (in current) I want to blacklist blackbox??

Is this correct?

blackbox/*

in /etc/slackpkg/blacklist?
 
Old 06-05-2021, 09:44 AM   #13
marav
Member
 
Registered: Sep 2018
Location: Paris, France
Distribution: Slackware
Posts: 344

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by macondo View Post
what if (in current) I want to blacklist blackbox??

Is this correct?

blackbox/*

in /etc/slackpkg/blacklist?
The syntax should be :
blackbox-.*
 
Old 06-05-2021, 09:47 AM   #14
macondo
Senior Member
 
Registered: Jul 2003
Distribution: Devuan, Slackwre64-current
Posts: 1,022

Rep: Reputation: 62
thank you very much!
 
Old 06-05-2021, 10:46 AM   #15
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 689

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
No, it would be:
Code:
blackbox
 
  


Reply


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
slackpkg vs. third-party package repository kikinovak Slackware 736 06-10-2021 10:57 AM
[SOLVED] blacklist mirror with slackpkg/slackpkg+ garpu Slackware 8 03-13-2021 10:49 PM
slackpkg blacklist kde should not blacklist polkit anymore frushiyama Slackware 1 09-25-2020 05:19 AM
[SOLVED] slackpkg+: setting PKGS_PRIORITY for multiple third-party repositories kikinovak Slackware 4 09-10-2013 05:55 AM

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

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