mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-08 15:31:29 +00:00
Improvements to pbuilder-dist (close bug #160769, bug 160769 and fix compatibility issue with the existing fix for bug #140964)
This commit is contained in:
parent
e30595f81d
commit
b5f2c5e9e8
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -15,6 +15,10 @@ ubuntu-dev-tools (0.21) UNRELEASED; urgency=low
|
|||||||
* submittodebian: better changelog location detection
|
* submittodebian: better changelog location detection
|
||||||
* submittodebian: user-friendly error if python-debian isn't installed
|
* submittodebian: user-friendly error if python-debian isn't installed
|
||||||
* hugdaylist: improve error handling (less backtraces, more nice messages)
|
* hugdaylist: improve error handling (less backtraces, more nice messages)
|
||||||
|
* pbuilder-dist: look for global variable $PBUILDFOLDER (LP: #160769)
|
||||||
|
* pbuilder-dist: check pbuilder version and only use --components if supported
|
||||||
|
* pbuilder-dist: don't chown "unknown distribution" warning if an environment
|
||||||
|
of that release already exists (LP: #160769)
|
||||||
|
|
||||||
-- Siegfried-Angel Gevatter Pujals (RainCT) <sgevatter@ubuntu.cat> Sat, 27 Oct 2007 23:03:42 +0200
|
-- Siegfried-Angel Gevatter Pujals (RainCT) <sgevatter@ubuntu.cat> Sat, 27 Oct 2007 23:03:42 +0200
|
||||||
|
|
||||||
|
@ -14,9 +14,10 @@
|
|||||||
# 'pbuilder-feisty-i386', etc.
|
# 'pbuilder-feisty-i386', etc.
|
||||||
|
|
||||||
# Base directory where pbuilder will put all the files it creates
|
# Base directory where pbuilder will put all the files it creates
|
||||||
|
# This is overriden by the global variable $PBUILDFOLDER
|
||||||
BASE_DIR="$HOME/pbuilder"
|
BASE_DIR="$HOME/pbuilder"
|
||||||
|
|
||||||
# Enable additional repositories by default? (universe and multiverse in Ubuntu,
|
# Enable additional components by default? (universe and multiverse in Ubuntu,
|
||||||
# contrib and non-free in Debian.)
|
# contrib and non-free in Debian.)
|
||||||
EXTRACOMP=1
|
EXTRACOMP=1
|
||||||
|
|
||||||
@ -32,6 +33,11 @@ SYSCACHE=1
|
|||||||
ARCH=`dpkg-architecture -qDEB_HOST_ARCH`
|
ARCH=`dpkg-architecture -qDEB_HOST_ARCH`
|
||||||
SYSDIST=`lsb_release -cs`
|
SYSDIST=`lsb_release -cs`
|
||||||
|
|
||||||
|
if [ $PBUILDFOLDER ] && [ $PBUILDFOLDER != "" ]
|
||||||
|
then
|
||||||
|
BASE_DIR=$PBUILDFOLDER
|
||||||
|
fi
|
||||||
|
|
||||||
help()
|
help()
|
||||||
{
|
{
|
||||||
echo "Insufficient number of arguments."
|
echo "Insufficient number of arguments."
|
||||||
@ -94,10 +100,12 @@ distdata()
|
|||||||
if [ "$1" = "debian" ]
|
if [ "$1" = "debian" ]
|
||||||
then
|
then
|
||||||
# Set Debian specific data
|
# Set Debian specific data
|
||||||
|
ISDEBIAN=True
|
||||||
ARCHIVE="http://ftp.debian.org"
|
ARCHIVE="http://ftp.debian.org"
|
||||||
COMPONENTS="main"$( [ $EXTRACOMP = 0 ] || echo " contrib non-free" )
|
COMPONENTS="main"$( [ $EXTRACOMP = 0 ] || echo " contrib non-free" )
|
||||||
else
|
else
|
||||||
# Set Ubuntu specific data
|
# Set Ubuntu specific data
|
||||||
|
ISDEBIAN=False
|
||||||
ARCHIVE="http://archive.ubuntu.com/ubuntu"
|
ARCHIVE="http://archive.ubuntu.com/ubuntu"
|
||||||
COMPONENTS="main restricted"$( [ $EXTRACOMP = 0 ] || echo " universe multiverse" )
|
COMPONENTS="main restricted"$( [ $EXTRACOMP = 0 ] || echo " universe multiverse" )
|
||||||
fi
|
fi
|
||||||
@ -114,8 +122,9 @@ case $DISTRIBUTION in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Warning: Unknown distribution «$DISTRIBUTION»."
|
if [ ! -d $BASE_DIR/${DISTRIBUTION}-* ]
|
||||||
echo -n "Continue [y/N]? "
|
then
|
||||||
|
echo -n "Warning: Unknown distribution «$DISTRIBUTION». Do you want to continue [y/N]? "
|
||||||
read continue
|
read continue
|
||||||
|
|
||||||
if [ "$continue" != 'y' ] && [ "$continue" != 'Y' ]
|
if [ "$continue" != 'y' ] && [ "$continue" != 'Y' ]
|
||||||
@ -123,7 +132,7 @@ case $DISTRIBUTION in
|
|||||||
echo "Aborting..."
|
echo "Aborting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
distdata
|
distdata
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -160,6 +169,20 @@ then
|
|||||||
DEBCACHE='/var/cache/apt/archives/'
|
DEBCACHE='/var/cache/apt/archives/'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check what version of pbuilder is installed, and if
|
||||||
|
# it's supported, use the --components option
|
||||||
|
if dpkg --compare-versions $(dpkg-query -W -f='${Version}' pbuilder) ge 0.174
|
||||||
|
then
|
||||||
|
if [ $ISDEBIAN = True ]; then
|
||||||
|
echo "Warning: If this operation fails it might be because you changed the value of $COMPONENTS in the pbuilderrc file."
|
||||||
|
echo "See https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/140964 for more information."
|
||||||
|
fi
|
||||||
|
COMPONENTS_LINE="--othermirror \"\" --components \"$COMPONENTS\""
|
||||||
|
else
|
||||||
|
# else, do it the old way
|
||||||
|
COMPONENTS_LINE="--othermirror \"deb $ARCHIVE $DISTRIBUTION $COMPONENTS\""
|
||||||
|
fi
|
||||||
|
|
||||||
sudo pbuilder $OPERATION \
|
sudo pbuilder $OPERATION \
|
||||||
--basetgz $BASE_DIR/$FOLDERBASE-base.tgz \
|
--basetgz $BASE_DIR/$FOLDERBASE-base.tgz \
|
||||||
--distribution $DISTRIBUTION \
|
--distribution $DISTRIBUTION \
|
||||||
@ -168,6 +191,5 @@ sudo pbuilder $OPERATION \
|
|||||||
$( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \
|
$( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \
|
||||||
--buildresult $BASE_DIR/${FOLDERBASE}_result \
|
--buildresult $BASE_DIR/${FOLDERBASE}_result \
|
||||||
--mirror "$ARCHIVE" \
|
--mirror "$ARCHIVE" \
|
||||||
--othermirror "" \
|
$COMPONENTS_LINE \
|
||||||
--components "$COMPONENTS" \
|
|
||||||
$@
|
$@
|
||||||
|
Loading…
x
Reference in New Issue
Block a user