LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Sqg & Sbopkg - build / install only new (not jet installed) packages in a queue (https://www.linuxquestions.org/questions/slackware-14/sqg-and-sbopkg-build-install-only-new-not-jet-installed-packages-in-a-queue-4175699920/)

joenew 08-30-2021 08:56 AM

Sqg & Sbopkg - build / install only new (not jet installed) packages in a queue
 
Hi all,
I was wondering if there was an out-of-box way to give sbopkg a queue, generated with sqg, and prevent to build already installed packages.

In other words I want to:
- create a queue file with sqg (sqg -p package)
- launch sbopkg on that queue file (sbopkg -i package)
- but compile/build just the new packages of the queue, wasting no time with those yet installed

At now, I launched a little dirty oneliner like this to edit queue generated by sqg:
Code:

while read p; do if ls /var/log/packages |grep -q $p; then echo $p; else echo $p >> newqueue.sqf; fi; done < /var/lib/sbopkg/queues/oldqueue.sqf
And finally used it with sbopkg... But...

Is there a better (automated) way for this task?

Windu 08-30-2021 08:58 AM

Use the "-k" parameter of sbopkg perhaps?
Code:

-k  When used together with -b, -d, or -i, this option tells sbopkg to skip
 (i.e., don't process) any package it finds to be already installed.

Please note that only a name comparison is performed, so when this option is specified
 sbopkg will also omit the build of different versions of installed packages.


ponce 08-30-2021 08:59 AM

you are looking the "-k" option
Code:

sbopkg -k -i queue
have a look at "man sbopkg".

EDIT: Windu has been faster!

joenew 08-30-2021 10:46 AM

Many thanks folks!
Didn't remember that option...


All times are GMT -5. The time now is 09:08 AM.