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
commit151b474b8563b18487324b4dd8c11f64e09272dc (patch)
tree59ce36de20ebcfc6c502e8054ae474c00dae4743 /dev-lang
parentVersion bump plus ebuild fixes, thanks to Daniel Webert and Aaron Walker in b... (diff)
downloadgentoo-2-151b474b8563b18487324b4dd8c11f64e09272dc.tar.gz
gentoo-2-151b474b8563b18487324b4dd8c11f64e09272dc.tar.bz2
gentoo-2-151b474b8563b18487324b4dd8c11f64e09272dc.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/files/ocaml-rebuild.sh41
-rw-r--r--dev-lang/ocaml/ocaml-3.07-r1.ebuild4
3 files changed, 40 insertions, 14 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/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