From e184975f9340ef27f06538039c6fbffd42b2f686 Mon Sep 17 00:00:00 2001 From: Mikhail Kashkarov Date: Tue, 3 Sep 2019 19:43:35 +0300 Subject: [S] Speed up used packages list preparation Process list with single rpm exec, decrease time from ~20sec to <1sec Change-Id: Iff9e00bac0b017707089ef49a669304fcbcc2dcc --- packaging/qemu-accel-aarch64.spec | 5 +---- packaging/qemu-accel-armv7hl.spec | 5 +---- packaging/qemu-accel-armv7l.spec | 5 +---- packaging/qemu-accel.spec.in | 5 +---- 4 files changed, 4 insertions(+), 16 deletions(-) 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 { -- cgit v1.2.3