mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-17 20:01:30 +00:00
mk-sbuild: Add ubuntu_dist_ge and use it to set BUILD_PKGS for Ubuntu.
This commit is contained in:
parent
1f7b7ea4ff
commit
92822060b2
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
ubuntu-dev-tools (0.163) unstable; urgency=medium
|
||||||
|
|
||||||
|
* mk-sbuild: Add ubuntu_dist_ge and use it to set BUILD_PKGS for Ubuntu.
|
||||||
|
|
||||||
|
-- Adam Conrad <adconrad@ubuntu.com> Tue, 24 Apr 2018 05:11:18 -0600
|
||||||
|
|
||||||
ubuntu-dev-tools (0.162) unstable; urgency=medium
|
ubuntu-dev-tools (0.162) unstable; urgency=medium
|
||||||
|
|
||||||
[ Mattia Rizzolo ]
|
[ Mattia Rizzolo ]
|
||||||
|
37
mk-sbuild
37
mk-sbuild
@ -330,6 +330,29 @@ elif [ -z "$DISTRO" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$DISTRO" = "ubuntu" ]; then
|
||||||
|
ubuntu_dist_ge() {
|
||||||
|
local releases="$(ubuntu-distro-info --all)"
|
||||||
|
local seq=1
|
||||||
|
for i in $releases; do
|
||||||
|
if [ $1 = $i ]; then
|
||||||
|
local left=$seq
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
seq=$((seq+1))
|
||||||
|
done
|
||||||
|
seq=1
|
||||||
|
for i in $releases; do
|
||||||
|
if [ $2 = $i ]; then
|
||||||
|
local right=$seq
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
seq=$((seq+1))
|
||||||
|
done
|
||||||
|
[ $left -ge $right ] && return 0 || return 1
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
# By default, name the schroot the same as the release
|
# By default, name the schroot the same as the release
|
||||||
if [ -z "$name" ]; then
|
if [ -z "$name" ]; then
|
||||||
name="$RELEASE"
|
name="$RELEASE"
|
||||||
@ -494,11 +517,17 @@ ubuntu)
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
# Add edgy+ buildd tools
|
# Add edgy+ buildd tools
|
||||||
if [ "$RELEASE" != "breezy" ] && [ "$RELEASE" != "dapper" ]; then
|
if ubuntu_dist_ge "$RELEASE" "edgy"; then
|
||||||
|
# Add pkgbinarymangler (edgy and later)
|
||||||
|
BUILD_PKGS="$BUILD_PKGS pkgbinarymangler"
|
||||||
# Disable recommends for a smaller chroot (gutsy and later only)
|
# Disable recommends for a smaller chroot (gutsy and later only)
|
||||||
BUILD_PKGS="--no-install-recommends $BUILD_PKGS"
|
if ubuntu_dist_ge "$RELEASE" "gutsy"; then
|
||||||
# Add buildd tools
|
BUILD_PKGS="--no-install-recommends $BUILD_PKGS"
|
||||||
BUILD_PKGS="$BUILD_PKGS pkg-create-dbgsym pkgbinarymangler"
|
fi
|
||||||
|
# Add pkg-create-dbgsym (edgy through zesty)
|
||||||
|
if ! ubuntu_dist_ge "$RELEASE" "artful"; then
|
||||||
|
BUILD_PKGS="$BUILD_PKGS pkg-create-dbgsym"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
debian)
|
debian)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user