diff --git a/ChangeLog-current.txt b/ChangeLog-current.txt index 94c398e..9ce003b 100644 --- a/ChangeLog-current.txt +++ b/ChangeLog-current.txt @@ -1,4 +1,4 @@ -Sun Jun 7 03:40:11 UTC 2009 +Tue Jun 23 01:08:54 UTC 2009 Sbopkg 0.XX.X released. This version contains the following fixes and enhancements: @@ -109,3 +109,6 @@ enhancements: * Modify do_install() to correctly invoke upgradepkg to avoid a fairly rare but serious case of removing the wrong package; thanks to NaCl for the bug report. + * Add ability to pass build options in a queuefile when separated by a pipe + character, i.e. app | FOO=yes BAR=no ++--------------------------+ diff --git a/src/usr/doc/README-queuefiles b/src/usr/doc/README-queuefiles index 7a8c88a..008901b 100644 --- a/src/usr/doc/README-queuefiles +++ b/src/usr/doc/README-queuefiles @@ -15,3 +15,49 @@ baz In this case, both 'foo' and 'baz' will appear 'ON,' or selected, in the sbopkg dialog menus, and 'bar' will appear 'OFF,' or deselected. + +Additionally, queuefiles may be loaded recursively. This means the user can +have separate queuefiles for certain applications, or certain queues, and then +a 'master' queuefile can bring them all together. Recursively-loaded queues +are indicated by a '@' prepended to the name of the queuefile. + +For example, a user might have one queuefile named 'multimedia.sqf' with these +items: + +app1 +app2 +app3 + +And then the user might have another queuefile named 'mydesktop.sqf' with +these items: + +app4 +app5 +@multimedia.sqf + +In this case, when the 'mydesktop.sqf' queuefile is loaded, it will first load +app4, then app5, then the contents of the multimedia.sqf queuefile. The final +queue will look like this: + +app4 +app5 +app1 +app2 +app3 + +Finally, it is possible to pass build options for an application in a +queuefile. This is done by using a single pipe ('|') character after the +application name. For example: + +app | FOO=yes BAR=no + +Only use one pipe to separate the application name and the variables. + +In case the user has saved build options individually in the dialog interface, +and also puts build options for that same application in the queuefile, sbopkg +will ask the user which one should be used. + +In all cases, whether loading software names more than once, or indicating +build options in more than one queuefile, the first instance will apply. So +if a user has "app" in one queuefile, and "-app" in a recursive queuefile that +is loaded further down the list, the first instance, or "app" will prevail. diff --git a/src/usr/man/man5/sbopkg.conf.5 b/src/usr/man/man5/sbopkg.conf.5 index 720327e..9009a64 100644 --- a/src/usr/man/man5/sbopkg.conf.5 +++ b/src/usr/man/man5/sbopkg.conf.5 @@ -32,13 +32,14 @@ REPO_NAME=${REPO_NAME:-SBo}. .TP 5 .B REPO_BRANCH .br -This option allows the user to set the default active repository branch. -The current options are 11.0, 12.0, 12.1 and 12.2 for the SBo repository, -master for the SB64 repositort and local for the local repository. +This option allows the user to set the default active repository +branch. The current options are 11.0, 12.0, 12.1, 12.2, and 13.0 for +the SBo repository, master for the SB64 repositort and local for the +local repository. The default value of REPO_BRANCH is: .br -REPO_BRANCH=${REPO_BRANCH:-12.2}. +REPO_BRANCH=${REPO_BRANCH:-13.0}. .TP 5 .B REPO_ROOT @@ -229,3 +230,7 @@ sbopkg at all. .SH "SEE ALSO" .BR sbopkg (8) +.BR README in doc/ +.BR README-queuefiles in doc/ +.BR README-renames.d in doc/ +.BR README-repos.d in doc/ diff --git a/src/usr/man/man8/sbopkg.8 b/src/usr/man/man8/sbopkg.8 index 2cc2738..a286c28 100644 --- a/src/usr/man/man8/sbopkg.8 +++ b/src/usr/man/man8/sbopkg.8 @@ -1,4 +1,4 @@ -.TH SBOPKG 8 "May 2009" sbopkg-SVN "" +.TH SBOPKG 8 "June 2009" sbopkg-SVN "" .SH NAME .B sbopkg \ - The SlackBuilds.org Package Browser @@ -41,7 +41,7 @@ repository. Selecting a package will display another menu allowing the user to view the package's README, SlackBuild, .info, or slack-desc files. The user can also edit the .info file and SlackBuild and the edited files will remain after doing an rsync. -Additionally, if sbopkg is run with root privileges, then the user can +Additionally, the user can choose to build a package as well using either the original SlackBuild or the locally-edited one, if present. If using the dialog interface, and if sbopkg finds a built package for a particular piece of software @@ -56,6 +56,15 @@ Alternatively, sbopkg can be run from the command line without using the dialog interface. Executing "sbopkg -h" will display a list of options available from the command line. +Sbopkg also has the capability of loading, saving, and using +user-created queuefiles. These queuefiles are simple text files with +one application name per line. By default, when a queuefile is loaded +in the dialog interface, the application is selected, or "ON." This +can be changed by inserting a "-" in front of the application name in +the queuefile. Also, queuefiles can reference other queuefiles when +the first character is a "@". See the readme-queuefiles document in +the doc/ directory for more information. + Certain features of sbopkg rely on outside binaries, such as a pager to view the text files when sbopkg is run from the comamnd line, and an editor to edit the .info or SlackBuild files. The pager function @@ -76,15 +85,15 @@ than one package is specified, they must be in quotes. For example: #sbopkg -b "foo bar" will build foo and then bar. -Queue names can also be specified. In that case, all the packages specified -in the queue file will be built. In the unfortunate case a token matches both -a queue name and a package name (i.e. the user named a queue with the name of -a package), sbopkg will interpret it as a queue name. -The tokens (package names or queues) are processed in the order they are -specified on the command line, and the build order specified in the queue -files is retained. -If a package is specified more than once, it gets queued only the first time -it's encountered. +Queuefle names can also be specified. In that case, all the packages +specified in the queuefile will be built. In the unfortunate case a +token matches both a queue name and a package name (i.e. the user +named a queue with the name of a package), sbopkg will ask the user +which one should be used. The tokens (package names or queuefiles) +are processed in the order they are specified on the command line, and +the build order specified in the queuefiles is retained. If a package +is specified more than once, it gets queued only the first time it is +encountered. .TP 5 .B -c @@ -148,8 +157,8 @@ nature of dependencies, this may not always be possible and so building dependencies like this is not really a supported feature. Still, when when it works, it can be helpful. -Queue names are supported, too. See the explanation for the '-b' command -for details. +Queuefile names are supported, too. See the explanation for the '-b' +command for details. .TP 5 .B -l @@ -200,14 +209,15 @@ Check for an update to sbopkg itself and then quit. .TP 5 .B -v VERSION Set the repository and branch to use. -.br -The currently supported repositories are SBo, SB64 and local. Inside these, -the supported branches are 11.0, 12.0, 12.1 and 12.2 for SBo, master for SB64 -(Slamd64Builds repository) and local for local. See the + +The currently supported repositories are SBo, SB64 and local. Inside +these, the supported branches are 11.0, 12.0, 12.1, 12.2, and 13.0 for +SBo, master for SB64 (Slamd64Builds repository) and local for local. +See the .B sbopkg.conf (5) man page for more information about the 'local' repository. -.br -The VERSION format is repository/branch (e.g. SBo/12.2). If the repository is + +The VERSION format is repository/branch (e.g. SBo/13.0). If the repository is omitted, sbopkg will first look for the specified branch in the default repository. If that attempt fails, sbopkg will look for the first matching branch in any repository. @@ -218,15 +228,19 @@ branch in any repository. .B /etc/sbopkg/renames.d/50-default \ - Default file that lists software in SBo repository that has been renamed. -See the README-renames.d document in the sbopkg /doc directory for more +See the README-renames.d document in the sbopkg doc/ directory for more information. .B /etc/sbopkg/repos.d/{40-sbo.repo,50-sb64.repo,60-local.repo} \ - Three default files for various types of sbopkg repositories. See the -README-repos.d document in the sbopkg /doc directory for more information. +README-repos.d document in the sbopkg doc/ directory for more information. .SH "SEE ALSO" .BR sbopkg.conf (5) +.BR README in doc/ +.BR README-queuefiles in doc/ +.BR README-renames.d in doc/ +.BR README-repos.d in doc/ .SH AUTHOR Chess Griffin diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index c9d68de..96e5fa9 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -1768,10 +1768,13 @@ parse_queue() { continue fi unset LOADOPTIONS - if grep -q "|" <<< $PICK 2> /dev/null; then - LOADOPTIONS=$(echo $PICK | cut -d '|' -f2) - LOADOPTIONS=$(echo $LOADOPTIONS | sed -e 's/^ //') - PICK=$(echo $PICK | cut -d '|' -f1) + if grep -q "|" <<< $PICK; then + #LOADOPTIONS=$(echo $PICK | cut -d '|' -f2) + #LOADOPTIONS=$(echo $LOADOPTIONS | sed -e 's/^ //') + #PICK=$(echo $PICK | cut -d '|' -f1) + LOADOPTIONS=${PICK##*|} + LOADOPTIONS=$(sed -e 's/^ //' <<< $LOADOPTIONS) + PICK=${PICK%%|*} fi if ! add_item_to_queue $PICK "$LOADOPTIONS"; then if [[ ! -f $MISSING_LIST_FILE ]]; then @@ -1843,12 +1846,16 @@ add_item_to_queue() { echo "$APP Found $ONOFF" >> $QUEUELIST if [[ $LOADOPTIONS ]]; then echo "$LOADOPTIONS" > $SBOPKGTMP/sbopkg_"$APP"_loadoptions + else + rm -f $SBOPKGTMP/sbopkg_"$APP"_loadoptions fi else if [[ $ONOFF == "ON" ]]; then echo "$APP" >> $TMPQUEUE if [[ $LOADOPTIONS ]]; then echo "$LOADOPTIONS" > $SBOPKGTMP/sbopkg_"$APP"_loadoptions + else + rm -f $SBOPKGTMP/sbopkg_"$APP"_loadoptions fi fi fi @@ -2029,6 +2036,8 @@ rsync_command() { echo "Importing $REPO_DESC GPG Key..." gpg --quiet --fetch-key http://www.slackbuilds.org/GPG-KEY echo "Import done." + echo + echo "***SYNC COMPLETE***" ;; *) echo @@ -3106,8 +3115,8 @@ use_options() { break else echo - crunch_fmt "No saved options found. Please make \ - another choice." + crunch_fmt "ERROR: No saved options found. \ + Please make another choice." echo fi ;; @@ -3119,8 +3128,8 @@ use_options() { break else echo - crunch_fmt "No queuefile options found. Please make \ - another choice." + crunch_fmt "ERROR: No queuefile options found. \ + Please make another choice." echo fi ;; @@ -3821,7 +3830,7 @@ unset BUILDOPTIONS # TODO # REPO_ROOT # Directory containing all repository mirrors unset HAS_NCURSES # Set if the ncurses package is installed unset REPO_NAME # Currently active repository (e.g. SBo) -unset REPO_BRANCH # Currently active branch (e.g. 12.2) +unset REPO_BRANCH # Currently active branch (e.g. 13.0) unset REPO_DESC # Active branch's description unset REPO_TAG # Active branch's packages' tag unset REPO_TOOL # Active branch's fetch tool @@ -3938,12 +3947,12 @@ Options are: -s package(s) Specific search by specific package and, if found, display package information. -u Check for an update to sbopkg. - -v repo/branch Set the repository/branch (e.g. "-v SBo/12.2"). + -v repo/branch Set the repository/branch (e.g. "-v SBo/13.0"). If the repository name is not specified, sbopkg will first try with the default one. If no match is found, sbopkg will look for the first matching branch of any repository. - The default valid choices are SBo/{11.0,12.0,12.1,12.2} for - the SlackBuilds.org repository, SB64/master for the + The default valid choices are SBo/{11.0,12.0,12.1,12.2,13.0} + for the SlackBuilds.org repository, SB64/master for the builds.Slamd64.com repository and local/local for the local repository). @@ -4122,7 +4131,6 @@ else if [[ $SYNC ]]; then crunch_fmt "Syncing with the remote repository into $REPO_DIR." sync_repo - echo "Finished sync." fi if [[ -n $SEARCH ]]; then