aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@netfort.gr.jp>2012-03-09 08:14:19 +0900
committerJunichi Uekawa <dancer@netfort.gr.jp>2012-03-09 08:14:19 +0900
commit7aa69397d99fff86196c3a835551f099e4603057 (patch)
tree0ea32320ac6f569b2a1c6dec6a9b6aa86acdf46e
parent78747b5f1081e3afa1d5e0147c4efdbd833b7d14 (diff)
downloadpbuilder-7aa69397d99fff86196c3a835551f099e4603057.tar
pbuilder-7aa69397d99fff86196c3a835551f099e4603057.tar.gz
make longer lines wrap so reading patch files aren't as painful.
-rwxr-xr-xpbuilder-createbuildenv14
-rw-r--r--pbuilder-loadconfig5
-rw-r--r--pbuilder-modules6
-rwxr-xr-xpbuilder-satisfydepends-aptitude16
-rwxr-xr-xpbuilder-satisfydepends-funcs3
-rw-r--r--pbuilder-uml-checkparams6
-rwxr-xr-xpbuilder-updatebuildenv5
-rw-r--r--pdebuild29
-rw-r--r--pdebuild-user-mode-linux14
9 files changed, 83 insertions, 15 deletions
diff --git a/pbuilder-createbuildenv b/pbuilder-createbuildenv
index b23c343..e17307c 100755
--- a/pbuilder-createbuildenv
+++ b/pbuilder-createbuildenv
@@ -65,7 +65,14 @@ fi
# FIXME if the end-user passes another --include= to debootstrap in
# DEBOOTSTRAPOPTS, it will override the --include=apt one and apt might not be
# installed
-if ! ( cd "$BUILDPLACE" && "${DEBOOTSTRAP}" ${ARCHITECTURE:+--arch=$ARCHITECTURE} --include=apt "${DEBOOTSTRAPOPTS[@]}" "$DISTRIBUTION" . "$MIRRORSITE" $DEBOOTSTRAPSCRIPT ) ; then
+if ! ( cd "$BUILDPLACE" && \
+ "${DEBOOTSTRAP}" ${ARCHITECTURE:+--arch=$ARCHITECTURE} \
+ --include=apt \
+ "${DEBOOTSTRAPOPTS[@]}" \
+ "$DISTRIBUTION" \
+ . \
+ "$MIRRORSITE" \
+ $DEBOOTSTRAPSCRIPT ) ; then
log "E: $DEBOOTSTRAP failed"
exit 1
fi
@@ -116,7 +123,10 @@ if [ -n "$REMOVEPACKAGES" ]; then
fi
recover_aptcache
$CHROOTEXEC /usr/bin/apt-get -q -y "${APTGETOPT[@]}" "${FORCE_CONFNEW[@]}" dist-upgrade
-$CHROOTEXEC /usr/bin/apt-get -q -y "${APTGETOPT[@]}" install build-essential dpkg-dev $EXTRAPACKAGES
+$CHROOTEXEC /usr/bin/apt-get -q -y "${APTGETOPT[@]}" install \
+ build-essential \
+ dpkg-dev \
+ $EXTRAPACKAGES
save_aptcache
executehooks "E"
diff --git a/pbuilder-loadconfig b/pbuilder-loadconfig
index bd42461..67e7a61 100644
--- a/pbuilder-loadconfig
+++ b/pbuilder-loadconfig
@@ -20,7 +20,10 @@
export PBUILDER_PKGDATADIR="${PBUILDER_PKGDATADIR:-$PBUILDER_ROOT/usr/share/pbuilder}"
export PBUILDER_SYSCONFDIR="${PBUILDER_SYSCONFDIR:-$PBUILDER_ROOT/etc}"
-for RCFILE in "$PBUILDER_PKGDATADIR"/pbuilderrc "$PBUILDER_SYSCONFDIR"/pbuilderrc "$HOME"/.pbuilderrc; do
+for RCFILE in \
+ "$PBUILDER_PKGDATADIR"/pbuilderrc \
+ "$PBUILDER_SYSCONFDIR"/pbuilderrc \
+ "$HOME"/.pbuilderrc; do
if [ -f "$RCFILE" ]; then
. "$RCFILE"
else
diff --git a/pbuilder-modules b/pbuilder-modules
index 9b9cca0..36180ba 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -135,11 +135,13 @@ function seems_truly_unmounted() {
log "W: $mountpoint isn't a directory"
return 1
fi
- if [ -r "$BUILDPLACE/proc/mounts" ] && grep -q "^[^ ]* $mountpoint " "$BUILDPLACE/proc/mounts"; then
+ if [ -r "$BUILDPLACE/proc/mounts" ] && \
+ grep -q "^[^ ]* $mountpoint " "$BUILDPLACE/proc/mounts"; then
log "W: $mountpoint is mounted according to build place's /proc/mounts"
return 1
fi
- if [ -r "/proc/mounts" ] && grep -q "^[^ ]* $BUILDPLACE/$mountpoint " "/proc/mounts"; then
+ if [ -r "/proc/mounts" ] && \
+ grep -q "^[^ ]* $BUILDPLACE/$mountpoint " "/proc/mounts"; then
log "W: $mountpoint is mounted according to system's /proc/mounts"
return 1
fi
diff --git a/pbuilder-satisfydepends-aptitude b/pbuilder-satisfydepends-aptitude
index 35a8374..97c58e5 100755
--- a/pbuilder-satisfydepends-aptitude
+++ b/pbuilder-satisfydepends-aptitude
@@ -88,8 +88,20 @@ 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 --force-depends --force-conflicts -i "$BUILD_DEP_DEB_DIR/pbuilder-satisfydepends-dummy.deb" || true
- $CHROOTEXEC aptitude -y --without-recommends -o APT::Install-Recommends=false "${APTITUDEOPT[@]}" -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
+ $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 \
+ "${APTITUDEOPT[@]}" \
+ -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 bace59d..6c8dc28 100755
--- a/pbuilder-satisfydepends-funcs
+++ b/pbuilder-satisfydepends-funcs
@@ -154,7 +154,8 @@ checkbuilddep_archdeps() {
checkbuilddep_provides() {
local PACKAGENAME="$1"
# PROVIDED needs to be used outside of this function.
- PROVIDED=$($CHROOTEXEC /usr/bin/apt-cache showpkg $PACKAGENAME | awk '{p=0}/^Reverse Provides:/,/^$/{p=1}{if(p && ($0 !~ "Reverse Provides:")){PACKAGE=$1}} END{print PACKAGE}')
+ PROVIDED=$($CHROOTEXEC /usr/bin/apt-cache showpkg $PACKAGENAME \
+ | awk '{p=0}/^Reverse Provides:/,/^$/{p=1}{if(p && ($0 !~ "Reverse Provides:")){PACKAGE=$1}} END{print PACKAGE}')
}
# returns either "package=version", to append to an apt-get install line, or
diff --git a/pbuilder-uml-checkparams b/pbuilder-uml-checkparams
index 2267f8f..4157b5b 100644
--- a/pbuilder-uml-checkparams
+++ b/pbuilder-uml-checkparams
@@ -21,7 +21,11 @@
# requires
# . /usr/lib/pbuilder/pbuilder-loadconfig
-for SYSTEM_CONFIG in /usr/share/pbuilder/pbuilder-uml.conf /etc/pbuilder/pbuilder-uml.conf ${HOME}/.pbuilderrc ${HOME}/.pbuilder-umlrc; do
+for SYSTEM_CONFIG in \
+ /usr/share/pbuilder/pbuilder-uml.conf \
+ /etc/pbuilder/pbuilder-uml.conf \
+ ${HOME}/.pbuilderrc \
+ ${HOME}/.pbuilder-umlrc; do
if [ -f ${SYSTEM_CONFIG} ]; then
. ${SYSTEM_CONFIG}
fi
diff --git a/pbuilder-updatebuildenv b/pbuilder-updatebuildenv
index 737f53d..084528e 100755
--- a/pbuilder-updatebuildenv
+++ b/pbuilder-updatebuildenv
@@ -69,7 +69,10 @@ $CHROOTEXEC /usr/bin/apt-get -q -y "${APTGETOPT[@]}" "${FORCE_CONFNEW[@]}" dist-
# support autoremove. TODO: Do not ignore error when etch is no longer
# supported.
$CHROOTEXEC /usr/bin/apt-get -q -y "${APTGETOPT[@]}" autoremove || true
-$CHROOTEXEC /usr/bin/apt-get -q -y "${APTGETOPT[@]}" install build-essential dpkg-dev $EXTRAPACKAGES
+$CHROOTEXEC /usr/bin/apt-get -q -y "${APTGETOPT[@]}" install \
+ build-essential \
+ dpkg-dev \
+ $EXTRAPACKAGES
save_aptcache
# To support package verification inside the repository we may have to import
diff --git a/pdebuild b/pdebuild
index 35966bd..97df19b 100644
--- a/pdebuild
+++ b/pdebuild
@@ -44,7 +44,20 @@ export BUILDRESULTUID=$(id -u)
export BUILDRESULTGID=$(id -g)
if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then
- ${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --execute ${EXTRA_CONFIGFILE[@]/#/--configfile } --bindmounts $(readlink -f ..) "$@" -- /usr/lib/pbuilder/pdebuild-internal ${PWD} --debbuildopts "" --debbuildopts "${DEBBUILDOPTS}" --uid "${BUILDRESULTUID}" --gid "${BUILDRESULTGID}" --pbuildersatisfydepends "$PBUILDERSATISFYDEPENDSCMD"
+ ${PBUILDERROOTCMD} \
+ ${PDEBUILD_PBUILDER} \
+ --execute \
+ ${EXTRA_CONFIGFILE[@]/#/--configfile } \
+ --bindmounts $(readlink -f ..) \
+ "$@" \
+ -- \
+ /usr/lib/pbuilder/pdebuild-internal \
+ ${PWD} \
+ --debbuildopts "" \
+ --debbuildopts "${DEBBUILDOPTS}" \
+ --uid "${BUILDRESULTUID}" \
+ --gid "${BUILDRESULTGID}" \
+ --pbuildersatisfydepends "$PBUILDERSATISFYDEPENDSCMD"
if [ -d "${BUILDRESULT}" ]; then
for files in $(sed -rn '/^Files:/,${s/^ .* ([^ ]+)$/\1/p}' ../${CHANGES}); do
conditional_cp_a ../"$files" "${BUILDRESULT}"
@@ -58,8 +71,18 @@ else
if ! dpkg-checkbuilddeps -B ; then
log "W: Unmet build-dependency in source"
fi
- echo "dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS" | perl -pe 's/(^|\s)-[AbBF](\s|$)/$1$2/g' | /bin/bash
- ${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --build ${EXTRA_CONFIGFILE[@]/#/--configfile } --buildresult "${BUILDRESULT}" --debbuildopts "" --debbuildopts "${DEBBUILDOPTS}" "$@" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc
+ echo "dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS" | \
+ perl -pe 's/(^|\s)-[AbBF](\s|$)/$1$2/g' | \
+ /bin/bash
+ ${PBUILDERROOTCMD} \
+ ${PDEBUILD_PBUILDER} \
+ --build \
+ ${EXTRA_CONFIGFILE[@]/#/--configfile } \
+ --buildresult "${BUILDRESULT}" \
+ --debbuildopts "" \
+ --debbuildopts "${DEBBUILDOPTS}" \
+ "$@" \
+ ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc
fi
# do signing with optional key specifier
diff --git a/pdebuild-user-mode-linux b/pdebuild-user-mode-linux
index daab151..6c8b86d 100644
--- a/pdebuild-user-mode-linux
+++ b/pdebuild-user-mode-linux
@@ -41,7 +41,14 @@ if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then
echo "E: Cannot find .. dir from PWD=$(pwd)" >&2
exit 1
fi
- pbuilder-user-mode-linux execute "$@" --bindmounts $(readlink -f ..) /usr/lib/pbuilder/pdebuild-internal ${PWD} --debbuildopts "" --debbuildopts "${DEBBUILDOPTS}"
+ pbuilder-user-mode-linux \
+ execute \
+ "$@" \
+ --bindmounts $(readlink -f ..) \
+ /usr/lib/pbuilder/pdebuild-internal \
+ ${PWD} \
+ --debbuildopts "" \
+ --debbuildopts "${DEBBUILDOPTS}"
else
if ! dpkg-checkbuilddeps -B; then
echo "W: Unmet build-dependency in source" >&2
@@ -49,7 +56,10 @@ else
CMD="dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS"
echo "I: Running $CMD" >&2
echo "$CMD" | /bin/bash
- pbuilder-user-mode-linux build "$@" --buildresult "${UML_BUILDRESULT}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc
+ pbuilder-user-mode-linux build \
+ "$@" \
+ --buildresult "${UML_BUILDRESULT}" \
+ ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc
fi
# do signing with optional key specifier