summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Sozeau <mattam@gentoo.org>2004-07-21 17:55:41 +0000
committerMatthieu Sozeau <mattam@gentoo.org>2004-07-21 17:55:41 +0000
commit0bc404026d3f686f697b63760dcba80a430f930f (patch)
treec93c94d843a1668a814ed89b03093bd0a07575af /dev-lang
parentVersion bump plus ebuild fixes, thanks to Daniel Webert and Aaron Walker in b... (diff)
downloadhistorical-0bc404026d3f686f697b63760dcba80a430f930f.tar.gz
historical-0bc404026d3f686f697b63760dcba80a430f930f.tar.bz2
historical-0bc404026d3f686f697b63760dcba80a430f930f.zip
Fix rebuild script to not mess with dependencies.
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/ocaml/ChangeLog9
-rw-r--r--dev-lang/ocaml/Manifest12
-rw-r--r--dev-lang/ocaml/files/ocaml-rebuild.sh41
-rw-r--r--dev-lang/ocaml/ocaml-3.07-r1.ebuild4
4 files changed, 46 insertions, 20 deletions
diff --git a/dev-lang/ocaml/ChangeLog b/dev-lang/ocaml/ChangeLog
index 648402176e3c..cb14c516ca8a 100644
--- a/dev-lang/ocaml/ChangeLog
+++ b/dev-lang/ocaml/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-lang/ocaml
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.34 2004/07/14 01:09:33 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ChangeLog,v 1.35 2004/07/21 17:55:41 mattam Exp $
+
+ 21 Jul 2004; Matthieu Sozeau <mattam@gentoo.org> files/ocaml-rebuild.sh,
+ ocaml-3.07-r1.ebuild:
+ Yet a little more robustness in the rebuild script.
+
+ 21 Jul 2004; Matthieu Sozeau <mattam@gentoo.org> files/ocaml-rebuild.sh:
+ Fixed bug in the rebuild script. see #56597.
13 Jul 2004; Travis Tilley <lv@gentoo.org> ocaml-3.07-r1.ebuild:
adding back ~amd64 keyword
diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest
index 47c00a1d1ad8..39a28fdc161e 100644
--- a/dev-lang/ocaml/Manifest
+++ b/dev-lang/ocaml/Manifest
@@ -1,10 +1,10 @@
-MD5 5caaff592069914b134a83a6752ec138 ocaml-3.06-r2.ebuild 1543
-MD5 b526f334501448ee9f7186019fb5c770 ocaml-3.07-r1.ebuild 1941
-MD5 188919a73aea34fca936911e966ba7ef ChangeLog 5935
+MD5 ddc395a4ed0f619eed18cfa1d3937680 ChangeLog 6216
MD5 8b350f19c06fcabf1053b0421b7c3f5a metadata.xml 155
-MD5 4df214d6cd74b3c5955d868879dd6cc7 files/ocaml-3.06-tcltk-8.4compat-patch.bz2 639
-MD5 f7d5ef0353678210ba7972b7cab4caad files/ocaml-rebuild.sh 836
+MD5 5caaff592069914b134a83a6752ec138 ocaml-3.06-r2.ebuild 1543
+MD5 7181505c469f79e4c781f7619e7f25fc ocaml-3.07-r1.ebuild 1950
+MD5 d996b9a852fbfcb0c2d9bddb4896add2 files/ocaml-rebuild.sh 1228
MD5 13c4abf06e236e8835011a387f90ecc9 files/digest-ocaml-3.06-r2 63
MD5 c42de320103c2d3eb1aa4002e2e0716b files/digest-ocaml-3.07-r1 130
-MD5 45ff13419dd955aa86d021abbf325fc2 files/ocaml-3.07-hppa.patch 15730
MD5 91579cecf8659312c2324d8d40709433 files/ocaml-3.06-sparc-configure.patch 1660
+MD5 4df214d6cd74b3c5955d868879dd6cc7 files/ocaml-3.06-tcltk-8.4compat-patch.bz2 639
+MD5 45ff13419dd955aa86d021abbf325fc2 files/ocaml-3.07-hppa.patch 15730
diff --git a/dev-lang/ocaml/files/ocaml-rebuild.sh b/dev-lang/ocaml/files/ocaml-rebuild.sh
index bb01c31c46cb..69e610fb2c9c 100644
--- a/dev-lang/ocaml/files/ocaml-rebuild.sh
+++ b/dev-lang/ocaml/files/ocaml-rebuild.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# run like this: ocaml-rebuild.sh [emerge_options]
+# run like this: ocaml-rebuild.sh [-h | -f] [emerge_options]
emerge=/usr/bin/emerge
qpkg=/usr/bin/qpkg
@@ -10,11 +10,30 @@ then
exit 1
fi
-deps=`$qpkg -nc -n -q -I dev-lang/ocaml-3.06 | grep -v -e "\(DEPEND.*\)\|\(dev-lang.*\)" | sort | uniq`
+if [ "$1" = "-h" ]
+then
+ echo "usage: ocaml-rebuild.sh [-h | -f(orce)] [emerge_options]"
+ echo "With -f, the packages will first be unmerged and then emerged"
+ echo "with the given options to ensuree correct dependancy analysis."
+ echo "Otherwise emerge is run with the --pretend flag and the given"
+ echo "options."
+ exit 1
+fi
+
+if [ "$1" = "-f" ]
+then
+ pretend=0
+ shift
+else
+ pretend=1
+fi
+
+deps=`$qpkg -nc -q -I dev-lang/ocaml | grep -v -e "\(DEPEND.*\)\|\(dev-lang.*\)" | sort | uniq`
toclean=""
for dep in $deps
do
+ dep=`basename ${dep}`
dirs=`find /var/db/pkg/ -name ${dep}`
for dir in $dirs
@@ -24,12 +43,8 @@ for dep in $deps
ocamldep=`grep dev-lang/ocaml $dir/DEPEND > /dev/null`
if [[ $ocamldep -eq 0 ]]
then
- SLOT=`cat $dir/SLOT`
- if [[ "$SLOT" = "" || "$SLOT" = "0" ]]
- then
- category=`cat $dir/CATEGORY`
- toclean="=$category/$dep $toclean"
- fi
+ category=`cat $dir/CATEGORY`
+ toclean="=$category/$dep $toclean"
fi
fi
done
@@ -37,9 +52,13 @@ done
if [ "$toclean" != "" ]
then
- cmd="$emerge $@ $toclean"
- #echo "Debug:" $cmd
- $cmd
+ if [ $pretend -eq 1 ]
+ then
+ $emerge --pretend $@ $toclean
+ else
+ $emerge unmerge $toclean
+ $emerge $@ $toclean
+ fi
else
echo "Nothing to update"
fi
diff --git a/dev-lang/ocaml/ocaml-3.07-r1.ebuild b/dev-lang/ocaml/ocaml-3.07-r1.ebuild
index b09a501b29ee..789dbc6603b1 100644
--- a/dev-lang/ocaml/ocaml-3.07-r1.ebuild
+++ b/dev-lang/ocaml/ocaml-3.07-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ocaml-3.07-r1.ebuild,v 1.14 2004/07/14 01:09:33 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/ocaml/ocaml-3.07-r1.ebuild,v 1.15 2004/07/21 17:55:41 mattam Exp $
inherit flag-o-matic eutils
@@ -70,7 +70,7 @@ pkg_postinst() {
einfo "so you (may) need to rebuild all packages depending on it that"
einfo "are actually installed on your system."
einfo "To do so, you can run: "
- einfo "sh ${FILESDIR}/ocaml-rebuild.sh [emerge options]"
+ einfo "sh ${FILESDIR}/ocaml-rebuild.sh [-h | emerge options]"
einfo "Which will call emerge on all old packages with the given options"
echo
} \ No newline at end of file