diff --git a/src/README b/src/README index 0759dc7..8658c0a 100644 --- a/src/README +++ b/src/README @@ -513,6 +513,19 @@ Default is "package" ----- +DETAILED_INFO + +By default, "slackpkg info " show the metadata and the package +description. +This is the same if you select DETAILED_INFO=none + +DETAILED_INFO=basic show the repository on the repository, and the url to +download it. + +DETAILED_INFO=filelist alo show the full file list of the package. + +----- + STRICTGPG slackpkg was bird to install slackware packages from official mirrors; they diff --git a/src/slackpkgplus.sh b/src/slackpkgplus.sh index 07191e6..f13b443 100755 --- a/src/slackpkgplus.sh +++ b/src/slackpkgplus.sh @@ -26,6 +26,7 @@ if [ -e $CONF/slackpkgplus.conf ];then EXTCACHEUPDATE=$CACHEUPDATE EXTDOWNLOADONLY=$DOWNLOADONLY EXTSTRICTGPG=$STRICTGPG + EXTDETAILED_INFO=$DETAILED_INFO . $CONF/slackpkgplus.conf @@ -41,6 +42,7 @@ if [ -e $CONF/slackpkgplus.conf ];then CACHEUPDATE=${EXTCACHEUPDATE:-$CACHEUPDATE} DOWNLOADONLY=${EXTDOWNLOADONLY:-$DOWNLOADONLY} STRICTGPG=${EXTSTRICTGPG:-$STRICTGPG} + DETAILED_INFO=${EXTDETAILED_INFO:-$DETAILED_INFO} USEBLACKLIST=true if [ "$USEBL" == "0" ];then @@ -71,6 +73,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then # function givepriority() # function searchPackages() # function searchlistEX() + # function mode_info() # function showlist() // dialog=on # function showlist() // dialog=off @@ -118,6 +121,10 @@ if [ "$SLACKPKGPLUS" = "on" ];then # Override cleanup() to improve log messages and debug functions # function cleanup(){ + if [ "$CMD" == "info" ];then + DETAILED_INFO=${DETAILED_INFO:-none} + [[ "$DETAILED_INFO" != "none" ]]&&more_info + fi rm -f ${TMPDIR}/waiting if [ "$CMD" == "update" ];then if [ "$ANSWER" != "Y" ] && [ "$ANSWER" != "y" ]; then @@ -1030,6 +1037,32 @@ if [ "$SLACKPKGPLUS" = "on" ];then done|sort } # END function searchlistEX() + # Show detailed info for slackpkg info + # + function more_info(){ + echo + cat $WORKDIR/pkglist|grep -E "^[^ ]* $NAME "|while read repository name version arch tag namepkg fullpath ext;do + echo "Package: $namepkg" + echo "Repository: ${repository/SLACKPKGPLUS_/}" + echo "Path: ${fullpath/\/SLACKPKGPLUS_${repository/SLACKPKGPLUS_/}/}/$namepkg.$ext" + URLFILE=${SOURCE}${fullpath}/${namepkg}.${ext} + if echo $URLFILE|grep -q /SLACKPKGPLUS_;then + PREPO=$(echo $URLFILE|sed -r 's#^.*/SLACKPKGPLUS_([^/]+)/.*$#\1#') + URLFILE=$(echo $URLFILE|sed "s#^.*/SLACKPKGPLUS_$PREPO/#${MIRRORPLUS[$PREPO]}#") + fi + echo "Url: ${URLFILE/.\//}" + if [ "$DETAILED_INFO" == "filelist" ];then + FILELIST="$(zgrep ^${fullpath/\/${repository}/}/$namepkg.$ext $WORKDIR/$repository-filelist.gz 2>/dev/null)" + if [ -z "$FILELIST" ];then + echo "Filelist: no file list available" + else + echo "Filelist:" + echo "$FILELIST"|sed "s/ /\n/g"|tail +2|sed 's/^/ /' + fi + fi + echo + done + } if [ "$DIALOG" = "on" ] || [ "$DIALOG" = "ON" ]; then # Slackpkg+ Dialog functions @@ -1181,7 +1214,9 @@ if [ "$SLACKPKGPLUS" = "on" ];then fi # (DIALOG=on/off) - #### ===== SHOWLIST FUNCTIONS ====== ###### + + + #### ===== END SHOWLIST FUNCTIONS ====== ###### function debug(){ diff --git a/src/slackpkgplus.x86.sample b/src/slackpkgplus.x86.sample index 781838f..34cf89a 100644 --- a/src/slackpkgplus.x86.sample +++ b/src/slackpkgplus.x86.sample @@ -42,6 +42,9 @@ SENSITIVE_SEARCH=on # Select the show order in dialogbox. Available "package" "repository" "tag" "path" "arch" SHOWORDER=package +# Allow to show more details of the package in slackpkg info . Accept "none", "basic", "filelist" +DETAILED_INFO=none + # Enable (on) / Disable (off) a Strict GPG Check. A repository should contains packages signed # with the only original GPG-KEY. In some custom repository may be wanted to mix eterogeneous # packages; to use that repository set Strict GPG Check to off. P.S: a repository can diff --git a/src/slackpkgplus.x86_64.sample b/src/slackpkgplus.x86_64.sample index 46f7f52..12dd15b 100644 --- a/src/slackpkgplus.x86_64.sample +++ b/src/slackpkgplus.x86_64.sample @@ -50,6 +50,9 @@ SENSITIVE_SEARCH=on # Select the show order in dialogbox. Available "package" "repository" "tag" "path" "arch" SHOWORDER=package +# Allow to show more details of the package in slackpkg info . Accept "none", "basic", "filelist" +DETAILED_INFO=none + # Enable (on) / Disable (off) a Strict GPG Check. A repository should contains packages signed # with the only original GPG-KEY. In some custom repository may be wanted to mix eterogeneous # packages; to use that repository set Strict GPG Check to off. P.S: a repository can