From 11b4dfefd91b26a5aa6b1124acbd063082139be6 Mon Sep 17 00:00:00 2001 From: Matteo Rossini Date: Mon, 6 Jun 2016 20:03:52 +0200 Subject: [PATCH] Version 1.7.0rc3 - 03/Jun/2016 This could be the last batch of updates before 1.7.0 stable, so please test! - dialog did no more trap develop errors (but if occurs please report it) - givepriority did drop matched package if it is the first in pkglist - Added /usr/src/slackpkg+-*/slackpkg.bash_completation. Edit it for instructions. --- ChangeLog.txt | 9 ++++- src/CHANGES | 39 +++++++++++++++++++++ src/ChangeLog.txt | 7 ++++ src/slackpkg+.SlackBuild | 1 + src/slackpkg.bash_completion | 68 ++++++++++++++++++++++++++++++++++++ src/slackpkgplus.sh | 2 +- 6 files changed, 124 insertions(+), 2 deletions(-) create mode 100644 src/slackpkg.bash_completion diff --git a/ChangeLog.txt b/ChangeLog.txt index 90382bb..7ade6a2 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,4 +1,11 @@ -Version 1.7.0rc2 - 22/May/2016 +Version 1.7.0rc3 - 03/Jun/2016 + This could be the last batch of updates before 1.7.0 stable, so please test! + - dialog did no more trap develop errors (but if occurs please report it) + - givepriority did drop matched package if it is the first in pkglist + - Added /usr/src/slackpkg+-*/slackpkg.bash_completation. Edit it for + instructions. + +Version 1.7.0rc2 - 02/Jun/2016 - ChangeLog did not skipped for dir:/ repositories - ChangeLog did not show correctly certain slackware changelog - dir:/ repositories does not need STRICTGPG nor GPG key; however remember diff --git a/src/CHANGES b/src/CHANGES index e530124..df15d90 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -133,10 +133,21 @@ manually. For instructions read notes in the code: /usr/libexec/slackpkg/zchangelog.sh +- Added bash completation. You can do basic search packages directly from + commandline with a simple . slackpkg search emacs_ + emacs emacspeak emacspeak-ss + Copy /usr/src/slackpkg+-*/slackpkg.bash_completation in /etc/bash_completation.d == The track of the 1.7 developments == +Version 1.7.0rc3 - 03/Jun/2016 + This could be the last batch of updates before 1.7.0 stable, so please test! + - dialog did no more trap develop errors (but if occurs please report it) + - givepriority did drop matched package if it is the first in pkglist + - Added /usr/src/slackpkg+-*/slackpkg.bash_completation. Edit it for + instructions. + Version 1.7.0rc2 - 02/Jun/2016 - ChangeLog did not skipped for dir:/ repositories - ChangeLog did not show correctly certain slackware changelog @@ -216,6 +227,34 @@ Version 1.7.b1 - 18/Jan/2016 - Fixed a bug on x86 hosts when a repository contains also x86_64 packages - Some fix in Strict GPG Check. +Version 1.7.a6 - 17/Jan/2016 + - 'slackpkg search' if finds more duplicated packages with different + versions from many repository, now show all, marking it as "masked" the + packages that will not be installed due the priority + - Fixed a regression that drop PKGS_PRIORITY function in slackpkg upgrade + +Version 1.7.a5 - 16/Jan/2016 + - Improved greylist. Also, now it allow to match the name in installed packages + - Fixed download GPG-KEY; it did not show the correct repository for gpg key + - Fixed previous patch for $ROOT problem (did broke 'slackpkg search command') + +Version 1.7.a4 - 12/Jan/2016 + - Improved performance + - Fixed search that may fails to detect repository in certain conditions + - slackpkg search shows the repository name for the official repository + - Fixed a bug in gpg check when a repository name contains a '-' character + - Fixed a bug in slackpkg upgrade when used with $ROOT + +Version 1.7.a3 - 10/Jan/2015 + - Do not show notices when running slackpkg update or slackpkg check-updates + (thanks to yars068) + - Fixed a bug on x86 hosts when a repository contains also x86_64 packages + +Version 1.7.a2 - 06/Jan/2015 + - Remember user to (re)run 'slackpkg update gpg' + - Fixed Download Only when upgrade base packages (aaa_base, pkgtools...) + - Quick output on Cached Download + Version 1.7.a1 - 04/Jan/2016 It's the time for a stable version of slackpkg+. Currently it is just a development version to fix older feature and add/test new. I'll need more diff --git a/src/ChangeLog.txt b/src/ChangeLog.txt index 2634821..7ade6a2 100644 --- a/src/ChangeLog.txt +++ b/src/ChangeLog.txt @@ -1,3 +1,10 @@ +Version 1.7.0rc3 - 03/Jun/2016 + This could be the last batch of updates before 1.7.0 stable, so please test! + - dialog did no more trap develop errors (but if occurs please report it) + - givepriority did drop matched package if it is the first in pkglist + - Added /usr/src/slackpkg+-*/slackpkg.bash_completation. Edit it for + instructions. + Version 1.7.0rc2 - 02/Jun/2016 - ChangeLog did not skipped for dir:/ repositories - ChangeLog did not show correctly certain slackware changelog diff --git a/src/slackpkg+.SlackBuild b/src/slackpkg+.SlackBuild index 5c67030..274bad2 100644 --- a/src/slackpkg+.SlackBuild +++ b/src/slackpkg+.SlackBuild @@ -66,6 +66,7 @@ cp $CWD/setupmultilib.sh usr/doc/slackpkg+-$VERSION/ cp $CWD/checkrepos.sh usr/doc/slackpkg+-$VERSION/ cp $CWD/zchangelog.sh usr/libexec/slackpkg/zchangelog.sh cp $CWD/slackpkg+.SlackBuild usr/doc/slackpkg+-$VERSION/ +cp $CWD/slackpkg.bash_completion usr/doc/slackpkg+-$VERSION/ cp $CWD/slackpkgplus.*.sample usr/doc/slackpkg+-$VERSION/ cp $CWD/greylist etc/slackpkg/greylist.new cp $CWD/slack-desc install/ diff --git a/src/slackpkg.bash_completion b/src/slackpkg.bash_completion new file mode 100644 index 0000000..122f6dd --- /dev/null +++ b/src/slackpkg.bash_completion @@ -0,0 +1,68 @@ +# Slackware slackpkg(8) completion -*- shell-script -*- +# +# This add the bash completation for slackpkg command. +# To enable it copy this file in /etc/bash_completion.d/ +# +# Be sure to install the bash-completation package +# +# # slackpkg install bash-completation +# + +_slackpkg() +{ + local cur prev words cword + _init_completion || return + + local special i wc + wc=${#words[@]} + + for (( i=0; i < ${#words[@]}-1; i++ )); do + if [[ ${words[i]} == @(install|remove|search|upgrade|reinstall|clean-system|upgrade-all|install-new|search|file-search|info|update|new-config|check-updates) ]]; then + special=${words[i]} + break + fi + done + + if [[ -n $special ]]; then + case $special in + upgrade|remove) COMPREPLY=( $( cd /var/log/packages; ls -- $cur* 2>/dev/null|rev|cut -f4- -d-|rev ) ) ;; + update) (( i++ )) ; (( wc-- )) ; [ $i -eq $wc ]&& COMPREPLY=( $( echo gpg|grep "^$cur" ) ) ;; + search) COMPREPLY=( $( grep -- "$cur" /var/lib/slackpkg/pkglist 2>/dev/null|awk '{print $2}'|grep -- "$cur" ) ) ;; + info) COMPREPLY=( $( grep -- " $cur" /var/lib/slackpkg/pkglist 2>/dev/null|awk '{print $2}'|grep -- "^$cur" ) ) ;; + install) COMPREPLY=( $(cd /var/log/packages + grep "^[^ ]* $cur" /var/lib/slackpkg/pkglist 2>/dev/null|awk '{print $2}' | + grep -v -f <(ls -- $cur* 2>/dev/null|rev|cut -f4- -d-|rev|sed -r -e "s/^/^/" -e "s/$/$/") + ) ) + ;; + reinstall) [ ! -z "$cur" ]&& COMPREPLY=( $( cd /var/log/packages + grep "^[^ ]* $cur" /var/lib/slackpkg/pkglist 2>/dev/null| + grep -f <(ls -- $cur* 2>/dev/null) |awk '{print $2}' + ) ) + ;; + update) COMPREPLY=( gpg ) ;; + esac + return 0 + fi + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W ' + -delall=off -checkmd5=off -checkgpg=off -checksize=on + -postinst=off -onoff=off -download_all=off -dialog=off + -batch=on -only_new_dotnew=on + -use_includes=off -spinning=off -default_answer=yes + ' -- "$cur" ) ) + else + + COMPREPLY=( $( compgen -W ' + install remove search upgrade reinstall + clean-system upgrade-all install-new + search file-search + info update new-config check-updates + - + ' -- "$cur" ) ) + + fi + + return 0 +} && +complete -F _slackpkg slackpkg diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 7ac8af8..2311e85 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -1545,7 +1545,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi - SPKGPLUS_VERSION="1.7.0rc2" + SPKGPLUS_VERSION="1.7.0rc3" VERSION="$VERSION / slackpkg+ $SPKGPLUS_VERSION"