[PATCH] Name the dummy package according to the source package
Mehdi Dogguy
dogguy at pps.jussieu.fr
Thu May 14 18:58:47 UTC 2009
---
debian/changelog | 8 ++++++++
pbuilder-satisfydepends-aptitude | 22 ++++++++++++----------
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 95ac335..931f6ba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pbuilder (0.187+nmu1) unstable; urgency=low
+
+ * Make pbuilder-satisfydepends-aptitude and pbuilder-satisfydepends
+ install pbuilder-satisfydepends-dummy-$PACKAGE instead of
+ pbuilder-satisfydepends-dummy.
+
+ -- Mehdi Dogguy <dogguy at pps.jussieu.fr> Thu, 14 May 2009 20:25:19 +0200
+
pbuilder (0.187) unstable; urgency=low
[ Junichi Uekawa ]
diff --git a/pbuilder-satisfydepends-aptitude b/pbuilder-satisfydepends-aptitude
index dafdc4f..ba2fc27 100755
--- a/pbuilder-satisfydepends-aptitude
+++ b/pbuilder-satisfydepends-aptitude
@@ -61,19 +61,21 @@ function checkbuilddep_internal () {
local BUILD_DEP_DEB_CONTROL
local DEPENDS
local CONFLICTS
+ local PKG_NAME="pbuilder-satisfydepends-dummy-$(sed -n 's/Source: //p' debian/control)"
+ local PKG_VERSION="$(head -n1 debian/changelog | sed -n 's/.\+(\([^ ]\+\)).\+/\1/p')" || "0.invalid.0"
echo " -> Attempting to satisfy build-dependencies"
DEPENDS="$(get_control_re "$DEBIAN_CONTROL" "$BD_REGEXP" | filter_arch_deps "$ARCH")"
CONFLICTS="$(get_control_re "$DEBIAN_CONTROL" "$BC_REGEXP" | filter_arch_deps "$ARCH")"
- echo " -> Creating pbuilder-satisfydepends-dummy package"
+ echo " -> Creating $PKG_NAME package"
BUILD_DEP_DEB_DIR="/tmp/satisfydepends-aptitude"
- BUILD_DEP_DEB_CONTROL="$BUILD_DEP_DEB_DIR/pbuilder-satisfydepends-dummy/DEBIAN/control"
- $CHROOTEXEC mkdir -p "$BUILD_DEP_DEB_DIR/pbuilder-satisfydepends-dummy/DEBIAN/"
+ BUILD_DEP_DEB_CONTROL="$BUILD_DEP_DEB_DIR/$PKG_NAME/DEBIAN/control"
+ $CHROOTEXEC mkdir -p "$BUILD_DEP_DEB_DIR/$PKG_NAME/DEBIAN/"
$CHROOTEXEC sh -c "cat >\"$BUILD_DEP_DEB_CONTROL\"" <<EOF
-Package: pbuilder-satisfydepends-dummy
-Version: 0.invalid.0
+Package: $PKG_NAME
+Version: $PKG_VERSION
Architecture: $ARCH
Maintainer: Debian Pbuilder Team <pbuilder-maint at lists.alioth.debian.org>
-Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder
+Description: Dummy package to satisfy dependencies of $PKG_NAME with aptitude - created by pbuilder
This package was created automatically by pbuilder and should
EOF
if [ -n "$DEPENDS" ]; then
@@ -83,12 +85,12 @@ EOF
$CHROOTEXEC sh -c "echo \"Conflicts: $CONFLICTS\" >>\"$BUILD_DEP_DEB_CONTROL\""
fi
$CHROOTEXEC sh -c "cat \"$BUILD_DEP_DEB_CONTROL\""
- $CHROOTEXEC sh -c "dpkg-deb -b \"$BUILD_DEP_DEB_DIR/pbuilder-satisfydepends-dummy\""
+ $CHROOTEXEC sh -c "dpkg-deb -b \"$BUILD_DEP_DEB_DIR/$PKG_NAME\""
$CHROOTEXEC apt-get -y --force-yes install aptitude
- $CHROOTEXEC dpkg -i "$BUILD_DEP_DEB_DIR/pbuilder-satisfydepends-dummy.deb" || true
- $CHROOTEXEC aptitude -y --without-recommends -o APT::Install-Recommends=false -o Aptitude::CmdLine::Ignore-Trust-Violations=true -o Aptitude::ProblemResolver::StepScore=100 install pbuilder-satisfydepends-dummy
+ $CHROOTEXEC dpkg -i "$BUILD_DEP_DEB_DIR/$PKG_NAME.deb" || true
+ $CHROOTEXEC aptitude -y --without-recommends -o APT::Install-Recommends=false -o Aptitude::CmdLine::Ignore-Trust-Violations=true -o Aptitude::ProblemResolver::StepScore=100 install $PKG_NAME
# check whether the aptitude's resolver kept the package
- if ! $CHROOTEXEC dpkg -l pbuilder-satisfydepends-dummy 2>/dev/null | grep -q ^ii; then
+ if ! $CHROOTEXEC dpkg -l $PKG_NAME 2>/dev/null | grep -q ^ii; then
echo "Aptitude couldn't satisfy the build dependencies"
exit 1
fi
--
1.6.2.4
--qMm9M+Fa2AknHoGS--
More information about the Pbuilder-maint
mailing list