source: trunk/debathena/scripts/sbuildhack @ 24680

Revision 24680, 815 bytes checked in by broder, 14 years ago (diff)
Populate the build chroot sources.list based on the Debathena release target. Previously, the build chroots always had production and -proposed in their sources.list, which can be undesirable in several scenarios, e.g. you're re-building packages to go directly into production or you're trying to plan a transition in -development. Instead of keeping Debathena entries in the default sources.list, use sbuildhack's --setup-hook option to populate the sources.list at build time, based on the DEBATHENA_RELEASE environment variable. Assume builds are against the traditional value of production and -proposed if DEBATHENA_RELEASE is unset.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3# Wrapper around sbuild.  The main purpose is to append a
4# distribution-dependent string like "~ubuntu7.10" to the binary
5# package version
6
7# This script us normally run as "da sbuildhack filename.dsc".
8
9# This script will skip dists listed in ./nobuild.
10
11usage() {
12    echo "Usage: $0 <dist>-<arch> ..." >&2
13    exit 1
14}
15
16. $(dirname "$0")/debian-versions.sh
17
18dist_arch=$1; shift
19if [ -z "$dist_arch" ]; then usage; fi
20IFS=- read dist arch <<EOF
21$dist_arch
22EOF
23if [ -z "$dist" ] || [ -z "$arch" ]; then usage; fi
24
25if [ -e nobuild ] && fgrep -q "$dist" nobuild; then
26  echo "Skipping $dist since it is listed in ./nobuild."
27  exit
28fi
29
30sbuild --append-to-version=`gettag "$dist"` \
31        -d "$dist" --arch="$arch" \
32        --apt-update --apt-distupgrade \
33        --setup-hook="$(dirname "$0")/chroot-sources" \
34        -v "$@"
Note: See TracBrowser for help on using the repository browser.