From: Mikhail Kashkarov Date: Tue, 3 Sep 2019 16:43:35 +0000 (+0300) Subject: [S] Speed up used packages list preparation X-Git-Tag: accepted/tizen/base/20190909.044102~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F213382%2F3;p=platform%2Fupstream%2Fqemu-accel.git [S] Speed up used packages list preparation Process list with single rpm exec, decrease time from ~20sec to <1sec Change-Id: Iff9e00bac0b017707089ef49a669304fcbcc2dcc --- diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec index c011fdf..eb096be 100644 --- a/packaging/qemu-accel-aarch64.spec +++ b/packaging/qemu-accel-aarch64.spec @@ -218,10 +218,7 @@ prepare_package_list python \ echo "### Binaries accelerated ###" echo $binaries | sed -e 's/[^ ]*\///g;s/[^ ]*.so[^ ]* \?//g' echo "### Packages used ###" -for bin in $binaries -do - rpm -qf $bin -done | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u +rpm -qf $binaries | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u echo "" function patch_binary { diff --git a/packaging/qemu-accel-armv7hl.spec b/packaging/qemu-accel-armv7hl.spec index 6d8cdb5..71dbf1b 100644 --- a/packaging/qemu-accel-armv7hl.spec +++ b/packaging/qemu-accel-armv7hl.spec @@ -218,10 +218,7 @@ prepare_package_list python \ echo "### Binaries accelerated ###" echo $binaries | sed -e 's/[^ ]*\///g;s/[^ ]*.so[^ ]* \?//g' echo "### Packages used ###" -for bin in $binaries -do - rpm -qf $bin -done | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u +rpm -qf $binaries | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u echo "" function patch_binary { diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec index 86130b2..091ea00 100644 --- a/packaging/qemu-accel-armv7l.spec +++ b/packaging/qemu-accel-armv7l.spec @@ -218,10 +218,7 @@ prepare_package_list python \ echo "### Binaries accelerated ###" echo $binaries | sed -e 's/[^ ]*\///g;s/[^ ]*.so[^ ]* \?//g' echo "### Packages used ###" -for bin in $binaries -do - rpm -qf $bin -done | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u +rpm -qf $binaries | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u echo "" function patch_binary { diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in index 192c077..7b27e7b 100644 --- a/packaging/qemu-accel.spec.in +++ b/packaging/qemu-accel.spec.in @@ -215,10 +215,7 @@ prepare_package_list python \ echo "### Binaries accelerated ###" echo $binaries | sed -e 's/[^ ]*\///g;s/[^ ]*.so[^ ]* \?//g' echo "### Packages used ###" -for bin in $binaries -do - rpm -qf $bin -done | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u +rpm -qf $binaries | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u echo "" function patch_binary {