[PATCH python] spec: Don't pull in dependencies for example scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the scripts are marked as executable, RPM magic will scan them
for dependencies, which can pull in python2 for the python3 package
---
Taken from this commit by a fedora packager:

http://pkgs.fedoraproject.org/cgit/rpms/libvirt-python.git/commit/?id=78763e0bdbc081609519c02a2289fd54bea4d14f

 libvirt-python.spec.in | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libvirt-python.spec.in b/libvirt-python.spec.in
index 8a21003..3021ebd 100644
--- a/libvirt-python.spec.in
+++ b/libvirt-python.spec.in
@@ -49,6 +49,11 @@ of recent versions of Linux (and other OSes).
 %prep
 %setup -q
 
+# Unset execute bit for example scripts; it can introduce spurious
+# RPM dependencies, like /usr/bin/python which can pull in python2
+# for the -python3 package
+find examples -type f -exec chmod 0644 \{\} \;
+
 %build
 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
 %if %{with_python3}
-- 
2.7.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]