From 7f112ff972aaab31184a7a84e34f3d2d86fffac0 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 25 Sep 2024 12:45:57 +0200 Subject: [PATCH] De-duplicate the local-repo mountpoint in bootstrap Complements: d4c12696a4ecd07695d16f86e595cfb6aa8997f9 Relates: #381 Relates: #357 Relates: #1414 Relates: #1286 --- mock/py/mockbuild/util.py | 11 ----------- .../buildroot-mounts-redundancy.bugfix | 5 +++++ 2 files changed, 5 insertions(+), 11 deletions(-) create mode 100644 releng/release-notes-next/buildroot-mounts-redundancy.bugfix diff --git a/mock/py/mockbuild/util.py b/mock/py/mockbuild/util.py index 30dd108c4..bcff1e75e 100644 --- a/mock/py/mockbuild/util.py +++ b/mock/py/mockbuild/util.py @@ -1001,17 +1001,6 @@ def _fix_cfg(cfg): _fix_cfg(bootstrap.config) - if not baseurl.startswith("file:///") and not baseurl.startswith("/"): - return - - local_dir = baseurl.replace("file://", "", 1) - if not local_dir or not os.path.isdir(local_dir): - return - - mountpoint = bootstrap.make_chroot_path(local_dir) - bootstrap.mounts.add(BindMountPoint(srcpath=local_dir, - bindpath=mountpoint)) - def subscription_redhat_init(opts, uidManager): if not opts['redhat_subscription_required']: diff --git a/releng/release-notes-next/buildroot-mounts-redundancy.bugfix b/releng/release-notes-next/buildroot-mounts-redundancy.bugfix new file mode 100644 index 000000000..797f9b5b1 --- /dev/null +++ b/releng/release-notes-next/buildroot-mounts-redundancy.bugfix @@ -0,0 +1,5 @@ +De-duplicate mount points for local repositories used with `--chain` or +`--localrepo=file:///repo/on/host`. This bug existed in Mock <= 5.6, but after +fixing the [issue#1414][], it got exposed by our test suite. Related issues +include [issue#357][] ([commit#a0a2cba3][]) and [issue#381][] +([commit#16462acc][]).