scripts/build_utils.sh: no need to update repo if ppa repo is not used
authorKefu Chai <kchai@redhat.com>
Wed, 7 Apr 2021 12:43:56 +0000 (20:43 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 7 Apr 2021 13:58:08 +0000 (21:58 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
scripts/build_utils.sh

index 2b98ffdb87ff086786ab884e782627f624ce2540..48d07f845ca77c3225aad52605818d02575da482 100644 (file)
@@ -605,7 +605,6 @@ setup_pbuilder() {
     opts+=" --mirror $mirror"
     opts+=" --hookdir $hookdir"
 
-    setup_updates_repo $hookdir
     if [ -n "$use_gcc" ]; then
         # Newer pbuilder versions set $HOME to /nonexistent which breaks all kinds of
         # things that rely on a proper (writable) path. Setting this to the system user's $HOME is not enough
@@ -617,6 +616,7 @@ 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
+        setup_updates_repo $hookdir
         setup_pbuilder_for_ppa $hookdir
     fi
     sudo cp ~/.pbuilderrc /root/.pbuilderrc