diff options
author | Pascal Terjan <pterjan@gmail.com> | 2015-03-22 00:10:51 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2015-03-22 00:10:51 +0000 |
commit | 0f1955c3f5f5868a13f1fe19eb2ce0baf3fc7852 (patch) | |
tree | 857f3f007dd332ef4d8d7d06413acc8e1945e5a4 | |
parent | a055d908c314d952e799de8168feb8286f7f668a (diff) | |
download | mgatools-0f1955c3f5f5868a13f1fe19eb2ce0baf3fc7852.tar mgatools-0f1955c3f5f5868a13f1fe19eb2ce0baf3fc7852.tar.gz mgatools-0f1955c3f5f5868a13f1fe19eb2ce0baf3fc7852.tar.bz2 mgatools-0f1955c3f5f5868a13f1fe19eb2ce0baf3fc7852.tar.xz mgatools-0f1955c3f5f5868a13f1fe19eb2ce0baf3fc7852.zip |
Speedup on cauldron by not running rpm -qp on all binary RPMS
-rwxr-xr-x | mga-move-pkg | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mga-move-pkg b/mga-move-pkg index 120bb81..a3016ba 100755 --- a/mga-move-pkg +++ b/mga-move-pkg @@ -187,12 +187,9 @@ function movepkg() local file local srpm - for file in "$srcdir/"*.rpm; do - srpm=$(rpm -qp --qf '%{SOURCERPM}' "$file") - if [ "$srpm" = "$srcpkg" ]; then - echo " $(basename $file)" | tee -a "$_mailcontent" - $dryrun mv -v -f "$file" "$destdir" >>"$_mailcommands" 2>&1 - fi + for file in $(urpmf --synthesis "${srcdir}/media_info/synthesis.hdlist.cz" --qf '%filename:%sourcerpm' ":$srcpkg$" | cut -d: -f1); do + echo " $file" | tee -a "$_mailcontent" + $dryrun mv -v -f "$srcdir/$file" "$destdir" >>"$_mailcommands" 2>&1 done } |