LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-03-2020, 01:14 AM   #16
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled

I have submitted a formal issue on github regarding this https://github.com/sbopkg/sbopkg/issues/60
 
Old 04-03-2020, 01:23 AM   #17
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,663

Rep: Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786
I think you missed the origianl idea of how -B is designed for

Quote:
-B Process the packages or queues without prompting for confirmation first.
So basically you still need to decide whether you want to install a single package or from queue. If you choose queue, it will directly install based on queue without prompting, so it's already as it's designed.
 
Old 04-03-2020, 01:25 AM   #18
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,663

Rep: Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786
Here's what i mean

without -B:

Code:
sbopkg -i filezilla
Both a queuefile and a package were found with the name "filezilla".

Use (Q)ueuefile, (P)ackage, or (A)bort?: q

###########################################
       New queue process started on:
       Fri Apr  3 13:24:00 WIB 2020
###########################################

+++++++++++++++++++++++++++++++++++++++++++
PRE-CHECK LOG
Using the SBo repository for Slackware 14.2
Queue Process:  Download, build, and install

libfilezilla:
  Checking GPG for libfilezilla.tar.gz ... OK
  Processing libfilezilla 0.16.0-1
  Using original .info file
  Using original SlackBuild file
  No build options selected.

wxGTK3:
  Checking GPG for wxGTK3.tar.gz ... OK
  Processing wxGTK3 3.0.4-2
  Using original .info file
  Using original SlackBuild file
  No build options selected.

filezilla:
  Checking GPG for filezilla.tar.gz ... OK
  Processing filezilla 3.42.1-1
  Using original .info file
  Using original SlackBuild file
  No build options selected.

+++++++++++++++++++++++++++++++++++++++++++

Pre-check complete.

Do you wish to proceed based on the search results above? Packages not
found will be skipped during the process.

(P)roceed or (Q)uit?:
with -B:
Code:
sbopkg -B -i filezilla
Both a queuefile and a package were found with the name "filezilla".

Use (Q)ueuefile, (P)ackage, or (A)bort?: q

###########################################
       New queue process started on:
       Fri Apr  3 13:24:35 WIB 2020
###########################################

+++++++++++++++++++++++++++++++++++++++++++
PRE-CHECK LOG
Using the SBo repository for Slackware 14.2
Queue Process:  Download, build, and install

libfilezilla:
  Checking GPG for libfilezilla.tar.gz ... OK
  Processing libfilezilla 0.16.0-1
  Using original .info file
  Using original SlackBuild file
  No build options selected.

wxGTK3:
  Checking GPG for wxGTK3.tar.gz ... OK
  Processing wxGTK3 3.0.4-2
  Using original .info file
  Using original SlackBuild file
  No build options selected.

filezilla:
  Checking GPG for filezilla.tar.gz ... OK
  Processing filezilla 3.42.1-1
  Using original .info file
  Using original SlackBuild file
  No build options selected.

+++++++++++++++++++++++++++++++++++++++++++

Pre-check complete.



Processing libfilezilla
 
Old 04-03-2020, 01:35 AM   #19
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
We're having the discussion split between LQ and GitHub, but since you closed the issue there, I'll provide a more detailed answer here.

I'm not contesting how -B works. The problem is that in your example `sbopkg -B -i filezilla`, sbopkg still stops prompting the user for interactive input. Am I missing some less obvious way to make sbopkg fully non-interactive in this situation, for automation purposes?

Last edited by FlinchX; 04-03-2020 at 01:36 AM. Reason: edit: typo
 
Old 04-03-2020, 01:48 AM   #20
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,663

Rep: Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786
It still give prompt since it gives the users an option to use queue or directly use a package
if the package doesn't have a queue, it will directly install the package without asking
Code:
sbopkg -B -i libfilezilla

###########################################
       New queue process started on:
       Fri Apr  3 13:47:14 WIB 2020
###########################################

+++++++++++++++++++++++++++++++++++++++++++
PRE-CHECK LOG
Using the SBo repository for Slackware 14.2
Queue Process:  Download, build, and install

libfilezilla:
  Checking GPG for libfilezilla.tar.gz ... OK
  Processing libfilezilla 0.16.0-1
  Using original .info file
  Using original SlackBuild file
  No build options selected.

+++++++++++++++++++++++++++++++++++++++++++

Pre-check complete.



Processing libfilezilla
 
Old 04-03-2020, 01:55 AM   #21
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by willysr View Post
It still give prompt
And this is exactly my problem, I don't want to fill any prompts manually, because this way I can't automate installing stuff with sbopkg. I'd like to be able to tell sbopkg to prefer queues or packages when it finds both with the same name, via command line argument.
 
Old 04-03-2020, 04:20 AM   #22
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,663

Rep: Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786
Feel free to send a PR
 
Old 04-03-2020, 04:26 AM   #23
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
@bassmadrigal

What about something like

Code:
-n type When there are queues and packages with same name, treat the names passed to -b/-d/-i
        as of this type. Valid options are: queue, pkg. When this option is set, sbopkg
        running in batch mode won't prompt for a choice.
The -n option isn't taken and there would be just one additional option to handle both cases.

Last edited by FlinchX; 04-03-2020 at 06:02 PM.
 
Old 04-03-2020, 07:32 PM   #24
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
This is what I have so far.

Note that this is a patch against 0.38.1, not against the latest git master. As I said above, I'm not using -current, so I don't have a sandbox to test that scenario.

I did a couple of tests in 14.2 and it kind of works, but I'm a shell scripting noob, so feedback is necessary.

@bassmadrigal : if you are attempting to do the same and are planning to provide patches for both 14.2 and -current, you are welcome to use the code.

Code:
--- sbopkg.orig	2016-09-01 16:45:16.000000000 +0000
+++ sbopkg	2020-04-04 00:00:00.000000000 +0000
@@ -4515,6 +4515,8 @@
 unset ALLOW_MULTI     # If set, allow more that one instance of sbopkg running
 unset BUILDLIST       # List of packages to build/install (from CLI)
 unset PIDFILE         # PID
+unset NAME_TYPE       # The policy used to treat names: either queue or package
+                      # (see "-n")
 
 unset BUILD CHK_UPDATES GENSEARCH CHANGELOG OBSOLETESRC GETPKGS
 unset RSYNC SEARCH UPDATE VERSION CUSTOMVER SKIP_INSTALLED VIEW_READMES
@@ -4560,7 +4562,7 @@
 fi
 
 # This is the command line options and help.
-while getopts ":b:BcD:d:e:f:g:hi:kloPpqRrs:uV:v" OPT; do
+while getopts ":b:BcD:d:e:f:g:hi:kln:oPpqRrs:uV:v" OPT; do
     case $OPT in
         b ) # Download, build
             set_type build
@@ -4607,6 +4609,11 @@
             CHANGELOG=1
             unset DIAG
             ;;
+        n ) # How to treat names when there are both queues and packages
+            # with the same name
+            NAME_TYPE=$OPTARG
+            unset DIAG
+            ;;
         o ) # Show obsolete sources
             OBSOLETESRC=1
             unset DIAG
@@ -4666,6 +4673,10 @@
   -i pkg/queue(s) Like '-b', but also install built packages.
   -k              Skip installed packages when building.
   -l              Display the repo's ChangeLog.txt and then quit.
+  -n name_type    When there are queues and packages with the same name, treat
+                  the names passed to -b/-d/-i as of this type. Valid options
+                  are: queue, pkg. When this option is set, sbopkg running in
+                  batch mode won't prompt for a choice.
   -o              Display the obsolete source files & prompt for deletion.
   -P              List uninstalled cached package files & prompt for deletion.
   -p              List installed packages from active repo.
@@ -4713,6 +4724,16 @@
     readonly ON_ERROR
 fi
 
+if [[ -n $NAME_TYPE && \
+      $NAME_TYPE != queue && \
+      $NAME_TYPE != pkg ]]; then
+    echo "Unknown -n specifier -- \"$NAME_TYPE\"" >&2
+    echo "Valid values are: queue, pkg" >&2
+    exit 1
+else
+    readonly NAME_TYPE
+fi
+
 # Check for a good config file and set initial variables
 config_check
 
@@ -4796,19 +4817,27 @@
             fi
             if [[ -r $QUEUEDIR/$PKGBUILD.sqf ]] &&
                     search_package $PKGBUILD; then
-                crunch_fmt "Both a queuefile and a package were found with \
-                    the name \"$PKGBUILD\"."
-                echo
-                while :; do
-                    read $NFLAG \
-                        -ep "Use (Q)ueuefile, (P)ackage, or (A)bort?: "
-                    case $REPLY in
-                        Q|q) parse_queue $QUEUEDIR/$PKGBUILD.sqf; break ;;
-                        P|p) parse_arguments "$PKGBUILD"; break ;;
-                        A|a) exit 1 ;;
-                        *) unknown_response ;;
-                    esac
-                done
+                if [[ -z $NAME_TYPE ]]; then
+                    crunch_fmt "Both a queuefile and a package were found with \
+                        the name \"$PKGBUILD\"."
+                    echo
+                    while :; do
+                        read $NFLAG \
+                            -ep "Use (Q)ueuefile, (P)ackage, or (A)bort?: "
+                        case $REPLY in
+                            Q|q) parse_queue $QUEUEDIR/$PKGBUILD.sqf; break ;;
+                            P|p) parse_arguments "$PKGBUILD"; break ;;
+                            A|a) exit 1 ;;
+                            *) unknown_response ;;
+                        esac
+                    done
+                else
+                    if [ "$NAME_TYPE" == "queue" ]; then
+                        parse_queue $QUEUEDIR/$PKGBUILD.sqf
+                    elif [ "$NAME_TYPE" == "pkg" ]; then
+                        parse_arguments "$PKGBUILD"
+                    fi
+                fi
             else
                 if [[ -r $QUEUEDIR/$PKGBUILD.sqf ]]; then
                     # Add an entire queue
 
Old 04-03-2020, 08:24 PM   #25
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by FlinchX View Post
I want to use sbopkg, as my example shows, perhaps I should've added that explicitly to the title.
Create a virtual machine with a pristine environment. Install slackrepo. Use slackrepo to build. Use slapt-get to install from your slackrepo virtual machine.

I'm doing exactly that with -current for the one laptop I've got running -current. I've got an actual piece of hardware running a stock Slackware64 14.2 image that does the same for my other machines; I've got the extra hardware, which is why I'm using it for 14.2.

If using sbopkg on a machine with other stuff installed floats your boat, I'm not going to try to stop you.
 
Old 04-07-2020, 09:20 AM   #26
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Another trouble I'm running into: at first startup, sbopkg asks interactively to create some missing dirs. I can't find any command line argument that will create those missing directories and exit without asking anything.
 
Old 04-07-2020, 09:40 AM   #27
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,104

Rep: Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178Reputation: 4178
it's a variable that you can export via the command line or set directly to "NO" in /etc/sbopkg/sbopkg.conf
Code:
MKDIR_PROMPT=${MKDIR_PROMPT:-NO}
 
1 members found this post helpful.
Old 04-07-2020, 09:52 AM   #28
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,663

Rep: Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786Reputation: 1786
Thanks ponce, i set those NO by default now, so directory will be created automatically for future release of sbopkg
 
2 members found this post helpful.
Old 04-07-2020, 02:53 PM   #29
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 906

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Quote:
Originally Posted by FlinchX View Post
And this is exactly my problem, I don't want to fill any prompts manually, because this way I can't automate installing stuff with sbopkg. I'd like to be able to tell sbopkg to prefer queues or packages when it finds both with the same name, via command line argument.
You can give the name of the queue file (with extension!) and sbopkg will just use the queue file directly, without prompting:

Code:
sbopkg -k -b ffmpeg.sqf
I don't know of a way to prefer the package over the queue file, however.
 
2 members found this post helpful.
Old 04-07-2020, 03:42 PM   #30
FlinchX
Member
 
Registered: Nov 2017
Distribution: Slackware Linux
Posts: 666

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by drumz View Post
You can give the name of the queue file (with extension!) and sbopkg will just use the queue file directly, without prompting:

Code:
sbopkg -k -b ffmpeg.sqf
Now that you pointed to this, I see it's explicitly mentioned in the manpage. But it's not obvious from the output of sbopkg -h
 
  


Reply



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
Suitesparse /Cuda SBo, complains about too advanced GCC, although being built with GCC 5 from the same SBo. Lockywolf Slackware 5 04-28-2019 10:17 PM
nvidia-driver SBo The symbolic link '/usr/lib/libGL.so.1' does not point to 'tmp/SBo/package-nvidia-driver/usr/lib64/libGL.so.1' Gerardo Zamudio Slackware 5 07-30-2017 10:44 PM
Questions for Robby, ponce, or anyone from SBo about SBo submission requirements. ReaperX7 Slackware 4 06-07-2015 11:30 AM
Nvidia-driver.SlackBuild from SBo (or: I am a bad and sloppy SBo maintainer) kingbeowulf Slackware 8 08-31-2012 02:41 AM

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

All times are GMT -5. The time now is 05:53 PM.

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