improved check for working pristine-tar related to #901952
Only downgrade tar if pristine-tar does not work and tar is 1.30. Otherwise use uscan. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901952
This commit is contained in:
parent
fcfd93f7cd
commit
9387318146
|
|
@ -32,9 +32,13 @@ if [[ $debversion = *-* ]]; then
|
|||
git clean -fdx
|
||||
git reset --hard
|
||||
git fetch --all
|
||||
uscan_download="false"
|
||||
if git checkout -B pristine-tar origin/pristine-tar; then
|
||||
orig=$(pristine-tar list| head -1)
|
||||
tar_version=`dpkg -s tar | grep '^Version:'`
|
||||
if [[ $tar_version == "Version: 1.30"* ]]; then
|
||||
if pristine-tar checkout $orig; then
|
||||
echo "pristine-tar works"
|
||||
elif [[ $tar_version == "Version: 1.30"* ]]; then
|
||||
echo "WARNING: tar v1.30 breaks pristine-tar when working with commits created by older versions of tar https://bugs.debian.org/901952, downgrading to tar 1.29b-1.1"
|
||||
printf 'Package: tar\nPin: version 1.30+dfsg-2\nPin-Priority: -1\n' \
|
||||
> /etc/apt/preferences.d/ban-broken-tar.pref
|
||||
|
|
@ -42,9 +46,14 @@ if [[ $debversion = *-* ]]; then
|
|||
wget -q http://deb.debian.org/debian/pool/main/t/tar/tar_1.29b-1.1_amd64.deb
|
||||
dpkg -i tar_1.29b-1.1_amd64.deb
|
||||
rm -f tar_1.29b-1.1_amd64.deb
|
||||
else
|
||||
uscan_download="true"
|
||||
fi
|
||||
rm -f $orig
|
||||
buildpackage_options=--git-pristine-tar
|
||||
else
|
||||
fi
|
||||
|
||||
if [ $uscan_download = "true" ]; then
|
||||
echo "no pristine-tar branch, trying uscan";
|
||||
apt_get_auto_install gnupg2 libwww-perl;
|
||||
uscan --verbose --download-current-version --force-download --rename;
|
||||
|
|
|
|||
Loading…
Reference in New Issue