cookutils diff modules/pkgdb @ rev 949
cook: specify we use busybox fold (don't fail when remove coreutils-file-format or coreutils-multicall containing fold); cooker: remove package from packages.info DB too.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Jul 20 05:07:33 2017 +0300 (2017-07-20) |
parents | 5f0da70605b6 |
children | 4e8c86306ce2 |
line diff
1.1 --- a/modules/pkgdb Fri Jun 16 01:10:16 2017 +0300 1.2 +++ b/modules/pkgdb Thu Jul 20 05:07:33 2017 +0300 1.3 @@ -92,13 +92,15 @@ 1.4 1.5 _ 'Creating lists from "%s"' "$WOK" | dblog 1.6 cd $WOK 1.7 +rsumf=$(mktemp) 1.8 for i in *; do 1.9 [ -d "$WOK/$i/taz" ] || continue 1.10 1.11 for j in $(ls $WOK/$i/taz | sort); do 1.12 - [ -f "$WOK/$i/taz/$j/receipt" ] || continue 1.13 + pack="$i/taz/$j" 1.14 + [ -f "$WOK/$pack/receipt" ] || continue 1.15 unset_receipt 1.16 - . $i/taz/$j/receipt 1.17 + . $pack/receipt 1.18 1.19 if [ -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" -o \ 1.20 -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION-$ARCH.tazpkg" ]; then 1.21 @@ -122,9 +124,15 @@ 1.22 # and will substitute them all 1.23 SIZES=$(echo $PACKED_SIZE $UNPACKED_SIZE | sed 's|\.0||g') 1.24 DEPENDS=$(echo $DEPENDS) # remove newlines from some receipts 1.25 - MD5="$(fgrep " $PACKAGE-$VERSION$EXTRAVERSION.tazpkg" $PKGS/packages.md5 | awk '{print $1}')" 1.26 + 1.27 + #MD5="$(fgrep " $PACKAGE-$VERSION$EXTRAVERSION.tazpkg" $PKGS/packages.md5 | awk '{print $1}')" 1.28 + cp $pack/md5sum $rsumf 1.29 + md5sum $pack/receipt | sed 's| [^ ]*/| |' >> $rsumf 1.30 + [ -e "$pack/description.txt" ] && md5sum $pack/description.txt | sed 's| [^ ]*/| |' >> $rsumf 1.31 + rsum=$(md5sum $rsumf | awk '{print $1}') 1.32 + 1.33 cat >> $PKGS/packages.info <<EOT 1.34 -$PACKAGE $VERSION$EXTRAVERSION $CATEGORY $SHORT_DESC $WEB_SITE $TAGS $SIZES $DEPENDS $MD5 $PROVIDE 1.35 +$PACKAGE $VERSION$EXTRAVERSION $CATEGORY $SHORT_DESC $WEB_SITE $TAGS $SIZES $DEPENDS $rsum $PROVIDE 1.36 EOT 1.37 1.38 # packages.equiv is used by tazpkg install to check depends. 1.39 @@ -152,6 +160,8 @@ 1.40 fi 1.41 done 1.42 done 1.43 +rm $rsumf 1.44 + 1.45 1.46 # Display list size. 1.47 _ 'Done: %s (%s)' 'packages.desc' "$(filesize $PKGS/packages.desc)" | dblog