From: Ben Gras Date: Fri, 17 Feb 2012 14:26:46 +0000 (+0000) Subject: Fixes to allow versionless packages on cd X-Git-Tag: v3.2.0~19 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/index.css?a=commitdiff_plain;h=5b2ae44f78fb75808d8f047881fe61ae2173b678;p=minix.git Fixes to allow versionless packages on cd --- diff --git a/tools/packages.install b/tools/packages.install index bcd28b731..32ea202b5 100644 --- a/tools/packages.install +++ b/tools/packages.install @@ -1,79 +1,74 @@ -9e-1.0 -apr-1.4.2 -apr-util-1.3.10 -autoconf-2.65nb2 -automake-1.11.1 -bash-2.05.2.7nb10 -bash-4.1nb1 -bchunk-1.2.0 -bcrypt-1.1 -binutils-2.17nb2 -bison-2.4.2nb1 -curl-7.20.0 -db4-4.8.30 -diffutils-2.8.1nb4 -digest-20080510 -doom1-1.8 -expat-2.0.1nb2 -f2c-20090411nb4 -figlet-2.2.2nb1 -flex-2.5.35nb1 -gawk-3.1.7 -gcc44-4.4.3nb3 -gettext-lib-0.14.6 -gettext-tools-0.14.6nb1 -gmake-3.81 -gmp-5.0.1 -grep-2.5.3 -groff-1.20.1nb2 -gsed-4.2.1 -gtexinfo-4.12 -gzip-1.3.12nb3 -lcov-1.7 -libiberty-1.0nb2 -libiconv-1.12nb1 -libidn-1.19 -libtool-base-2.2.6bnb4 -lua-5.1.4nb2 -m4-1.4.14 -mdf2iso-0.3.0 -mpfr-2.4.2.3nb1 -naim-0.11.8.3.1 -nano-2.2.4 -nawk-20050424nb3 -ncurses-5.7nb3 -neon-0.29.3 -openssh-5.5.1 -openssl-0.9.8o -p5-Digest-SHA1-2.12 -p5-Error-0.17016 -p5-enum-1.016nb1 -p5-pkgsrc-Dewey-1.1 -patch-2.5.4nb2 -pax-20080110 -pdksh-5.2.14nb5 -perl-5.10.1nb1 -pkg-config-0.23nb1 -pkg_install-info-4.5nb3 -pkg_leaves-1.2 -pkgdep-1.0 -pkgdepgraph-2.8 -pkgdiff-0.122 -pkgin-0.3.3.1nb1 -pkglint-4.93 -png-1.4.2 -pth-2.0.7 -readline-6.1 -rsync-3.0.7 -scmgit-base-1.7.0.5 -sqlite3-3.6.23.1 -subversion-base-1.6.9nb1 -sudo-1.7.2p7 -unzip-6.0 -url2pkg-2.12 -vim-7.2.442 -vim-share-7.2.442 -x11-6.8.2 -x11-links-0.50 -zip-3.0nb2 -minix-all-1nb1 +9e- +apr-1 +apr-util- +autoconf- +automake- +bash-2 +bash-4 +bchunk- +bcrypt- +binutils- +bison- +curl- +diffutils- +digest- +doom1- +expat- +f2c- +figlet-2 +flex- +gawk- +gcc44- +gettext-lib- +gettext-tools- +gmake- +gmp- +grep- +groff- +gsed- +gtexinfo- +gzip- +lcov- +libiberty- +libiconv- +libidn- +libtool-base- +lua- +m4- +mdf2iso- +mpfr- +naim- +nano- +nawk- +ncurses- +neon- +openssh- +openssl- +p5-Digest-SHA1- +p5-Error- +p5-enum- +p5-pkgsrc-Dewey- +patch- +pax- +pdksh- +pkg-config- +pkg_install-info- +pkg_leaves- +pkgdep- +pkgdepgraph- +pkgdiff- +pkgin- +pkglint- +png- +pth- +readline- +rsync- +scmgit-base- +sqlite3- +unzip- +url2pkg- +vim-7 +vim-share- +x11-6 +x11-links- +zip- diff --git a/tools/release.functions b/tools/release.functions index 1f7c7e5fc..537993ddb 100644 --- a/tools/release.functions +++ b/tools/release.functions @@ -33,15 +33,25 @@ retrieve() { dir=$1 list=`pwd`/$2 - url=${PACKAGEURL} - ( - cd $dir || exit 1 - echo " * Updating $dir - from $url - with $list" - files=`awk <$list '{ print "'$url'/" $1 ".tgz" }'` - fetch -r $files || true + URLS="" + echo "Retrieving packages form $PACKAGEURL" + ( + cd $dir || exit 1 + SUMMARY=pkg_summary + rm -f pkg_summary* || true + fetch $PACKAGEURL/$SUMMARY.bz2 + bzip2 -d $SUMMARY.bz2 + cat $list | while read name + do pkgname="`fgrep PKGNAME=${name} $SUMMARY | sed 's/PKGNAME=//g'`" + if [ `echo $pkgname | wc -w` -ne 1 ] + then echo " *** Could not resolve $name (not found or too many matches: $pkgname) ***" + else echo Getting $pkgname + fetch -r ${PACKAGEURL}/${pkgname}.tgz + fi + echo -n "." + done ) + echo done } cd_root_changes() @@ -135,17 +145,18 @@ copy_local_packages() echo "" >$PACKAGEDIR/All/$index echo " * Transfering $PACKAGEDIR to $RELEASEPACKAGE" - for p in `cat $PACKAGELIST` - do if [ -f $PACKAGEDIR/All/$p.tgz ] + for pkgprefix in `cat $PACKAGELIST` + do realfn="`echo $PACKAGEDIR/All/${pkgprefix}*.tgz`" + if [ -f "$realfn" ] then # Copy package and create package's index ( + p="`basename $realfn`" cd $PACKAGEDIR/All - cp $p.tgz $RELEASEPACKAGE/ + cp $p $RELEASEPACKAGE/ - f=$p.tgz - indexname=$indexpath/$f.$index - pkg_info -X $f >$indexname + indexname=$indexpath/$p.$index + pkg_info -X $p >$indexname if [ ! -f $indexname ] then echo Missing $indexname. @@ -161,7 +172,7 @@ copy_local_packages() cat $indexname >>$PACKAGEDIR/All/$index ) else - echo "Can't copy $PACKAGEDIR/$p.tgz. Missing." + echo "Can't find $pkgprefix Missing." fi done