From ef1e7bacb5fa054c5ac03011434d1da4144a9fc1 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Sun, 20 Dec 2015 13:26:19 +0100 Subject: [PATCH] Version 1.6.1 - 20/Dec/2015 - Added DOWNLOADONLY to just download packages without installing it --- ChangeLog.txt | 5 ++++- src/ChangeLog.txt | 5 ++++- src/README | 24 ++++++++++++++++++++++-- src/slackpkgplus.sh | 17 ++++++++++++++++- src/slackpkgplus.x86.sample | 4 ++++ src/slackpkgplus.x86_64.sample | 4 ++++ src/zdialogplus.sh | 6 +++++- 7 files changed, 59 insertions(+), 6 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 7096946..ff7905a 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +Version 1.6.1 - 20/Dec/2015 + - Added DOWNLOADONLY to just download packages without installing it + Version 1.6.0 - 19/Dec/2015 - Added CACHEUPDATE. You can now speedup the slackpkg update by caching metadata files. @@ -21,7 +24,7 @@ Version 1.5.1 - 20/Nov/2015 Note for Slackware 14.1 users: slackware-current introduce important bug fix in slackpkg 2.82.0-14 (see Slackware ChangeLog) not backported in slackware 14.1; it is not mandatory but you are encouraged to upgrade it by download it - manually; be sure to graylist slackpkg to avoid an automatic downgrade. + manually; be sure to greylist slackpkg to avoid an automatic downgrade. - The trailing slash in MIRRORPLUS[] is now optional (thanks to phenixia2003 and Didier Spaier) - Added DOWNLOADCMD option to add a custom downloader diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index 7096946..ff7905a 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,6 @@ +Version 1.6.1 - 20/Dec/2015 + - Added DOWNLOADONLY to just download packages without installing it + Version 1.6.0 - 19/Dec/2015 - Added CACHEUPDATE. You can now speedup the slackpkg update by caching metadata files. @@ -21,7 +24,7 @@ Version 1.5.1 - 20/Nov/2015 Note for Slackware 14.1 users: slackware-current introduce important bug fix in slackpkg 2.82.0-14 (see Slackware ChangeLog) not backported in slackware 14.1; it is not mandatory but you are encouraged to upgrade it by download it - manually; be sure to graylist slackpkg to avoid an automatic downgrade. + manually; be sure to greylist slackpkg to avoid an automatic downgrade. - The trailing slash in MIRRORPLUS[] is now optional (thanks to phenixia2003 and Didier Spaier) - Added DOWNLOADCMD option to add a custom downloader diff --git a/src/README b/src/README index 68e0e2c..e99804d 100644 --- a/src/README +++ b/src/README @@ -424,6 +424,26 @@ the file. Set CACHEUPDATE=on to enable it. Default is 'off' + +----- + +DOWNLOADONLY Option + +Sometimes may be useful to just download only the packages, and in a second moment +install it. For example for large upgrades I can download all in the night while +I sleep and then install all in the morning. + +Also it is good when the 'install-new' give you a large list of packages to install. + +You can set DOWNLOANDONLY=on in slackpkgplus.conf to do that or use it in cmdline. + +For example, to upgrading from slackware 14.1 to slackware 14.2: +# DOWNLOADONLY=on slackpkg install-new +# DOWNLOADONLY=on slackpkg upgrade-all +# slackpkg install-new +# slackpkg upgrade-all +# slackpkg clean-system + ----- ALLOW32BIT @@ -446,8 +466,8 @@ Sometime you may want that slackpkg+ does not install some package in the upgrad process. To do that you must uncheck the package everytime or add it in the 'blacklist' file. The first method may be onerous when you use upgrade-all frequently. The second method does not allow you to know which package version is available. -A thirdy method is to put it in the 'graylist' file. -All packages listed in graylist will be available to install and listed in slackpkg +A thirdy method is to put it in the 'greylist' file. +All packages listed in greylist will be available to install and listed in slackpkg dialog, but they will be unchecked by default so you are sure to not install it wrongly. You may decide also to greylist one entire repository. A good idea is to greylist diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index c908a62..9b131e0 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -22,6 +22,7 @@ if [ -e $CONF/slackpkgplus.conf ];then EXTTAG_PRIORITY=$TAG_PRIORITY EXTSENSITIVE_SEARCH=$SENSITIVE_SEARCH EXTCACHEUPDATE=$CACHEUPDATE + EXTDOWNLOADONLY=$DOWNLOADONLY . $CONF/slackpkgplus.conf @@ -35,6 +36,7 @@ if [ -e $CONF/slackpkgplus.conf ];then TAG_PRIORITY=${EXTTAG_PRIORITY:-$TAG_PRIORITY} SENSITIVE_SEARCH=${EXTSENSITIVE_SEARCH:-$SENSITIVE_SEARCH} CACHEUPDATE=${EXTCACHEUPDATE:-$CACHEUPDATE} + DOWNLOADONLY=${EXTDOWNLOADONLY:-$DOWNLOADONLY} USEBLACKLIST=true if [ "$USEBL" == "0" ];then @@ -47,13 +49,18 @@ fi if [ "$SLACKPKGPLUS" = "on" ];then + if [ "$DOWNLOADONLY" == "on" ];then + DELALL=off + DOWNLOAD_ALL=on + fi + if [ -z "$VERBOSE" ];then VERBOSE=1 fi - SPKGPLUS_VERSION="1.6.0" + SPKGPLUS_VERSION="1.6.1" VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION" @@ -892,6 +899,10 @@ function showlist() { done DELALL="$OLDDEL" fi + if [ "$DOWNLOADONLY" == "on" ];then + echo "Download only.. not upgraded!" + return + fi ls -1 $ROOT/var/log/packages > $TMPDIR/tmplist for i in $SHOWLIST; do @@ -919,6 +930,10 @@ function showlist() { done DELALL="$OLDDEL" fi + if [ "$DOWNLOADONLY" == "on" ];then + echo "Download only.. not installed!" + return + fi for i in $SHOWLIST; do INSTALL_T='installed: ' if [ -e $ROOT/var/log/packages/$(echo $i|sed 's/\.t.z//') ];then diff --git a/src/slackpkgplus.x86.sample b/src/slackpkgplus.x86.sample index 3d91722..ad1bddb 100644 --- a/src/slackpkgplus.x86.sample +++ b/src/slackpkgplus.x86.sample @@ -26,6 +26,10 @@ WGETOPTS="--timeout=20 --tries=2" # process by downloading just new files (see README). Disabled by default (off) CACHEUPDATE=off +# You can download-only by setting DOWNLOADONLY to 'on'. You may (you should) also use it in commandline +# for example: "DOWNLOADONLY=on slackpkg upgrade-all". Useful for large upgrades. +#DOWNLOADONLY=off + # Enable (on) / Disable (off) notification events (see notifymsg.conf) #ENABLENOTIFY=off diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index 92e10a5..92eabaa 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -34,6 +34,10 @@ WGETOPTS="--timeout=20 --tries=2" # process by downloading just new files (see README). Disabled by default (off) CACHEUPDATE=off +# You can download-only by setting DOWNLOADONLY to 'on'. You may (you should) also use it in commandline +# for example: "DOWNLOADONLY=on slackpkg upgrade-all". Useful for large upgrades. +#DOWNLOADONLY=off + # Enable (on) / Disable (off) notification events (see notifymsg.conf) #ENABLENOTIFY=off diff --git a/src/zdialogplus.sh b/src/zdialogplus.sh index ebd64af..02854c4 100755 --- a/src/zdialogplus.sh +++ b/src/zdialogplus.sh @@ -75,7 +75,11 @@ if [ "$SLACKPKGPLUS" = "on" ];then awk '{ NF=3 ; print $0 }' $TMPDIR/dialog2.tmp > $TMPDIR/dialog.tmp HINT="" fi - cat $TMPDIR/dialog.tmp|xargs dialog --title $2 --backtitle "slackpkg $VERSION" $HINT --checklist "Choose packages to $2:" 19 70 13 2>$TMPDIR/dialog.out + DTITLE=$2 + if [ "$DOWNLOADONLY" == "on" ];then + DTITLE="$DTITLE (download only)" + fi + cat $TMPDIR/dialog.tmp|xargs dialog --title "$DTITLE" --backtitle "slackpkg $VERSION" $HINT --checklist "Choose packages to $2:" 19 70 13 2>$TMPDIR/dialog.out case "$?" in 0|123) dialog --clear