Commit b82c6252 authored by Emilio Pozuelo Monfort's avatar Emilio Pozuelo Monfort Committed by Junichi Uekawa

Bug#606699: pbuilder NMU

Hi,

I talked to Junichi and he told me it was fine if I NMU'ed pbuilder to fix these
bugs. This is the debdiff for my NMU.

Regards,
Emilio
parent b8ba16bb
......@@ -184,7 +184,7 @@ check: export PBUILDER_CHECKOUT := $(CURDIR)
check:
# syntax check
$(foreach script,$(CHECK_SCRIPTS),bash -n $(script)$(newline))
$(foreach mp,$(CHECK_MANPAGES),LANG=C MANWIDTH=80 man --warnings -E UTF-8 -l $(mp) >/dev/null$(newline))
$(foreach mp,$(CHECK_MANPAGES),LANG=C MANWIDTH=80 man --warnings -l $(mp) >/dev/null$(newline))
# testsuite
$(foreach test,$(wildcard ./test_*),$(test)$(newline))
......
pbuilder (0.199+nmu2) unstable; urgency=low
* Non-maintainer upload with maintainer's permission.
* pbuilder-satisfydepends-aptitude: Resolve packages from experimental
when necessary. Logic stolen from sbuild. Closes: #606699.
* pbuilder-buildpackage, pbuilder-buildpackage-funcs: Handle
architecture wildcards properly. Patch from Andres Mejia.
Closes: #363193.
* Makefile: Don't require a UTF-8 encoding to check the manpages.
-- Emilio Pozuelo Monfort <pochu@debian.org> Sat, 19 Feb 2011 19:02:34 +0000
pbuilder (0.199+nmu1) unstable; urgency=low
* Non-Maintainer Upload.
......
......@@ -31,6 +31,9 @@ if [ ! -f "$PACKAGENAME" ]; then
exit 1;
fi;
# check if this package should be built at all
checkarchitecture "$PACKAGENAME"
if [ -n "$BUILDUSERNAME" -a -n "$BUILDUSERID" ]; then
SUTOUSER="env LOGNAME=$BUILDUSERNAME su -p $BUILDUSERNAME"
DEBBUILDOPTS="${DEBBUILDOPTS:+$DEBBUILDOPTS }-rfakeroot"
......
......@@ -30,6 +30,25 @@ function copydsc () {
done
}
function checkarchitecture () {
local DSCFILE="$1"
local ARCHES="$(cat $DSCFILE | grep Architecture | sed 's/^[^:]\+:\s*//')"
local ARCH=$(dpkg-architecture -qDEB_HOST_ARCH)
local VALID_ARCH
for d in $ARCHES; do
if dpkg-architecture -a$ARCH -i$d; then
VALID_ARCH="yes"
break
fi
done
if [ ! $VALID_ARCH ] && [ ! "$ARCHES" = "all" ]; then
local msg="E: $ARCH not in arch list or does not match any "
msg="$msg arch wildcards: $ARCHES"
log $msg
exit 2
fi
}
function checkbuilddep () {
# call satisfydepends
local BUILDOPT="--binary-all"
......
......@@ -88,8 +88,8 @@ EOF
fi
$CHROOTEXEC sh -c "cat \"$BUILD_DEP_DEB_CONTROL\""
$CHROOTEXEC sh -c "dpkg-deb -b \"$BUILD_DEP_DEB_DIR/pbuilder-satisfydepends-dummy\""
$CHROOTEXEC dpkg -i "$BUILD_DEP_DEB_DIR/pbuilder-satisfydepends-dummy.deb" || true
$CHROOTEXEC aptitude -y --without-recommends -o APT::Install-Recommends=false "${PBUILDER_APTITUDE_CHECK_OPTS[@]}" -o Aptitude::ProblemResolver::StepScore=100 install pbuilder-satisfydepends-dummy
$CHROOTEXEC dpkg --force-depends --force-conflicts -i "$BUILD_DEP_DEB_DIR/pbuilder-satisfydepends-dummy.deb" || true
$CHROOTEXEC aptitude -y --without-recommends -o APT::Install-Recommends=false "${PBUILDER_APTITUDE_CHECK_OPTS[@]}" -o Aptitude::ProblemResolver::StepScore=100 -o "Aptitude::ProblemResolver::Hints::KeepDummy=reject pbuilder-satisfydepends-dummy :UNINST" -o Aptitude::ProblemResolver::Keep-All-Level=55000 -o Aptitude::ProblemResolver::Remove-Essential-Level=maximum install pbuilder-satisfydepends-dummy
# check whether the aptitude's resolver kept the package
if ! $CHROOTEXEC dpkg -l pbuilder-satisfydepends-dummy 2>/dev/null | grep -q ^ii; then
echo "Aptitude couldn't satisfy the build dependencies"
......
......@@ -123,19 +123,32 @@ checkbuilddep_archdeps() {
local ARCH="$2"
# architectures listed between [ and ] for this dep
local DEP_ARCHES="$(echo "$INSTALLPKG" | sed 's/.*\[\(.*\)\].*/\1/')"
# check for !$ARCH in DEP_ARCHES
if echo "$DEP_ARCHES" | egrep -q "(^|[[:space:]/]+)\![[:space:]/]*$ARCH($|[[:space:]/]+)"; then
return 0;
local PKG="$(echo "$INSTALLPKG" | cut -d ' ' -f 1)"
local USE_IT
local IGNORE_IT
local INCLUDE
# Use 'dpkg-architecture' to support architecture wildcards.
for d in $DEP_ARCHES; do
if echo "$d" | grep -q '!'; then
d="$(echo $d | sed 's/!//')"
if dpkg-architecture -a$ARCH -i$d; then
IGNORE_IT="yes"
fi
else
if dpkg-architecture -a$ARCH -i$d; then
USE_IT="yes"
fi
INCLUDE="yes"
fi
done
if [ $IGNORE_IT ] && [ $USE_IT ]; then
printf "W: inconsistent arch restriction on $PKG: " >&2
printf "$DEP_ARCHES depedency\n" >&2
fi
# check for a "!" which would mean there's a !<otherarch> and hence $ARCH
# is included
if ! echo "$DEP_ARCHES" | grep -q '!'; then
# check for $ARCH in DEP_ARCHES
if ! echo "$DEP_ARCHES" | egrep -q "(^|[[:space:]/]+)$ARCH($|[[:space:]/]+)"; then
return 0;
fi
if [ $IGNORE_IT ] || ( [ $INCLUDE ] && [ ! $USE_IT ] ); then
return 0
fi
return 1;
return 1
}
checkbuilddep_provides() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment