Block pkgset reuse on module defaults change

JIRA: RHELCMP-13463
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit 0ef1c102b8)
This commit is contained in:
Lubomír Sedlář 2024-02-12 14:29:03 +01:00 committed by Stepan Oksanichenko
parent 8f171b81a1
commit a8fc1b183b
Signed by: soksanichenko
GPG Key ID: AB9983172AB1E45B

View File

@ -772,6 +772,7 @@ class KojiPackageSet(PackageSetBase):
"exclusive_noarch": compose.conf[ "exclusive_noarch": compose.conf[
"pkgset_exclusive_arch_considers_noarch" "pkgset_exclusive_arch_considers_noarch"
], ],
"module_defaults_dir": compose.conf.get("module_defaults_dir"),
}, },
f, f,
protocol=pickle.HIGHEST_PROTOCOL, protocol=pickle.HIGHEST_PROTOCOL,
@ -868,6 +869,7 @@ class KojiPackageSet(PackageSetBase):
inherit_to_noarch = compose.conf["pkgset_inherit_exclusive_arch_to_noarch"] inherit_to_noarch = compose.conf["pkgset_inherit_exclusive_arch_to_noarch"]
exclusive_noarch = compose.conf["pkgset_exclusive_arch_considers_noarch"] exclusive_noarch = compose.conf["pkgset_exclusive_arch_considers_noarch"]
module_defaults_dir = compose.conf.get("module_defaults_dir")
if ( if (
reuse_data["allow_invalid_sigkeys"] == self._allow_invalid_sigkeys reuse_data["allow_invalid_sigkeys"] == self._allow_invalid_sigkeys
and reuse_data["packages"] == self.packages and reuse_data["packages"] == self.packages
@ -879,6 +881,7 @@ class KojiPackageSet(PackageSetBase):
# generated with older version of Pungi. Best to not reuse. # generated with older version of Pungi. Best to not reuse.
and reuse_data.get("inherit_to_noarch") == inherit_to_noarch and reuse_data.get("inherit_to_noarch") == inherit_to_noarch
and reuse_data.get("exclusive_noarch") == exclusive_noarch and reuse_data.get("exclusive_noarch") == exclusive_noarch
and reuse_data.get("module_defaults_dir") == module_defaults_dir
): ):
self.log_info("Copying repo data for reuse: %s" % old_repo_dir) self.log_info("Copying repo data for reuse: %s" % old_repo_dir)
copy_all(old_repo_dir, repo_dir) copy_all(old_repo_dir, repo_dir)