[openstack-packstack/f19] minimize number of external processes in %prep

Pádraig Brady pbrady at fedoraproject.org
Mon Jul 15 12:24:21 UTC 2013


commit 66c09b0ddbda747a71a910c961b5cfffee48bfb7
Author: Pádraig Brady <P at draigBrady.com>
Date:   Mon Jul 15 13:20:43 2013 +0100

    minimize number of external processes in %prep
    
    s/find -exec {} ;/find -exec {} +/
    
    prep time goes from 4.3s to 1.3s

 openstack-packstack.spec |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/openstack-packstack.spec b/openstack-packstack.spec
index 7bf6218..c7c9e7a 100644
--- a/openstack-packstack.spec
+++ b/openstack-packstack.spec
@@ -44,11 +44,11 @@ Set of Puppet modules used by Packstack to install OpenStack
 %setup -n packstack-%{version}dev%{git_revno}
 
 # Sanitizing a lot of the files in the puppet modules, they come from seperate upstream projects
-find packstack/puppet/modules \( -name .fixtures.yml -o -name .gemfile -o -name ".travis.yml" -o -name .rspec \) -exec rm {} \;
-find packstack/puppet/modules \( -name "*.py" -o -name "*.rb" -o -name "*.pl" \) -exec sed -i '/^#!/{d;q}' {} \; -exec chmod -x {} \;
-find packstack/puppet/modules \( -name "*.sh" \) -exec sed -i 's/^#!.*/#!\/bin\/bash/g' {} \; -exec chmod +x {} \;
-find packstack/puppet/modules -name site.pp -size 0 -exec rm {} \;
-find packstack/puppet/modules \( -name spec -o -name ext \)  | xargs  rm -rf
+find packstack/puppet/modules \( -name .fixtures.yml -o -name .gemfile -o -name ".travis.yml" -o -name .rspec \) -exec rm {} +
+find packstack/puppet/modules \( -name "*.py" -o -name "*.rb" -o -name "*.pl" \) -exec sed -i '/^#!/{d;q}' {} + -exec chmod -x {} +
+find packstack/puppet/modules \( -name "*.sh" \) -exec sed -i 's/^#!.*/#!\/bin\/bash/g' {} + -exec chmod +x {} +
+find packstack/puppet/modules -name site.pp -size 0 -exec rm {} +
+find packstack/puppet/modules \( -name spec -o -name ext \) | xargs rm -rf
 
 # Moving this data directory out temporarily as it causes setup.py to throw errors
 rm -rf %{_builddir}/puppet


More information about the scm-commits mailing list