diff --git a/mock/py/mockbuild/buildroot.py b/mock/py/mockbuild/buildroot.py index fa331f66b..29a5c502d 100644 --- a/mock/py/mockbuild/buildroot.py +++ b/mock/py/mockbuild/buildroot.py @@ -880,7 +880,7 @@ def _setup_nosync(self): multilib = ('x86_64', 's390x') # ld_preload need to be same as in bootstrap because we call DNF in bootstrap, but # but it will load nosync from the final chroot - if self.bootstrap_buildroot is not None: + if self.bootstrap_buildroot is not None and self.bootstrap_buildroot.tmpdir is not None: self.tmpdir = self.bootstrap_buildroot.tmpdir if not os.path.isdir(self.tmpdir): os.mkdir(self.tmpdir, 0o700) diff --git a/releng/release-notes-next/fix-mock-init.bugfix b/releng/release-notes-next/fix-mock-init.bugfix new file mode 100644 index 000000000..069a3c38b --- /dev/null +++ b/releng/release-notes-next/fix-mock-init.bugfix @@ -0,0 +1,3 @@ +mock --init occasionally failed because bootstrap buildroot hadn't +set up its temporary directory ([issue#1351][]). +