[Ovirt-devel] [PATCH node-image] allow for {, lib64} constructs in blacklist variables

Jim Meyering jim at meyering.net
Mon Sep 22 07:45:52 UTC 2008


[ I noticed that I'd never sent this message.
  The patch is already in, as part of the enable-SELinux-in-node series,
  and the comments about left-over python files are no longer relevant,
  since now the containing packages are properly removed. ]

---
I noticed that /usr/lib64/python2.5 and others were not being removed.
That's because they're listed like this in common-post.ks:

    blacklist_lib="/usr/lib{,64}/python2.5 /usr/lib{,64}/gconv \
        /usr/{,lib64}/tc /usr/lib{,64}/tls /usr/lib{,64}/sse2 \
        ...

Listing them like that is a good thing, but when attempting to remove
them, the parts in curly braces would not be expanded, and due to the
use of rm's -f option, there was no diagnostic.

Prefixing the $RM with "eval " solves the problem.

Tested by mounting the .iso and confirming that python2.5 is no longer there:

    sudo ../release/misc-scripts/mount-livecd.sh setup \
      rpm-build/ovirt-node-image-0.92/ovirt-node-image.iso
    test -d /mnt/livecd-tmp3/usr/lib64/python2.5 && echo FAIL

FYI, on the topic of eliminating python-related bits, there is an
additional 1.5MB worth of .py, .pyo, .pyc files that we can prune:

    find|grep -E '\.py[oc]?$'|xargs wc -c

I'll be removing those, too, one way or another.

 common-post.ks |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common-post.ks b/common-post.ks
index d14c790..a2a8630 100644
--- a/common-post.ks
+++ b/common-post.ks
@@ -142,8 +142,8 @@ docs_blacklist="/usr/share/omf /usr/share/gnome /usr/share/doc \
     /usr/share/locale /usr/share/libthai /usr/share/man /usr/share/terminfo \
     /usr/share/X11 /usr/share/i18n"

-$RM $blacklist $blacklist_lib $blacklist_pango $blacklist_hal $blacklist_ssh \
-    $docs_blacklist
+eval $RM $blacklist $blacklist_lib $blacklist_pango $blacklist_hal \
+    $blacklist_ssh $docs_blacklist

 echo "Cleanup empty directory structures in /usr/share"
 find /usr/share -type d -exec rmdir {} \; > /dev/null 2>&1
--
1.6.0.1.308.gede4c




More information about the ovirt-devel mailing list