From 6d862e5c6551d7e126a0ef6b72019cfbf63fdb82 Mon Sep 17 00:00:00 2001 From: zhangqiumiao Date: Tue, 23 Aug 2022 17:47:23 +0800 Subject: [PATCH] fix missing group information in dnf --- anaconda.spec | 8 ++- ...up-mode-of-do_transaction-sub-proces.patch | 52 +++++++++++++------ 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/anaconda.spec b/anaconda.spec index d74ca3a..bce7cd0 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,7 +1,7 @@ %define _empty_manifest_terminate_build 0 Name: anaconda Version: 33.19 -Release: 45 +Release: 46 Summary: Graphical system installer License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -365,6 +365,12 @@ update-desktop-database &> /dev/null || : %{_prefix}/libexec/anaconda/dd_* %changelog +* Tue Aug 23 2022 zhangqiumiao - 33.19-46 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix missing group information in dnf + * Fri Aug 5 2022 wanglu - 33.19-45 - Type:bugfix - CVE:NA diff --git a/bugfix-change-the-startup-mode-of-do_transaction-sub-proces.patch b/bugfix-change-the-startup-mode-of-do_transaction-sub-proces.patch index 25a49f8..ec5f870 100644 --- a/bugfix-change-the-startup-mode-of-do_transaction-sub-proces.patch +++ b/bugfix-change-the-startup-mode-of-do_transaction-sub-proces.patch @@ -1,18 +1,39 @@ -From a8379c76d391c8fdf47cdc141a8f24e129cf9e45 Mon Sep 17 00:00:00 2001 +From d7398bef83d12281fe95a7964b990b07bc56003b Mon Sep 17 00:00:00 2001 From: Qiumiao Zhang -Date: Fri, 10 Dec 2021 22:35:45 -0500 +Date: Tue, 23 Aug 2022 17:32:01 +0800 Subject: [PATCH] change the startup mode of do_transaction sub proces --- - pyanaconda/payload/dnf/payload.py | 33 ++++++++++++++++-- + pyanaconda/payload/dnf/payload.py | 39 +++++++++++++++++++-- pyanaconda/payload/dnf/utils.py | 58 ++++++++++++++++++++++++++++++- - 2 files changed, 87 insertions(+), 4 deletions(-) + 2 files changed, 93 insertions(+), 4 deletions(-) diff --git a/pyanaconda/payload/dnf/payload.py b/pyanaconda/payload/dnf/payload.py -index 2a4b295..32ec971 100644 +index 45003da..e473a68 100644 --- a/pyanaconda/payload/dnf/payload.py +++ b/pyanaconda/payload/dnf/payload.py -@@ -1326,9 +1326,36 @@ class DNFPayload(Payload): +@@ -89,6 +89,9 @@ log = get_packaging_logger() + + USER_AGENT = "%s (anaconda)/%s" % (productName, productVersion) + ++g_include_list = [] ++g_exclude_list = [] ++ + __all__ = ["DNFPayload"] + + +@@ -530,6 +533,10 @@ class DNFPayload(Payload): + log.debug("transaction exclude list") + log.debug(exclude_list) + ++ global g_include_list, g_exclude_list ++ g_include_list.extend(include_list) ++ g_exclude_list.extend(exclude_list) ++ + # feed it to DNF + try: + # FIXME: Remove self._base.conf.strict workaround when bz1761518 is fixed +@@ -1327,9 +1334,35 @@ class DNFPayload(Payload): pre_msg = (N_("Preparing transaction from installation source")) progress_message(pre_msg) @@ -29,9 +50,7 @@ index 2a4b295..32ec971 100644 + t_repo['repo_agrs'] = repo_agrs + repos[repo.id] = t_repo + -+ pkgs_list = list() -+ for pkg in pkgs_to_download: -+ pkgs_list.append(pkg.name) ++ global g_include_list, g_exclude_list + + ctx = multiprocessing.get_context('spawn') + queue_instance = ctx.Queue() @@ -47,13 +66,14 @@ index 2a4b295..32ec971 100644 + self._base.conf.proxy, + self._base.conf.proxy_username, + self._base.conf.proxy_password, -+ pkgs_list)) ++ g_include_list, ++ g_exclude_list)) + process.start() (token, msg) = queue_instance.get() # When the installation works correctly it will get 'install' updates diff --git a/pyanaconda/payload/dnf/utils.py b/pyanaconda/payload/dnf/utils.py -index dfac5c9..d716c08 100644 +index dfac5c9..23a11fd 100644 --- a/pyanaconda/payload/dnf/utils.py +++ b/pyanaconda/payload/dnf/utils.py @@ -18,6 +18,7 @@ @@ -103,16 +123,16 @@ index dfac5c9..d716c08 100644 + conf.proxy_password = proxy_password + + -+def update_depdency(base, include_list): ++def update_depdency(base, include_list, exclude_list): + base.fill_sack() + base.read_comps() -+ base.install_specs(install=include_list, exclude=None) ++ base.install_specs(install=include_list, exclude=exclude_list) + base.resolve() + + +def do_transaction(queue_instance, repos, releasever, installroot, substitutions, + multilib_policy, timeout, retries, pkgdir, proxy, -+ proxy_username, proxy_password, include_list): ++ proxy_username, proxy_password, include_list, exclude_list): # Execute the DNF transaction and catch any errors. An error doesn't # always raise a BaseException, so presence of 'quit' without a preceeding # 'post' message also indicates a problem. @@ -134,12 +154,12 @@ index dfac5c9..d716c08 100644 + repo.pkgdir = pkgdir + + queue_instance.put(('log', 'start to update depdency.')) -+ update_depdency(base, include_list) ++ update_depdency(base, include_list, exclude_list) + + queue_instance.put(('log', 'start to transaction.')) base.do_transaction(display=display) exit_reason = "DNF quit" except BaseException as e: # pylint: disable=broad-except -- -2.19.1 +2.27.0