Allow check-deps.sh to detect | dependencies.

git-svn-id: http://emdebian.org/svn/current@7348 563faec7-e20c-0410-992a-a66f704d0ccd
This commit is contained in:
codehelp 2010-07-28 18:30:44 +00:00
parent 7f10ea3aee
commit 999358a406
2 changed files with 32 additions and 5 deletions

View file

@ -42,8 +42,8 @@ case "$1" in
YES=1 YES=1
;; ;;
*) *)
echo "Unrecognised option: $1" FILE=$1
exit; shift
;; ;;
esac esac
done done
@ -63,6 +63,14 @@ for pkg in $DEPS; do
if [ "apt" = "$name" ]; then if [ "apt" = "$name" ]; then
continue continue
fi fi
orlist=$(echo $pkg|grep "|" || true)
while [ -n "$orlist" ]; do
ORPKG=`echo $pkg|cut -d'|' -f2|sed -e 's/^ //'`
ALTERNATE="$ALTERNATE $ORPKG"
orlist=$(echo $orlist | sed -e "s/.*$ORPKG//;s/^ *//;s/ *$//")
ALTERNATE=$(echo $ALTERNATE|sed -e 's/^ *//;s/ *$//')
pkg=$(echo $pkg|sed -e "s/|//;s/$ORPKG//;s/^ *//;s/ *$//")
done
if [ -n `echo $pkg|grep '('` ]; then if [ -n `echo $pkg|grep '('` ]; then
VERLIMIT=`echo $pkg|cut -d'(' -f2|tr -d ')'|tr -d '\n'|grep -v $name || true` VERLIMIT=`echo $pkg|cut -d'(' -f2|tr -d ')'|tr -d '\n'|grep -v $name || true`
VERCMP=`echo $VERLIMIT|sed -e 's/\(.*\) \(.*\)/\1/'` VERCMP=`echo $VERLIMIT|sed -e 's/\(.*\) \(.*\)/\1/'`
@ -75,6 +83,24 @@ for pkg in $DEPS; do
CHECK=`dpkg --compare-versions $POLICY "$VERCMP" $VERLIMIT ; echo $?` CHECK=`dpkg --compare-versions $POLICY "$VERCMP" $VERLIMIT ; echo $?`
set -e set -e
fi fi
if [ -z "$CHECK" ]; then
VERLIMIT=
VERCMP=
name=$(echo $ALTERNATE|sed -e 's/^ //'|cut -d' ' -f1)
if [ -n `echo $ALTERNATE|grep '('` ]; then
VERLIMIT=`echo $ALTERNATE|cut -d'(' -f2|tr -d ')'|tr -d '\n'|grep -v $name || true`
VERCMP=`echo $VERLIMIT|sed -e 's/\(.*\) \(.*\)/\1/'`
VERLIMIT=`echo $VERLIMIT|sed -e 's/\(.*\) \(.*\)/\2/'`
fi
POLICY=`LC_ALL=C apt-cache policy $name 2>/dev/null|grep Candidate|cut -d':' -f2-3|tr -d ' '`
if [ -n "$POLICY" ]; then
if [ -n "$VERLIMIT" ]; then
set +e
CHECK=`dpkg --compare-versions $POLICY "$VERCMP" $VERLIMIT ; echo $?`
set -e
fi
fi
fi
else else
ERR="$ERR $name " ERR="$ERR $name "
fi fi
@ -95,6 +121,6 @@ fi
if [ -n "$INSTALL" ]; then if [ -n "$INSTALL" ]; then
eval apt-get install "$CMD" eval apt-get install "$CMD"
dpkg -i $FILE dpkg -i $FILE
else elif [ -n "$CMD" ]; then
echo apt-get install $CMD echo apt-get install ${CMD}
fi fi

3
debian/changelog vendored
View file

@ -6,8 +6,9 @@ multistrap (2.1.6) unstable; urgency=low
* Call dpkg --print-architecture for determination of host * Call dpkg --print-architecture for determination of host
architecture. (Closes: #589713) architecture. (Closes: #589713)
* Add aptitude to crosschroot configs as pbuilder now requires it. * Add aptitude to crosschroot configs as pbuilder now requires it.
* Allow check-deps.sh to detect | dependencies.
-- Neil Williams <codehelp@debian.org> Mon, 26 Jul 2010 22:53:39 +0100 -- Neil Williams <codehelp@debian.org> Wed, 28 Jul 2010 19:30:25 +0100
multistrap (2.1.5) unstable; urgency=low multistrap (2.1.5) unstable; urgency=low