summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2000-09-26 05:18:54 +0000
committerDaniel Robbins <drobbins@gentoo.org>2000-09-26 05:18:54 +0000
commitfe7fd60bc1eb12bbaa217ffb93900c978bdbbb0c (patch)
tree57e87c470d2df51fcd02bc3ac7a83372bb5fe2fb
parentfoo (diff)
downloadhistorical-fe7fd60bc1eb12bbaa217ffb93900c978bdbbb0c.tar.gz
historical-fe7fd60bc1eb12bbaa217ffb93900c978bdbbb0c.tar.bz2
historical-fe7fd60bc1eb12bbaa217ffb93900c978bdbbb0c.zip
automation scripts update
-rw-r--r--sys-apps/portage/files/ebuild35
-rwxr-xr-xsys-apps/portage/files/megadigest12
-rwxr-xr-xsys-apps/portage/files/megatouch4
3 files changed, 50 insertions, 1 deletions
diff --git a/sys-apps/portage/files/ebuild b/sys-apps/portage/files/ebuild
index 9cab957bee00..5be51a081ca4 100644
--- a/sys-apps/portage/files/ebuild
+++ b/sys-apps/portage/files/ebuild
@@ -88,6 +88,7 @@ try() {
}
dyn_touch() {
+ local x
for x in ${A}
do
if [ -e ${DISTDIR}/${x} ]
@@ -183,6 +184,38 @@ digest_check() {
return 0
}
+dyn_batchdigest() {
+ local x
+ if [ ! -e ${FILESDIR}/digest-${PF} ]
+ then
+ if [ "${A}" != "" ]
+ then
+ echo "${CATEGORY}/${PF} has no digest file."
+ fi
+ exit 1
+ fi
+ for x in ${A}
+ do
+ if [ ! -e ${DISTDIR}/${x} ]
+ then
+ echo "${CATEGORY}/${PF}:${x} does not exist in ${DISTDIR}."
+ continue
+ else
+ local mycdigest=`grep " ${x}" ${FILESDIR}/digest-${PF} | cut -f2 -d" "`
+ if [ -z "$mycdigest" ]
+ then
+ echo "${CATEGORY}/${PF}:${x} digest not yet recorded."
+ continue
+ fi
+ local mydigest=`md5sum ${DISTDIR}/${x} | cut -f1 -d" "`
+ if [ "$mycdigest" != "$mydigest" ]
+ then
+ echo "${CATEGORY}/${PF}:${x} is corrupt or has an invalid digest."
+ fi
+ fi
+ done
+}
+
dyn_fetch() {
local y
@@ -661,7 +694,7 @@ src_menu() {
prerm|postrm|preinst|postinst|config)
pkg_${MYfoo}
;;
- help|touch|clean|fetch|digest|pkginfo|pkgloc|unmerge|install)
+ help|batchdigest|touch|clean|fetch|digest|pkginfo|pkgloc|unmerge|install)
dyn_${MYfoo}
;;
package)
diff --git a/sys-apps/portage/files/megadigest b/sys-apps/portage/files/megadigest
new file mode 100755
index 000000000000..df5a6422f42d
--- /dev/null
+++ b/sys-apps/portage/files/megadigest
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+source /etc/make.conf
+echo -n "MD5 digest analysis started "
+date
+echo
+for x in `find /usr/portage/ -iname *.ebuild`
+do
+ ebuild ${x} batchdigest
+done
+echo
+echo -n "MD5 digest analysis completed "
+date
diff --git a/sys-apps/portage/files/megatouch b/sys-apps/portage/files/megatouch
index e7565622e962..fda54510ad9f 100755
--- a/sys-apps/portage/files/megatouch
+++ b/sys-apps/portage/files/megatouch
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
source /etc/make.conf
+echo -n "Source archive pruning started "
+date
touch ${DISTDIR}/.cleaned
sleep 3
for x in `find /usr/portage/ -iname *.ebuild`
@@ -17,3 +19,5 @@ do
done
du -k ${DISTDIR}
du -k ${DISTDIR}-old
+echo -n "Source archive pruning completed "
+date