summaryrefslogtreecommitdiffstats
path: root/upd-instroot
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-08-30 00:25:13 +0000
committerMatt Wilson <msw@redhat.com>1999-08-30 00:25:13 +0000
commitb906cfc16d97ffd279d9a3bc3ee806d73581dc8c (patch)
treede6114af072732ac1f617f9cc65ac3e2f29092f4 /upd-instroot
parent95c1a95176bd2f71099fa83643ce4abb3ee966a3 (diff)
downloadanaconda-b906cfc16d97ffd279d9a3bc3ee806d73581dc8c.tar.gz
anaconda-b906cfc16d97ffd279d9a3bc3ee806d73581dc8c.tar.xz
anaconda-b906cfc16d97ffd279d9a3bc3ee806d73581dc8c.zip
new script for deps
Diffstat (limited to 'upd-instroot')
-rwxr-xr-xupd-instroot27
1 files changed, 7 insertions, 20 deletions
diff --git a/upd-instroot b/upd-instroot
index 2b26ac046..0195310cb 100755
--- a/upd-instroot
+++ b/upd-instroot
@@ -9,29 +9,15 @@ fi
HOMEDIR=`pwd`
echo HOMEDIR $HOMEDIR
+# remove all non unused python files
pythondeps() {
DIR=$1
- cp /usr/bin/strace $DIR
-
- (cd $DIR; \
- chroot . ./strace -o straceout.$$ \
- usr/bin/anaconda -m dir://mnt/source --test --text --traceonly
- )
-
- ((cat $DIR/straceout.$$ |
- grep ^open | grep '= [0-9]' | sed 's/[^"]*"//' | sed 's/".*//' |
- sort -u | grep /usr/lib/python
- ) ; \
- (cd $DIR;
- find usr/lib/python* -type f | sed 's,^,/,' \
- )) | sort | uniq -u |
- \
- sed s,^,./, | while read fn; do
- [ ! -d $DIR/$fn ] && rm $DIR/$fn
- done
-
- rm -f $DIR/strace $DIR/straceout.$$
+ (chroot $DIR /usr/bin/anaconda -m dir://mnt/source --test --text --traceonly; \
+ cd $DIR; find usr/lib/python* -type f | sed 's,^,/,' ) | sort | uniq -u |
+ sed s,^,./, | while read fn; do
+ [ ! -d $DIR/$fn ] && rm $DIR/$fn
+ done
}
SRC=$1/RedHat/RPMS
@@ -220,6 +206,7 @@ for p in $DEST $DESTGR; do
rm -f $p/ldconfig
find $p -name "*.so" | xargs strip
+ find $p -name "*.a" | xargs rm -rf
(cd /usr/share/zoneinfo; find . -type f -or -type l |
grep '^./[A-Z]' | sort | sed 's/^..//' |