diff options
author | josch <j.schauer@email.de> | 2015-04-24 00:50:24 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-04-24 15:50:11 +0200 |
commit | ba54423bf8131ee1d61e619f8f4e784d5457c1f8 (patch) | |
tree | 73597bf0d04339356e2d26d2560389bc161d5497 /bin | |
parent | d09d5294c56876b88298b984bb29eff028543b5a (diff) | |
download | jenkins.debian.net-ba54423bf8131ee1d61e619f8f4e784d5457c1f8.tar.xz |
find_dpkg_trigger_cycles.sh: use APT_CONFIG environment variable instead of commandline option
- using commandline options does not work reliably because commandline
options are parsed last and thus many settings will not take effect
- see apt.conf(5) for the order in which configuration file parameters
are parsed by apt
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/find_dpkg_trigger_cycles.sh | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/bin/find_dpkg_trigger_cycles.sh b/bin/find_dpkg_trigger_cycles.sh index 4fd1c16e..dc2b6ac9 100755 --- a/bin/find_dpkg_trigger_cycles.sh +++ b/bin/find_dpkg_trigger_cycles.sh @@ -109,20 +109,12 @@ DIST="$1" DIRECTORY="`pwd`/debian-$DIST-$ARCH" APT_OPTS="-y" -APT_OPTS=$APT_OPTS" -o Apt::Architecture=$ARCH" -APT_OPTS=$APT_OPTS" -o Dir::Etc::TrustedParts=$DIRECTORY/etc/apt/trusted.gpg.d" -APT_OPTS=$APT_OPTS" -o Dir::Etc::Trusted=$DIRECTORY/etc/apt/trusted.gpg" -APT_OPTS=$APT_OPTS" -o Dir=$DIRECTORY/" -APT_OPTS=$APT_OPTS" -o Dir::Etc=$DIRECTORY/etc/apt/" -APT_OPTS=$APT_OPTS" -o Dir::Etc::SourceList=$DIRECTORY/etc/apt/sources.list" -APT_OPTS=$APT_OPTS" -o Dir::State=$DIRECTORY/var/lib/apt/" -APT_OPTS=$APT_OPTS" -o Dir::State::Status=$DIRECTORY/var/lib/dpkg/status" -APT_OPTS=$APT_OPTS" -o Dir::Cache=$DIRECTORY/var/cache/apt/" #APT_OPTS=$APT_OPTS" -o Acquire::Check-Valid-Until=false" # because we use snapshot mkdir -p $DIRECTORY mkdir -p $DIRECTORY/etc/apt/ mkdir -p $DIRECTORY/etc/apt/trusted.gpg.d/ +mkdir -p $DIRECTORY/etc/apt/apt.conf.d/ mkdir -p $DIRECTORY/etc/apt/sources.list.d/ mkdir -p $DIRECTORY/etc/apt/preferences.d/ mkdir -p $DIRECTORY/var/lib/apt/ @@ -137,6 +129,21 @@ touch $DIRECTORY/var/lib/dpkg/status echo deb $MIRROR $DIST main > $DIRECTORY/etc/apt/sources.list +cat << END > "$DIRECTORY/etc/apt/apt.conf" +Apt::Architecture "$ARCH"; +Dir::Etc::TrustedParts "$DIRECTORY/etc/apt/trusted.gpg.d"; +Dir::Etc::Trusted "$DIRECTORY/etc/apt/trusted.gpg"; +Dir "$DIRECTORY/"; +Dir::Etc "$DIRECTORY/etc/apt/"; +Dir::Etc::SourceList "$DIRECTORY/etc/apt/sources.list"; +Dir::State "$DIRECTORY/var/lib/apt/"; +Dir::State::Status "$DIRECTORY/var/lib/dpkg/status"; +Dir::Cache "$DIRECTORY/var/cache/apt/"; +END + +APT_CONFIG="$DIRECTORY/etc/apt/apt.conf" +export APT_CONFIG + apt-get $APT_OPTS update APT_FILE_OPTS="--architecture $ARCH" |