From d39fe92a7c8b67aeb10c724090269f1b5237c76e Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 27 Apr 2014 21:04:36 +0200 Subject: fixup job shells too (see previous commit) and thus switch to --directory... --- bin/schroot-create.sh | 10 ++-------- job-cfg/schroot.yaml | 6 +++--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh index 6fff0c49..fca04f43 100755 --- a/bin/schroot-create.sh +++ b/bin/schroot-create.sh @@ -40,8 +40,6 @@ if [ -z "$CHROOT_TARGET" ]; then exit 1 fi -export CURDIR=$(pwd) - bootstrap() { mkdir -p "$CHROOT_TARGET/etc/dpkg/dpkg.cfg.d" echo force-unsafe-io > "$CHROOT_TARGET/etc/dpkg/dpkg.cfg.d/02dpkg-unsafe-io" @@ -93,12 +91,8 @@ sudo tee /etc/schroot/chroot.d/jenkins-"$TARGET" <<-__END__ union-type=aufs __END__ -cd /tmp - -schroot -c "source:jenkins-$TARGET" -u root -- apt-get update +schroot --directory /root -c "source:jenkins-$TARGET" -u root -- apt-get update if [ -n "$1" ] then - schroot -c "source:jenkins-$TARGET" -u root -- apt-get install -y --no-install-recommends "$@" + schroot --directory /root -c "source:jenkins-$TARGET" -u root -- apt-get install -y --no-install-recommends "$@" fi - -cd $CURDIR diff --git a/job-cfg/schroot.yaml b/job-cfg/schroot.yaml index 557dd575..6d92d1f6 100644 --- a/job-cfg/schroot.yaml +++ b/job-cfg/schroot.yaml @@ -56,9 +56,9 @@ description: 'Upgrade {my_schroot} schroot.
{do_not_edit}' block-downstream: yes builders: - - shell: 'schroot -u root -c source:jenkins-{my_schroot} -- apt-get update' - - shell: 'schroot -u root -c source:jenkins-{my_schroot} -- apt-get -y -u dist-upgrade' - - shell: 'schroot -u root -c source:jenkins-{my_schroot} -- apt-get --purge autoremove' + - shell: 'schroot --directory /root -u root -c source:jenkins-{my_schroot} -- apt-get update' + - shell: 'schroot --directory /root -u root -c source:jenkins-{my_schroot} -- apt-get -y -u dist-upgrade' + - shell: 'schroot --directory /root -u root -c source:jenkins-{my_schroot} -- apt-get --purge autoremove' - job-template: defaults: schroot-create -- cgit v1.2.3-70-g09d2