]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts/build_utils.sh: set hookdir using pbuilderrc 1795/head
authorKefu Chai <kchai@redhat.com>
Wed, 7 Apr 2021 13:09:57 +0000 (21:09 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 7 Apr 2021 13:58:08 +0000 (21:58 +0800)
per our testing, --hookdir does not work even the pbuilderrc(5) puts

> HOOKDIR=/usr/lib/pbuilder/hooks
>    Specifies the default location for the user hooks directory.  This is overridden with the option --hookdir.

so let use HOOKDIR as we did before e81fd7baa0e49242cef2db66eeb3fe6dc4269905

Signed-off-by: Kefu Chai <kchai@redhat.com>
scripts/build_utils.sh

index 48d07f845ca77c3225aad52605818d02575da482..5c8c205e47841fded44ee01c0c7f7c1cef8b8afd 100644 (file)
@@ -596,14 +596,11 @@ setup_pbuilder() {
         echo "$extrapackages" >> ~/.pbuilderrc
     fi
 
-    local hookdir
-    hookdir=$(recreate_hookdir)
 
     local opts
     opts+=" --basetgz $basedir/$DIST.tgz"
     opts+=" --distribution $DIST"
     opts+=" --mirror $mirror"
-    opts+=" --hookdir $hookdir"
 
     if [ -n "$use_gcc" ]; then
         # Newer pbuilder versions set $HOME to /nonexistent which breaks all kinds of
@@ -616,8 +613,11 @@ setup_pbuilder() {
         # in newer versions. This ticket solves the specific issue in 8.1.1 (which vendors urllib3):
         # https://github.com/shazow/urllib3/issues/567
         echo "USENETWORK=yes" >> ~/.pbuilderrc
+        local hookdir
+        hookdir=$(recreate_hookdir)
         setup_updates_repo $hookdir
         setup_pbuilder_for_ppa $hookdir
+        echo "HOOKDIR=$hookdir" >> ~/.pbuilderrc
     fi
     sudo cp ~/.pbuilderrc /root/.pbuilderrc
     sudo pbuilder clean