Added code to clean up /var/db/pkg, while still keeping the CONTENTS, COUNTER and...
authorChris Gianelloni <wolf31o2@gentoo.org>
Tue, 25 Jan 2005 22:54:00 +0000 (22:54 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Tue, 25 Jan 2005 22:54:00 +0000 (22:54 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@526 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/stage1/stage1-preclean2-chroot.sh

index 1a0a59850f5c1383a3183644aae8deb6c78ce8db..d9248ea4c5333973f414d948c9aa7fddd6ca58e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 # ChangeLog for gentoo/src/catalyst 
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.152 2005/01/24 23:03:05 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.153 2005/01/25 22:54:00 wolf31o2 Exp $
+
+  25 Jan 2005; Chris Gianelloni <wolf31o2@gentoo.org>
+  targets/stage1/stage1-preclean2-chroot.sh:
+  Added code to clean up /var/db/pkg, while still keeping the CONTENTS,
+  COUNTER and ebuilds. This should keep a stage1 useable, while still keeping
+  its size small.
 
   24 Jan 2005; Chris Gianelloni <wolf31o2@gentoo.org>
   livecd/runscript-support/livecdfs-update.sh:
index ae6018fccad5c91675bb40c4a834247194935a36..469b642ad12482d406d46a525e37735e1b92b0b1 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1-preclean2-chroot.sh,v 1.5 2004/12/06 22:25:10 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1-preclean2-chroot.sh,v 1.6 2005/01/25 22:54:00 wolf31o2 Exp $
                
-#now, some finishing touches to initialize gcc-config....
+# now, some finishing touches to initialize gcc-config....
 unset ROOT
 
 if [ -e /usr/bin/gcc-config ]
@@ -12,10 +12,13 @@ then
        gcc-config ${mythang}; /usr/sbin/env-update; source /etc/profile
 fi
 
-#stage1 is not going to have anything in zoneinfo, so save our Factory timezone
+# stage1 is not going to have anything in zoneinfo, so save our Factory timezone
 if [ -d /usr/share/zoneinfo ] ; then
        rm -f /etc/localtime
        cp /usr/share/zoneinfo/Factory /etc/localtime
 else
        echo UTC > /etc/TZ
 fi
+
+# this cleans out /var/db, but leaves behind files portage needs for removal
+find /var/db/pkg -type f | grep -v '\(COUNTER\|CONTENTS\|ebuild\)' -exec rm -f '{}' \;