diff options
author | Michael Cummings <mcummings@gentoo.org> | 2005-01-31 10:18:07 +0000 |
---|---|---|
committer | Michael Cummings <mcummings@gentoo.org> | 2005-01-31 10:18:07 +0000 |
commit | 08a13d1c52d56df86713176ba29bc20a21f378fe (patch) | |
tree | 95d8bc83dd9da1a1b41c7f6d9fdf1fe4a4d0b657 /dev-lang | |
parent | According to bug 73847, added to init script and changed config file locatio... (diff) | |
download | historical-08a13d1c52d56df86713176ba29bc20a21f378fe.tar.gz historical-08a13d1c52d56df86713176ba29bc20a21f378fe.tar.bz2 historical-08a13d1c52d56df86713176ba29bc20a21f378fe.zip |
cleaned thanks to swtaylor
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/perl/ChangeLog | 6 | ||||
-rw-r--r-- | dev-lang/perl/Manifest | 38 | ||||
-rwxr-xr-x | dev-lang/perl/files/perl-cleaner | 71 |
3 files changed, 62 insertions, 53 deletions
diff --git a/dev-lang/perl/ChangeLog b/dev-lang/perl/ChangeLog index 7a19efcceec4..c248cdc5622b 100644 --- a/dev-lang/perl/ChangeLog +++ b/dev-lang/perl/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-lang/perl # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v 1.105 2005/01/27 13:01:22 mcummings Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/perl/ChangeLog,v 1.106 2005/01/31 10:18:07 mcummings Exp $ + + 31 Jan 2005; Michael Cummings <mcummings@gentoo.org> files/perl-cleaner: + swtaylor came up with a quicker way to generate the module list, plus a more + secure call for making the tmp files 27 Jan 2005; Michael Cummings <mcummings@gentoo.org> files/perl-cleaner: Code cleanup thanks to Mr.B. *MAJOR* typo in the filename for the prelist of diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest index 1c5245623e9b..763ab5faeb87 100644 --- a/dev-lang/perl/Manifest +++ b/dev-lang/perl/Manifest @@ -1,41 +1,38 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 c1ca72943ab54f2d757f1009445241e4 ChangeLog 32107 -MD5 e2d8f1bf77722def1dd432e26455c818 metadata.xml 305 MD5 0a8a42957053c5e35daeef59a80e5e10 perl-5.8.2-r1.ebuild 10011 +MD5 cafb18066c9b7fd570c0dfff3ec5a324 ChangeLog 32301 +MD5 e2d8f1bf77722def1dd432e26455c818 metadata.xml 305 MD5 96cd0e466f12c964156591508069e0df perl-5.8.2-r2.ebuild 10143 MD5 b36304514ba321213f46228cef0308f3 perl-5.8.4-r1.ebuild 12152 -MD5 e344a13cc5d4622febb94084d96bc551 perl-5.8.4-r2.ebuild 12283 MD5 209da21854ae41ebdaedb6707fb6c3a2 perl-5.8.5-r1.ebuild 11334 MD5 b37d94840cedea35d672ff8db46b1a47 perl-5.8.5-r2.ebuild 11774 -MD5 76a8c5fdfe242de0f3922676f994d716 perl-5.8.5-r3.ebuild 11906 MD5 3e38f787015236ca28ffdbcbfcffc52a perl-5.8.5.ebuild 11519 MD5 543934693fe590d4cf99d72f7b9e70ab perl-5.8.6-r1.ebuild 11791 -MD5 af8a06628a3c86f87c2506c07f8528ee perl-5.8.6-r2.ebuild 11923 MD5 76294281f5b62cd9789c43267e1d8b95 perl-5.8.6.ebuild 11402 +MD5 e344a13cc5d4622febb94084d96bc551 perl-5.8.4-r2.ebuild 12283 +MD5 76a8c5fdfe242de0f3922676f994d716 perl-5.8.5-r3.ebuild 11906 +MD5 af8a06628a3c86f87c2506c07f8528ee perl-5.8.6-r2.ebuild 11923 +MD5 319b56a7ce715fb7a494fe4d5cb9474c files/perl-5.8.2-picdl.patch 250 MD5 8381e239056a7895edf8f3c6c05c835c files/digest-perl-5.8.2-r1 64 -MD5 8381e239056a7895edf8f3c6c05c835c files/digest-perl-5.8.2-r2 64 MD5 93155b02a7e9d3cdc6d6934ce78d9f11 files/digest-perl-5.8.4-r1 64 -MD5 93155b02a7e9d3cdc6d6934ce78d9f11 files/digest-perl-5.8.4-r2 64 MD5 c354e2fbf8141a769c20032e94f45fd3 files/digest-perl-5.8.5 64 MD5 c354e2fbf8141a769c20032e94f45fd3 files/digest-perl-5.8.5-r1 64 MD5 c354e2fbf8141a769c20032e94f45fd3 files/digest-perl-5.8.5-r2 64 -MD5 c354e2fbf8141a769c20032e94f45fd3 files/digest-perl-5.8.5-r3 64 MD5 0a07934d74ccb1133cf0f3650cb94efc files/digest-perl-5.8.6 64 MD5 0a07934d74ccb1133cf0f3650cb94efc files/digest-perl-5.8.6-r1 64 -MD5 0a07934d74ccb1133cf0f3650cb94efc files/digest-perl-5.8.6-r2 64 -MD5 154013a841cbb251d7b63fb006b4006f files/file_path_rmtree.patch 1068 MD5 3195cf2f1f12f77ecc5b9c4fe9ea0995 files/libperl_rebuilder 10556 +MD5 44e1f1420947cc552c66fb434ba4c855 files/perl-5.8.4-NDBM-GDBM-compat.patch 428 +MD5 d9412dab085f22309997c8f08ea1ac85 files/perl-5.8.2-reorder-INC.patch 2211 MD5 060e9f10466fdc1268c75a7cf4dcbc7c files/perl-5.8.0-RC2-special-h2ph-not-failing-on-machine_ansi_header.patch 446 MD5 0a28eb41f5f12ed54f025004af45c83d files/perl-5.8.2-perldoc-emptydirs.patch 489 -MD5 319b56a7ce715fb7a494fe4d5cb9474c files/perl-5.8.2-picdl.patch 250 MD5 4e99f7529e149661372283c981cf17ff files/perl-5.8.2-prelink-lpthread.patch 476 -MD5 d9412dab085f22309997c8f08ea1ac85 files/perl-5.8.2-reorder-INC.patch 2211 MD5 ce442db939c59218a16be167f793b817 files/perl-5.8.2-uclibc.patch 573 -MD5 44e1f1420947cc552c66fb434ba4c855 files/perl-5.8.4-NDBM-GDBM-compat.patch 428 -MD5 076dcbef37263d6dd7af719b55cfc2de files/perl-5.8.4-noksh.patch 611 MD5 01af75daf3d222a668059e90d78a1f9d files/perl-5.8.4-nonblock.patch 400 +MD5 076dcbef37263d6dd7af719b55cfc2de files/perl-5.8.4-noksh.patch 611 +MD5 2e12f5128439c83b3c5a3615253f4d8f files/perl-cleaner 8606 +MD5 803b7c028f59008ea1e6d577e5c0bab0 files/stat.t 8884 MD5 0a28eb41f5f12ed54f025004af45c83d files/perl-5.8.4-perldoc-emptydirs.patch 489 MD5 319b56a7ce715fb7a494fe4d5cb9474c files/perl-5.8.4-picdl.patch 250 MD5 4e99f7529e149661372283c981cf17ff files/perl-5.8.4-prelink-lpthread.patch 476 @@ -53,12 +50,15 @@ MD5 319b56a7ce715fb7a494fe4d5cb9474c files/perl-5.8.6-picdl.patch 250 MD5 4e99f7529e149661372283c981cf17ff files/perl-5.8.6-prelink-lpthread.patch 476 MD5 d9412dab085f22309997c8f08ea1ac85 files/perl-5.8.6-reorder-INC.patch 2211 MD5 c5cc36940b2488a37c3dc2287f6e672c files/perl-5.8.6-tempfiles.patch 2115 -MD5 e2a6bc54d15c675682a4be4384a01442 files/perl-cleaner 8324 -MD5 803b7c028f59008ea1e6d577e5c0bab0 files/stat.t 8884 +MD5 154013a841cbb251d7b63fb006b4006f files/file_path_rmtree.patch 1068 +MD5 8381e239056a7895edf8f3c6c05c835c files/digest-perl-5.8.2-r2 64 +MD5 93155b02a7e9d3cdc6d6934ce78d9f11 files/digest-perl-5.8.4-r2 64 +MD5 c354e2fbf8141a769c20032e94f45fd3 files/digest-perl-5.8.5-r3 64 +MD5 0a07934d74ccb1133cf0f3650cb94efc files/digest-perl-5.8.6-r2 64 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) -iD8DBQFB+QjgtG5z4I8BtQoRAnB1AJsFy/p5pGmx9zxW2JVDBh4+JbFjKwCfSpSb -B7poelB5p/cWIXWV7kZcacE= -=G9Bo +iD8DBQFB/gaNtG5z4I8BtQoRAqlmAJ0VvTHDf1YCgvtQ57Exqi4aNhoPzACfXjaI +QVaI7YBxwR1Ym1YCmx4ssG0= +=9J/f -----END PGP SIGNATURE----- diff --git a/dev-lang/perl/files/perl-cleaner b/dev-lang/perl/files/perl-cleaner index 24053aa7c73c..a2a9becff7e9 100755 --- a/dev-lang/perl/files/perl-cleaner +++ b/dev-lang/perl/files/perl-cleaner @@ -1,5 +1,12 @@ #!/bin/bash + +# sort of a changelog if you want to call it that... + +# version 1.2 - swtaylor gave some good pointers on making the tmp files, as well as reminding me of grep's -f functionality :) +# version 1.1 - Mr. Bones gave a lot of good input on cleaning up the script +# Version 1 - stuff + # First and foremost - make sure we have a perl to work with... PERL=$(which perl) if [ "${PERL}x" == "x" ]; then @@ -13,38 +20,34 @@ TMPDIR=${TMPDIR:-/tmp} PKGDIR=$(/usr/bin/portageq vdb_path) DATESTAMP=$(date +"%Y%m%d%H%M%S") -LOG="${TMPDIR}/perl-cleaner.log.$DATESTAMP" - +LOG=$(mktemp ${TMPDIR}/perl-cleaner.log.$DATESTAMP.XXXXXXXXXX) PAGER=${PAGER:-more} + +# Set up our temporary files +MODULES_LIST=$(mktemp ${TMPDIR}/modules.list.XXXXXXXXXX) +EBUILDS_PREINSTALL=$(mktemp ${TMPDIR}/ebuilds.preinstall.XXXXXXXXXX) +EBUILDS_ORDERED=$(mktemp ${TMPDIR}/ebuilds.ordered.XXXXXXXXXX) +EBUILDS_REINSTALL=$(mktemp ${TMPDIR}/ebuilds.reinstall.XXXXXXXXXX) + ASK="" if [ ! -z $2 ]; then ASK="--ask" fi -# Set up our temporary files - -function cleanrun() { - for FILE in modules.list ebuilds.preinstall ebuilds.ordered ebuilds.reinstall ; do - - if [ -f ${TMPDIR}/$FILE ]; then - cp /dev/null ${TMPDIR}/$FILE - fi - done -} function postclean { - for FILE in modules.list ebuilds.preinstall ebuilds.ordered ebuilds.reinstall; do + for FILE in ${MODULES_LIST} ${EBUILDS_PREINSTALL} ${EBUILDS_ORDERED} ${EBUILDS_REINSTALL}; do - if [ -f ${TMPDIR}/$FILE ]; then - rm -f ${TMPDIR}/$FILE + if [ -f $FILE ]; then + rm -f $FILE fi done echo - echo "For a complete log, please read ${TMPDIR}/perl-cleaner.log.DATESTAMP" + echo "For a complete log, please read $LOG" echo } @@ -81,14 +84,17 @@ function module_list() { # no sense in revisiting that dir echo "$(date) : Building list of modules for reinstall" | tee -a $LOG INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${PERL_VERSION}'/; print "$line\n" }') + MODFIND=$(mktemp ${TMPDIR}/modules.found.XXXXXXXXXX) echo "Locating modules for reinstall" for DIR in $INC; do if [ -d $DIR ]; then for file in $(find $DIR -iname "*.pm" -type f|grep -v "${PERL_VERSION}"); do - grep -l $file $PKGDIR/*/*/CONTENTS >>${TMPDIR}/modules.list + echo "$file" >>$MODFIND done fi done + grep -f $MODFIND -l $PKGDIR/*/*/CONTENTS >${MODULES_LIST} + rm $MODFIND } # The meat of it - rebuilding the ebuilds @@ -99,20 +105,20 @@ function module_list() { function ebuild_rebuild() { echo "$(date) : Rebuilding modules: Building list of ebuilds" | tee -a $LOG - if [ -s ${TMPDIR}/modules.list ]; then - for line in $(sort -u ${TMPDIR}/modules.list); do - echo "$line"|sed -e 's|.*pkg/||' -e 's|/CONTENTS||'|grep -v "dev-lang/perl" >>${TMPDIR}/ebuilds.preinstall + if [ -s ${MODULES_LIST} ]; then + for line in $(sort -u ${MODULES_LIST}); do + echo "$line"|sed -e 's|.*pkg/||' -e 's|/CONTENTS||'|grep -v "dev-lang/perl" >>${EBUILDS_PREINSTALL} done fi # If they asked for interactive, let them see what will be reinstalled - if [ -s ${TMPDIR}/ebuilds.preinstall ]; then + if [ -s ${EBUILDS_PREINSTALL} ]; then if [ ! -z $ASK ]; then echo "Press Enter to see the list of ebuilds we'll be avaluating" read key - $PAGER ${TMPDIR}/ebuilds.preinstall + $PAGER ${EBUILDS_PREINSTALL} printf "Continue? (Y/N) " read ANSWER if [ $(echo "${ANSWER}" | egrep -e "^n|N" ) ]; then @@ -121,7 +127,7 @@ function ebuild_rebuild() { fi fi - for EBUILD in $(cat ${TMPDIR}/ebuilds.preinstall); do + for EBUILD in $(cat ${EBUILDS_PREINSTALL} ); do if emerge --oneshot -p "=$EBUILD"|egrep -q ".*ebuilds.*satisfy"; then if emerge --oneshot -p ">=$EBUILD"|egrep -q ".*ebuilds.*satisfy"; then echo "$(date) : There are no unmasked ebuilds to satisfy $EBUILD. Skipping" | tee -a $LOG @@ -131,23 +137,23 @@ function ebuild_rebuild() { printf "${EBUILD} isn't available, but a new version is. Install? (Y/N) " read ANSWER if [ $(echo "${ANSWER}" | egrep -e "^y|Y" ) ]; then - echo ">=$EBUILD" >> ${TMPDIR}/ebuilds.ordered + echo ">=$EBUILD" >> ${EBUILDS_ORDERED} echo "$(date) : User chose to install >=${EBUILD}">>$LOG fi else - echo ">=$EBUILD" >>${TMPDIR}/ebuilds.ordered + echo ">=$EBUILD" >>${EBUILDS_ORDERED} fi fi else - echo "=$EBUILD">>${TMPDIR}/ebuilds.ordered + echo "=$EBUILD">>${EBUILDS_ORDERED} fi done - if [ -s ${TMPDIR}/ebuilds.ordered ]; then + if [ -s ${EBUILDS_ORDERED} ]; then if [ ! -z $ASK ]; then echo "Press Enter to see the final list of ebuilds to install" read key - $PAGER ${TMPDIR}/ebuilds.ordered + $PAGER ${EBUILDS_ORDERED} printf "Continue? (Y/N) " read ANSWER if [ $(echo "${ANSWER}" | egrep -e "^n|N" ) ]; then @@ -157,17 +163,17 @@ function ebuild_rebuild() { fi # Cut down to one line so portage can handle ordering these appropriately - emerge -p --oneshot $(cat ${TMPDIR}/ebuilds.ordered) | grep ebuild | sed -e 's:\([^ ]\+\):=\1:g' -e 's:.*\] \([^ ]*\) .*:\1:'>>${TMPDIR}/ebuilds.reinstall + emerge -p --oneshot $(cat ${EBUILDS_ORDERED} ) | grep ebuild | sed -e 's:\([^ ]\+\):=\1:g' -e 's:.*\] \([^ ]*\) .*:\1:'>>${EBUILDS_REINSTALL} echo "Reinstalling ebuilds" echo "$(date) : Ebuilds to reinstall: ">>$LOG - cat ${TMPDIR}/ebuilds.reinstall>>$LOG + cat ${EBUILDS_REINSTALL}>>$LOG echo >>$LOG # Now that we have them in the right order, emerge them one at a time # This is to avoid problems if one doesn't emerge correctly - for EBUILD in $(cat ${TMPDIR}/ebuilds.reinstall); do + for EBUILD in $(cat ${EBUILDS_REINSTALL}); do emerge --oneshot ${ASK} "$EBUILD" done else @@ -193,7 +199,7 @@ function libperl_list() { $(find $(echo $PATH | sed 's/:/ /g') -type f -perm +0111 ! -newer /usr/lib/libperl.so ) ; do if [ -f ${i} ]; then - ldd ${i} 2>&1 | grep "libperl" - >/dev/null && grep -l $i $PKGDIR/*/*/CONTENTS>>${TMPDIR}/modules.list; + ldd ${i} 2>&1 | grep "libperl" - >/dev/null && grep -l $i $PKGDIR/*/*/CONTENTS>>${MODULES_LIST}; fi done @@ -218,7 +224,6 @@ function leftovers() { done } -cleanrun case "$1" in leftovers) |