# HG changeset patch # User Aleksej Bobylev # Date 1521688472 -7200 # Node ID 0ff8d93e88553f0daee7fb796a06ff9f99d598f5 # Parent 5a63ab7642f2c19eb246f79fa5461a498af8d306 modules/deps: provide `cook --deps --quiet` quiet mode; cooker: provide `cooker autodeps` diff -r 5a63ab7642f2 -r 0ff8d93e8855 cooker --- a/cooker Wed Mar 21 14:05:08 2018 +0200 +++ b/cooker Thu Mar 22 05:14:32 2018 +0200 @@ -45,6 +45,7 @@ -T | tasks List existing cooker tasks. -t | task Executing specified task. -o | outgoing Find changes in wok that we can move to wok-hg. + autodeps Find dependencies for all packages in wok. EOT exit 0 @@ -581,6 +582,14 @@ compare_wok ;; + autodeps) + # Find dependencies for all packages in wok + cd $WOK + for pkg in *; do + cook $pkg --deps --quiet + done | tee $cache/autodeps + ;; + *) # Default is to cook all commits if not yet running. [ -n "$1" ] && usage diff -r 5a63ab7642f2 -r 0ff8d93e8855 modules/deps --- a/modules/deps Wed Mar 21 14:05:08 2018 +0200 +++ b/modules/deps Thu Mar 22 05:14:32 2018 +0200 @@ -337,12 +337,22 @@ unset IFS . $WOK/$1/receipt +if [ -n "$quiet" ]; then + sub='\n' +else + sub=' ' +fi + for pkg in $(all_names); do title 'Dependencies for "%s"' "$pkg" + [ -n "$quiet" ] && echo -n "$pkg: " IFS=$'\n' while read file; do tp_ldd "$WOK/$1/taz/$pkg-$VERSION/fs$file" - done < $WOK/$1/taz/$pkg-$VERSION/files.list | sort -u | grep -v "^$pkg$" | sed '/^$/d' + done < $WOK/$1/taz/$pkg-$VERSION/files.list \ + | sort -u | grep -v "^$pkg$" | sed '/^$/d' \ + | tr "$sub" ' ' + [ -n "$quiet" ] && echo done newline