Slackpkg+ 0.9.7 released

Version 0.9.7 - 05/Sep/2013
  - Added install/upgrade/reinstall from disk with file:package.txz or dir:path,
    and remote with {http,ftp,htts}://site/path/[package.txz], unrepositorized
    packages. Please, read the README file.
  - Disallow to choice the download manager; slackpkg+ require wget AND lftp
This commit is contained in:
Matteo Rossini 2013-09-05 16:38:14 +02:00
parent 3e4edab0ac
commit 0835728cb1
4 changed files with 31 additions and 10 deletions

View file

@ -1,7 +1,8 @@
Version 20130905.3 - 05/Sep/2013
Version 0.9.7 - 05/Sep/2013
- Added install/upgrade/reinstall from disk with file:package.txz or dir:path,
and remote with {http,ftp,htts}://site/path/package.txz, unrepositorized
and remote with {http,ftp,htts}://site/path/[package.txz], unrepositorized
packages. Please, read the README file.
- Disallow to choice the download manager; slackpkg+ require wget AND lftp
Version 0.9.6.1 - 02/Sep/2013
- fixed a bug in new dialog function (thanks to phenixia2003)

View file

@ -1,7 +1,8 @@
Version 20130905.3 - 05/Sep/2013
Version 0.9.7 - 05/Sep/2013
- Added install/upgrade/reinstall from disk with file:package.txz or dir:path,
and remote with {http,ftp,htts}://site/path/package.txz, unrepositorized
and remote with {http,ftp,htts}://site/path/[package.txz], unrepositorized
packages. Please, read the README file.
- Disallow to choice the download manager; slackpkg+ require wget AND lftp
Version 0.9.6.1 - 02/Sep/2013
- fixed a bug in new dialog function (thanks to phenixia2003)

View file

@ -144,11 +144,13 @@ You can:
# slackpkg install file:package-1.0-noarch-1my.txz
or
# slackpkg upgrade file:../repo/package-2.0-noarch-1my.txz
2) install/upgrade/reinstall all file packages in a single directory (does not allow subtree) by passing the directory name following the "/" simbol (optionally absolute or relative path):
2) install/upgrade/reinstall all file packages in a single directory (does not allow subtree) by passing a directory name (optionally absolute or relative path):
# slackpkg install dir:/myrep
# slackpkg upgrade dir:./test/package/
# slackpkg reinstall .
'.' is an alias of 'dir:./', but only that alias exists. slackpkg install ./ or /myrepo/ or ./package.txz generate an error becouse in standard slackpkg you can specify a FILE as input, so in 'slackpkg install ./list.txt' list.txt must to be a plain file containing a list of packages to install (see man slackpkg)
If a directory contains the same package with two different version, slackpkg show the 'alfabetically' highest, so pkg-9.1 will be listed instead of pkg-8, ut pkg-9 will be also listed instead pkg-10. Sorry.. is a slackpkg limit!
Tip: if you want to use dir:/myrepo to track your installations and you have lost the original txz/tgz file, you can simply create an empty file; this fools slackpkg+ that only search for file name and not for contents (unless you do not run slackpkg reinstall on these packages ;))
@ -166,10 +168,17 @@ Some user shares packages on his personal site but without create metadata files
To install one of these packages you should download it and install manually.
Now you can specify a direct url for the package with slackpkg+ that automatically will download and install/upgrade the package.
You can:
1) install/upgrade/reinstall a single package by passing the full url:
# slackpkg install http://site/path/package-1.0-noarch-1my.txz
You may use that function to install a snapshot of slackpkg+ (that is not available with slackpkg upgrade slackpkg becouse is a beta)
# slackpg upgrade http://www.slakfinder.org/slackpkg+/pkg/slackpkg+-20130905.2-noarch-1mt.txz
# slackpkg upgrade http://www.slakfinder.org/slackpkg+/pkg/slackpkg+-20130905.2-noarch-1mt.txz
2) install/upgrade/reinstall all file packages in a single remote directory (does not allow subtree):
At the same of 'slackpkg install dir:..' syntax, you can specify a url-path:
# slackpkg install http://site/path/
even if the site owner does not create metadata.
That function require lftp and may fail if the server does not supports Directory Listing or if there is a index.html in path.
NOTE: slackpkg+ will skip the gpg and md5 check!!

View file

@ -495,7 +495,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
if [ ${localpath:0:1} != "/" ];then
localpath=$(pwd)/$localpath
fi
repository=file$(grep ^SLACKPKGPLUS_file ${TMPDIR}/pkglist-pre|wc -l)
repository=file$(grep ^SLACKPKGPLUS_file ${TMPDIR}/pkglist-pre|awk '{print $1}'|uniq|wc -l)
echo "./SLACKPKGPLUS_$repository/$package"|awk -f /usr/libexec/slackpkg/pkglist.awk >> ${TMPDIR}/pkglist-pre
MIRRORPLUS[$repository]="file:/$localpath/"
PRIORITYLIST=( ${PRIORITYLIST[*]} SLACKPKGPLUS_${repository}:$package )
@ -508,7 +508,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
if [ ! -d "$localpath" ];then
continue
fi
repository=dir$(grep ^SLACKPKGPLUS_dir ${TMPDIR}/pkglist-pre|wc -l)
repository=dir$(grep ^SLACKPKGPLUS_dir ${TMPDIR}/pkglist-pre||awk '{print $1}'|uniqwc -l)
if [ ${localpath:0:1} != "/" ];then
localpath=$(pwd)/$localpath
fi
@ -524,7 +524,7 @@ if [ "$SLACKPKGPLUS" = "on" ];then
# without manual download. You can use http,https,ftp repositories
elif echo "$pref" | egrep -q "^(https?|ftp)://.*/.*-[^-]+-[^-]+-[^\.]+\.t.z$" ;then
repository=$(echo "$pref" | cut -f1 -d":")
repository=$repository$(grep ^SLACKPKGPLUS_$repository[0-9] ${TMPDIR}/pkglist-pre|wc -l)
repository=$repository$(grep ^SLACKPKGPLUS_$repository[0-9] ${TMPDIR}/pkglist-pre|awk '{print $1}'|uniq|wc -l)
MIRRORPLUS[$repository]=$(dirname $pref)"/"
package=$(basename $pref)
echo "./SLACKPKGPLUS_$repository/$package"|awk -f /usr/libexec/slackpkg/pkglist.awk >> ${TMPDIR}/pkglist-pre
@ -532,6 +532,16 @@ if [ "$SLACKPKGPLUS" = "on" ];then
REPOPLUS=( ${repository} ${REPOPLUS[*]} )
package=$(cutpkg $package)
# You can specify 'slackpkg install http://mysite.org/myrepo' to list remote directory
elif echo "$pref" | egrep -q "^(https?|ftp)://.*/.*" ;then
repository=$(echo "$pref" | cut -f1 -d":")
repository=$repository$(grep ^SLACKPKGPLUS_$repository[0-9] ${TMPDIR}/pkglist-pre|awk '{print $1}'|uniq|wc -l)
lftp $pref -e "ls;quit" 2>/dev/null|awk '{print $NF}'|egrep '^.*-[^-]+-[^-]+-[^\.]+\.t.z$'|tac| \
awk '{print "./SLACKPKGPLUS_'$repository'/"$NF}'|awk -f /usr/libexec/slackpkg/pkglist.awk >> ${TMPDIR}/pkglist-pre
MIRRORPLUS[$repository]=$(echo "$pref" |sed 's_/$__')"/"
PRIORITYLIST=( ${PRIORITYLIST[*]} SLACKPKGPLUS_${repository}:.* )
REPOPLUS=( ${repository} ${REPOPLUS[*]} )
package=SLACKPKGPLUS_$repository
# You can specify 'slackpkg install reponame:packagename'
elif echo "$pref" | grep -q "[a-zA-Z0-9]\+[:][a-zA-Z0-9]\+" ; then