# HG changeset patch # User Aleksej Bobylev # Date 1496868801 -10800 # Node ID 3719a0d2e2c589b2ba67abae0266f08bf91aaf1f # Parent d30a093674f6a00b00fecdad9bdbcb1d39022dca cook: allow include $PACKAGE into $SPLIT to define desired packaging order. diff -r d30a093674f6 -r 3719a0d2e2c5 cook --- a/cook Wed Jun 07 22:36:09 2017 +0300 +++ b/cook Wed Jun 07 23:53:21 2017 +0300 @@ -355,7 +355,7 @@ _ ' # : Packed : Compressed : Files : Package name' separator - pkgi=1 - for i in $PACKAGE $SPLIT; do + for i in $(all_names); do fs=$(du -sh $WOK/$pkg/taz/$i-$VERSION | awk '{print $1}') pkgname="$i-$VERSION.tazpkg" size=$(ls -lh $PKGS/$pkgname | awk '{print $5}') @@ -1079,12 +1079,27 @@ } +# Return all the names of packages bundled in this receipt + +all_names() { + local split=" $SPLIT " + if [ "${split/ $PACKAGE /}" != "$split" ]; then + # $PACKAGE included somewhere in $SPLIT (probably in the end). + # We should build packages in the order defined in the $SPLIT. + echo $SPLIT + else + # We'll build the $PACKAGE, then all defined in the $SPLIT. + echo $PACKAGE $SPLIT + fi +} + + # v2: pack all packages using compiled files packall() { set_paths if head -n1 "$pkgdir/receipt" | fgrep -q 'v2'; then - for i in $PACKAGE $SPLIT; do + for i in $(all_names); do unset TAGS DEPENDS CAT CONFIG_FILES PROVIDE SUGGESTED DATABASE_FILES TAZPANEL_DAEMON packit $i done