[Rpm-maint] [PATCH] drop interpreter deps when already handled
Thierry Vignaud
thierry.vignaud at gmail.com
Tue Sep 16 13:08:38 UTC 2014
Hi
The attached patch drops interpreter deps when already handled:
Drop automatically generated dependencies on interpreters we either
don't need dependencies on or that we have other dedicated dependency
generators for making them duplicate, reducing ~5K packages'
dependencies in repository metadata on next rebuild:
- perl/python: we already have dedicated dependency generators for these
Those are basically duplicates (and replacing file deps by requires on
regular provides is good IMHO).
Note that Mageia also drop requires on other but I don't submit them b/c:
- ruby: dedicated dependency generator is not upstream
- /bin/sh & /bin/bash: we really don't need to add these dependencies as
they're required by glibc and therefore guaranteed to be satisfied
This is not true for most distros that don't have a /bin/sh scriptlet
See you
-------------- next part --------------
commit db0df477f5a44ea5aa9c2ace7e7370c647f54d2d
Author: Thierry Vignaud <thierry.vignaud at gmail.com>
Date: Tue Sep 16 15:00:23 2014 +0200
drop interpreter deps when already handled
Drop automatically generated dependencies on interpreters we either
don't need dependencies on or that we have other dedicated dependency
generators for making them duplicate, reducing ~5K packages'
dependencies in repository metadata on next rebuild:
- perl/python: we already have dedicated dependency generators for these
Note that Mageia also drop requires on:
- ruby: dedicated dependency generator is not upstream
- /bin/sh & /bin/bash: we really don't need to add these dependencies as
they're required by glibc and therefore guaranteed to be satisfied
diff --git a/scripts/script.req b/scripts/script.req
index 950dc4a..2375a6d 100755
--- a/scripts/script.req
+++ b/scripts/script.req
@@ -1,9 +1,21 @@
#!/bin/sh
+BLACKLIST="bin/(perl|python)"
+
# TODO: handle "#!/usr/bin/env foo" somehow
while read filename; do
# common cases
- sed -n -e '1s:^#![[:space:]]*\(/[^[:space:]]\{1,\}\).*:\1:p' "$filename"
+ INTERP=$(sed -n -e '1s:^#![[:space:]]*\(/[^[:space:]]\{1,\}\).*:\1:p' "$filename")
+ if echo $INTERP|grep -E "$BLACKLIST" >/dev/null; then
+ # drop automatically generated dependencies on interpreters we either don't
+ # need dependencies on or that we have other dedicated dependency generators
+ # for making them duplicate, reducing ~5K packages' dependencies at
+ # next rebuild.
+ # - perl/python: we already have dedicated dependency generators for these
+ :
+ else
+ echo $INTERP
+ fi
#!/usr/bin/env /foo/bar
sed -n -e '1s:^#![[:space:]]*[^[:space:]]*/bin/env[[:space:]]\{1,\}\(/[^[:space:]]\{1,\}\):\1:p' "$filename"
done
More information about the Rpm-maint
mailing list