[Ovirt-devel] [PATCH node-image] Add minimal python into the Node

Perry Myers pmyers at redhat.com
Fri Nov 21 05:52:30 UTC 2008


core python libs and interpreter are added to facilitate scripting
Node size increases by approx 4MB compressed

This patch removes all of the .py files installed by python RPM
since the .pyc and .pyo files are already present and the source
shouldn't be strictly needed.

Signed-off-by: Perry Myers <pmyers at redhat.com>
---
 common-blacklist.ks |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/common-blacklist.ks b/common-blacklist.ks
index 3c89236..2f2c950 100644
--- a/common-blacklist.ks
+++ b/common-blacklist.ks
@@ -11,9 +11,9 @@ echo "Removing excess RPMs"
 # However, this is just an install-time dependency; we can remove
 # it afterwards, which we do here
 RPMS="system-config-firewall-tui system-config-network-tui rhpl \
-    rpm-python dbus-python kudzu newt-python newt"
+    rpm-python dbus-python kudzu newt-python newt libsemanage-python"
 
-RPMS="$RPMS kpartx mkinitrd isomd5sum dmraid python python-libs checkpolicy"
+RPMS="$RPMS kpartx mkinitrd isomd5sum dmraid checkpolicy"
 
 # Remove additional RPMs forcefully
 RPMS="$RPMS gamin pm-utils kbd usermode vbetool ConsoleKit hdparm \
@@ -91,7 +91,7 @@ blacklist="/boot /etc/alsa /etc/pki /usr/share/hwdata/MonitorsDB \
     /usr/share/tc /usr/share/emacs /usr/share/info /usr/kerberos \
     /usr/src /usr/etc /usr/games /usr/include /usr/local \
     /usr/sbin/{dell*,sasldblistusers2,build-locale-archive,glibc_post_upgrade.*}"
-blacklist_lib="/usr/lib{,64}/python2.5 /usr/lib{,64}/gconv \
+blacklist_lib="/usr/lib{,64}/gconv \
     /usr/{,lib64}/tc /usr/lib{,64}/tls /usr/lib{,64}/sse2 \
     /usr/lib{,64}/pkgconfig /usr/lib{,64}/nss /usr/lib{,64}/X11 \
     /usr/lib{,64}/games /usr/lib{,64}/alsa-lib /usr/lib{,64}/fs/reiserfs \
@@ -119,6 +119,9 @@ find /usr/share -type d -exec rmdir {} \; > /dev/null 2>&1
 echo "Cleanup excess selinux modules"
 $RM /usr/share/selinux
 
+echo "Removing python source files"
+find / -name *.py -exec rm -f {} \;
+
 echo "Running image-minimizer..."
 %end
 
-- 
1.6.0.3




More information about the ovirt-devel mailing list