admin: distfiles/cleaner/.auto-tags (NEW), distfiles/cleaner/.bran...
baggins
baggins at pld-linux.org
Wed Apr 26 18:06:08 CEST 2006
Author: baggins Date: Wed Apr 26 16:06:08 2006 GMT
Module: admin Tag: HEAD
---- Log message:
- a suite for pruning (almost) unused files from distfiles
---- Files affected:
admin/distfiles/cleaner:
.auto-tags (NONE -> 1.1) (NEW), .branches (NONE -> 1.1) (NEW), active-list-distfiles (NONE -> 1.1) (NEW), lister (NONE -> 1.1) (NEW), verified-specs-tags (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: admin/distfiles/cleaner/.auto-tags
diff -u /dev/null admin/distfiles/cleaner/.auto-tags:1.1
--- /dev/null Wed Apr 26 18:06:08 2006
+++ admin/distfiles/cleaner/.auto-tags Wed Apr 26 18:06:03 2006
@@ -0,0 +1,2 @@
+auto-ac-
+auto-th-
================================================================
Index: admin/distfiles/cleaner/.branches
diff -u /dev/null admin/distfiles/cleaner/.branches:1.1
--- /dev/null Wed Apr 26 18:06:08 2006
+++ admin/distfiles/cleaner/.branches Wed Apr 26 18:06:03 2006
@@ -0,0 +1,55 @@
+HEAD
+DEVEL
+RA-branch
+RA-branch-security
+RA-branch_general
+RA-branch_security
+AC-branch
+LINUX_2_6_15
+LINUX_2_6_14
+LINUX_2_6_13
+LINUX_2_6_12
+LINUX_2_6_11
+LINUX_2_6_9
+LINUX_2_6_8
+LINUX_2_6_7
+LINUX_2_6
+LINUX_2_4_STABLE
+LINUX_2_4
+LINUX_2_4_31
+LINUX_2_4_30
+LINUX_2_4_28
+LINUX_2_4_27
+LINUX_2_4_26
+APACHE_2_0
+APACHE_2_FOR_RA
+GCC3
+GCC31
+GCC32
+GCC323
+GCC4
+GCC_3_4
+GCC_3_5
+GCC_4
+GCC_4_1
+GLIBC_2_2
+GNOME_2_0
+GNOME_2_2
+GNOME_2_4
+GNOME_2_6
+GNOME_2_8
+JAVA14
+LIBVSERVER
+MYSQL_3_23
+MYSQL_4_00
+MYSQL_4_1
+PERL
+PERL_5_8_0
+PERL_5_8_1
+PERL_5_8_2
+PERL_5_8_4
+PERL_5_8_5
+PERL_5_8_6
+PERL_5_8_7
+X11R6_3
+X11R6_4
================================================================
================================================================
Index: admin/distfiles/cleaner/lister
diff -u /dev/null admin/distfiles/cleaner/lister:1.1
--- /dev/null Wed Apr 26 18:06:08 2006
+++ admin/distfiles/cleaner/lister Wed Apr 26 18:06:03 2006
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+# Before running this script you have to have full-list-distfiles file
+# in current directory
+#
+# Format of full-list-distfiles file:
+#
+# cd <path-to-distfiles>
+# find by-md5 -type f -printf '%p\n'
+#
+# DO NOT REMOVE FOLLOWING FILES:
+#
+# active-list-distfiles
+# verified-specs-tags
+#
+
+#
+CVSROOT=":pserver:baggins at cvs.pld-linux.org:/cvsroot"
+export CVSROOT
+
+LISTFILES=""
+
+touch_icons() {
+ ICONS="`awk '/^Icon:/ {print $2}' ${1}`"
+ for i in $ICONS ; do
+ echo GIF87 >$i
+ done
+}
+
+for TAG in $(cat .branches) ; do
+ cvs checkout -r "$TAG" SPECS
+ cvs up -A SPECS/builder
+
+ cd SPECS
+ for spec in $(find -name "*.spec") ; do
+ grep -sq "$spec:$TAG" ../verified-specs-tags && continue
+ touch_icons "$spec"
+ DF=$(./builder --no-init -sdp -nc -ncs "$spec" || echo $spec >>../list-distfiles-$TAG-errors)
+ for f in $DF ; do
+ echo $f | grep -qsE "^by-md5" || continue
+ echo $f >>../list-distfiles-auto-tags
+ echo $f.desc >>../list-distfiles-auto-tags
+ done
+ echo $spec:$TAG >>../verified-specs-tags
+ done
+ LISTFILES="$LISTFILES list-distfiles-$TAG"
+ cd -
+ rm -rf SPECS
+done
+
+cvs checkout -r 1.1 SPECS
+cvs up -A SPECS/builder
+cd SPECS
+for spec in $(find -name "*.spec") ; do
+ TAGS="$(cvs status -v "${spec}" | awk '!/Sticky Tag:/ && /\(branch:/ || /\(revision/ { print $1 } ' | grep -s -f ../.auto-tags | xargs)"
+ for rev in $TAGS ; do
+ grep -sq "$spec:$rev" ../verified-specs-tags && continue
+ cvs up -r $rev $spec
+ touch_icons "$spec"
+ DF=$(./builder --no-init -sdp -nc -ncs "$spec" || echo $spec >>../list-distfiles-auto-tags-errors)
+ for f in $DF ; do
+ echo $f | grep -qsE "^by-md5" || continue
+ echo $f >>../list-distfiles-auto-tags
+ echo $f.desc >>../list-distfiles-auto-tags
+ done
+ echo $spec:$rev >>../verified-specs-tags
+ done
+done
+LISTFILES="$LISTFILES list-distfiles-auto-tags"
+cd -
+rm -rf SPECS
+
+sort $LISTFILES | uniq >>active-list-distfiles
+rm -f $LISTFILES
+
+$D=$(date +%Y-%M-%d)
+sort active-list-distfiles full-list-distfiles | uniq -u >distfiles-remove-$D
+
+cvs commit -m"- $D update" active-list-distfiles verified-specs-tags
================================================================
================================================================
More information about the pld-cvs-commit
mailing list