diff options
author | Emilio Pozuelo Monfort <pochu@debian.org> | 2011-02-19 19:29:19 +0000 |
---|---|---|
committer | Junichi Uekawa <dancer@netfort.gr.jp> | 2011-06-24 19:32:19 +0900 |
commit | b82c625202cbb0a46f47bb4eb7c25eac8eb8bb54 (patch) | |
tree | 657e34131a99a2c03b007f6df9061111b330914e | |
parent | b8ba16bbb5354d65c6857df64b8488578ca648f7 (diff) | |
download | pbuilder-b82c625202cbb0a46f47bb4eb7c25eac8eb8bb54.tar pbuilder-b82c625202cbb0a46f47bb4eb7c25eac8eb8bb54.tar.gz |
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
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | debian/changelog | 12 | ||||
-rwxr-xr-x | pbuilder-buildpackage | 3 | ||||
-rw-r--r-- | pbuilder-buildpackage-funcs | 19 | ||||
-rwxr-xr-x | pbuilder-satisfydepends-aptitude | 4 | ||||
-rwxr-xr-x | pbuilder-satisfydepends-funcs | 35 |
6 files changed, 61 insertions, 14 deletions
@@ -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)) diff --git a/debian/changelog b/debian/changelog index ff042d9..05fd639 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +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. diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index b8e2446..8b42b6d 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -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" diff --git a/pbuilder-buildpackage-funcs b/pbuilder-buildpackage-funcs index 0c19dc7..fedbfc4 100644 --- a/pbuilder-buildpackage-funcs +++ b/pbuilder-buildpackage-funcs @@ -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" diff --git a/pbuilder-satisfydepends-aptitude b/pbuilder-satisfydepends-aptitude index 6dd3c91..6ea6cb0 100755 --- a/pbuilder-satisfydepends-aptitude +++ b/pbuilder-satisfydepends-aptitude @@ -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" diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs index f4cae2d..64436a0 100755 --- a/pbuilder-satisfydepends-funcs +++ b/pbuilder-satisfydepends-funcs @@ -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() { |