diff --git a/mock/py/mockbuild/plugins/chroot_scan.py b/mock/py/mockbuild/plugins/chroot_scan.py index 49247013e..9823d397a 100644 --- a/mock/py/mockbuild/plugins/chroot_scan.py +++ b/mock/py/mockbuild/plugins/chroot_scan.py @@ -32,11 +32,18 @@ def __init__(self, plugins, conf, buildroot): self.config = buildroot.config self.state = buildroot.state self.scan_opts = conf - self.resultdir = os.path.join(buildroot.resultdir, "chroot_scan") plugins.add_hook("postbuild", self._scanChroot) plugins.add_hook("initfailed", self._scanChroot) getLog().info("chroot_scan: initialized") + @property + def resultdir(self): + """ + The plugin's self.resultdir is a subdir of buildroot.resultdir, which + is, e.g., for --chain, changed for every single package. + """ + return os.path.join(self.buildroot.resultdir, "chroot_scan") + def _only_failed(self): """ Returns boolean value if option 'only_failed' is set. """ return str(self.scan_opts.get('only_failed')) == 'True' diff --git a/releng/release-notes-next/chroot-scan-resultdir-creation.bugfix b/releng/release-notes-next/chroot-scan-resultdir-creation.bugfix new file mode 100644 index 000000000..4c40245f7 --- /dev/null +++ b/releng/release-notes-next/chroot-scan-resultdir-creation.bugfix @@ -0,0 +1,4 @@ +The [chroot_scan plugin](Plugin-ChrootScan) [issue#1490][] has been fixed so it +no longer (re)creates resultdir below the global `basedir`, but under the +per-package resultdir (by default in a `/var/tmp/` sub-directory). In turn, the +resultdir is not created with improper ownership.