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:
parent
7f10ea3aee
commit
999358a406
2 changed files with 32 additions and 5 deletions
|
@ -42,8 +42,8 @@ case "$1" in
|
|||
YES=1
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognised option: $1"
|
||||
exit;
|
||||
FILE=$1
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
@ -63,6 +63,14 @@ for pkg in $DEPS; do
|
|||
if [ "apt" = "$name" ]; then
|
||||
continue
|
||||
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
|
||||
VERLIMIT=`echo $pkg|cut -d'(' -f2|tr -d ')'|tr -d '\n'|grep -v $name || true`
|
||||
VERCMP=`echo $VERLIMIT|sed -e 's/\(.*\) \(.*\)/\1/'`
|
||||
|
@ -75,6 +83,24 @@ for pkg in $DEPS; do
|
|||
CHECK=`dpkg --compare-versions $POLICY "$VERCMP" $VERLIMIT ; echo $?`
|
||||
set -e
|
||||
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
|
||||
ERR="$ERR $name "
|
||||
fi
|
||||
|
@ -95,6 +121,6 @@ fi
|
|||
if [ -n "$INSTALL" ]; then
|
||||
eval apt-get install "$CMD"
|
||||
dpkg -i $FILE
|
||||
else
|
||||
echo apt-get install $CMD
|
||||
elif [ -n "$CMD" ]; then
|
||||
echo apt-get install ${CMD}
|
||||
fi
|
||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -6,8 +6,9 @@ multistrap (2.1.6) unstable; urgency=low
|
|||
* Call dpkg --print-architecture for determination of host
|
||||
architecture. (Closes: #589713)
|
||||
* 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
|
||||
|
||||
|
|
Loading…
Reference in a new issue