wok diff cookutils/stuff/pkgdb-absolute.patch @ rev 24070
Up harfbuzz (2.8.1)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jul 06 14:28:49 2021 +0000 (2021-07-06) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/cookutils/stuff/pkgdb-absolute.patch Tue Jul 06 14:28:49 2021 +0000 1.3 @@ -0,0 +1,119 @@ 1.4 +Using the absolute paths is safer than using the relative ones, 1.5 +or using no paths at all. 1.6 + 1.7 +--- a/modules/pkgdb 1.8 ++++ b/modules/pkgdb 1.9 +@@ -50,8 +50,8 @@ 1.10 + { _ 'Cook pkgdb started: %s' "$(date "$(_ '+%%F %%R')")"; newline; } | dblog 1.11 + 1.12 + cd $PKGS 1.13 +-rm -f packages.* extra.list 1.14 +-touch packages.equiv 1.15 ++rm -f $PKGS/packages.* $PKGS/extra.list 1.16 ++touch $PKGS/packages.equiv 1.17 + 1.18 + _n 'Creating file "%s"' 'packages.list' | dblog 1.19 + ls -1 *.tazpkg | sed s'/.tazpkg//' > $PKGS/packages.list 1.20 +@@ -62,16 +62,16 @@ 1.21 + echo " ($(filesize $PKGS/packages.md5))" | dblog 1.22 + cp $PKGS/packages.md5 $PKGS/packages.toremove # list of unnecessary packages 1.23 + 1.24 +-md5sum packages.md5 | cut -d' ' -f1 > ID 1.25 +-( cat ./ID | tr $'\n' ' '; date -ur ./ID +%s ) > IDs # md5 and timestamp 1.26 ++md5sum $PKGS/packages.md5 | cut -d' ' -f1 > $PKGS/ID 1.27 ++( cat $PKGS/ID | tr $'\n' ' '; date -ur $PKGS/ID +%s ) > $PKGS/IDs # md5 and timestamp 1.28 + 1.29 + _n 'Creating file "%s"' 'descriptions.txt' | dblog 1.30 + rm $PKGS/descriptions.txt 2>/dev/null 1.31 + for i in $(ls $WOK | sort); do 1.32 + if [ -e "$WOK/$i/description.txt" ]; then 1.33 +- echo "$i" >> descriptions.txt 1.34 +- cat "$WOK/$i/description.txt" | sed 's|^$| |' >> descriptions.txt 1.35 +- echo >> descriptions.txt 1.36 ++ echo "$i" >> $PKGS/descriptions.txt 1.37 ++ cat "$WOK/$i/description.txt" | sed 's|^$| |' >> $PKGS/descriptions.txt 1.38 ++ echo >> $PKGS/descriptions.txt 1.39 + fi 1.40 + done 1.41 + echo " ($(filesize $PKGS/descriptions.txt))" | dblog 1.42 +@@ -81,9 +81,9 @@ 1.43 + cd $WOK 1.44 + for pkg in *; do 1.45 + unset_receipt 1.46 +- . $pkg/receipt 1.47 ++ . $WOK/$pkg/receipt 1.48 + # PACKED_SIZE and UNPACKED_SIZE are only in built receipt 1.49 +- [ -s $pkg/taz/*/receipt ] && . $pkg/taz/*/receipt 1.50 ++ [ -s $WOK/$pkg/taz/*/receipt ] && . $WOK/$pkg/taz/*/receipt 1.51 + 1.52 + if [ -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION.tazpkg" ] || \ 1.53 + [ -f "$PKGS/$PACKAGE-$VERSION$EXTRAVERSION-$ARCH.tazpkg" ]; then 1.54 +@@ -125,7 +125,7 @@ 1.55 + done 1.56 + 1.57 + # files.list provides a list of all packages files. 1.58 +- cat $pkg/taz/*/files.list | sed s/^/"$pkg: \0"/ >> \ 1.59 ++ cat $WOK/$pkg/taz/*/files.list | sed s/^/"$pkg: \0"/ >> \ 1.60 + $PKGS/files.list 1.61 + 1.62 + # list of unnecessary packages 1.63 +@@ -167,38 +167,38 @@ 1.64 + 1.65 + # files.list.lzma 1.66 + _n 'Creating file "%s"' 'files.list.lzma' | dblog 1.67 +-touch files.list 1.68 ++touch $PKGS/files.list 1.69 + # pkgs.slitaz.org strongly depends on list sorted by packages names 1.70 +-lzma e files.list files.list.lzma 1.71 ++lzma e $PKGS/files.list $PKGS/files.list.lzma 1.72 + echo " ($(filesize $PKGS/files.list.lzma))" | dblog 1.73 + 1.74 + # Pre-sorting filenames causes 10% smaller resulting lzma file 1.75 + _n 'Creating file "%s"' 'files-list.lzma' | dblog 1.76 +-cat files.list | sort -k2 -o files.list.sorted 1.77 +-lzma e files.list.sorted files-list.lzma 1.78 +-rm -f files.list files.list.sorted 1.79 ++cat $PKGS/files.list | sort -k2 -o $PKGS/files.list.sorted 1.80 ++lzma e $PKGS/files.list.sorted $PKGS/files-list.lzma 1.81 ++rm -f $PKGS/files.list $PKGS/files.list.sorted 1.82 + echo " ($(filesize $PKGS/files-list.lzma))" | dblog 1.83 + 1.84 +-[ -e files.list.md5 ] && rm files.list.md5 1.85 +-md5sum files-list.lzma | cut -d' ' -f1 | tr -d $'\n' > files-list.md5 1.86 ++[ -e $PKGS/files.list.md5 ] && rm $PKGS/files.list.md5 1.87 ++md5sum $PKGS/files-list.lzma | cut -d' ' -f1 | tr -d $'\n' > $PKGS/files-list.md5 1.88 + 1.89 + # Make bundle to fast recharge 1.90 + _n 'Creating file "%s"' 'bundle.tar.lzma' | dblog 1.91 +-[ -f bundle.tar.lzma ] && rm bundle.tar.lzma 1.92 ++[ -f $PKGS/bundle.tar.lzma ] && rm $PKGS/bundle.tar.lzma 1.93 + # Make sure to get "mirrors" file 1.94 + until [ -e 'mirrors' ]; do 1.95 + wget -q http://mirror1.slitaz.org/mirrors 1.96 + echo -n '.' | dblog; sleep 5 1.97 + done 1.98 + # Make sure to get "extra.list" file 1.99 +-until [ -e 'extra.list' ]; do 1.100 +- wget -q -O extra.list http://mirror1.slitaz.org/packages/get.list 1.101 ++until [ -e $PKGS/extra.list ]; do 1.102 ++ wget -q -O $PKGS/extra.list http://mirror1.slitaz.org/packages/get.list 1.103 + echo -n '.' | dblog; sleep 5 1.104 + done 1.105 +-busybox tar -chaf bundle.tar.lzma \ 1.106 ++busybox tar -chaf $PKGS/bundle.tar.lzma \ 1.107 + mirrors extra.list files-list.md5 packages.info descriptions.txt \ 1.108 + packages.desc packages.md5 packages.txt packages.list packages.equiv 1.109 +-rm ./mirrors 1.110 ++rm $PKGS/mirrors 1.111 + echo " ($(filesize $PKGS/bundle.tar.lzma))" | dblog 1.112 + 1.113 + # Display some info. 1.114 +@@ -242,7 +242,7 @@ 1.115 + 1.116 + cd $live 1.117 + _ 'Starting to generate flavors...' | dblog 1.118 +-rm -f flavors.list *.flavor 1.119 ++rm -f $live/flavors.list $live/*.flavor 1.120 + for i in $flavors/*; do 1.121 + fl=$(basename $i) 1.122 + _ 'Packing flavor "%s"' "$fl" | dblog