From ab6ac4d0fd90924519aae1b2dc29f44271287c60 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Thu, 21 Apr 2022 10:07:19 +0200 Subject: [PATCH] sys-apps/portage: refresh patches and ensure they are applied Found this while checking why I was still seeing lots of !!! Section 'gentoo' in repos.conf is missing location attribute messages while building. Turns out that after the last sync of portage we stopped applying patches from files/. This was caused by a local variable definition of PATCHES that was overriding the global one. This might be a sign to drop them or we can refresh them, as they do fix bugs that have been hit in CoreOS in the past. I opted to refresh them, and inject them into the local variable. --- ...ry-config.py-add-disabled-attribute-.patch | 66 +++++++++---------- ...vironment-Filter-EROOT-for-all-EAPIs.patch | 6 +- ...slot-rebuilds-happen-in-the-correct-.patch | 40 +++++------ .../sys-apps/portage/portage-3.0.28-r1.ebuild | 2 + 4 files changed, 58 insertions(+), 56 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0001-portage-repository-config.py-add-disabled-attribute-.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0001-portage-repository-config.py-add-disabled-attribute-.patch index 953dc7163c..fca3879bc9 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0001-portage-repository-config.py-add-disabled-attribute-.patch +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0001-portage-repository-config.py-add-disabled-attribute-.patch @@ -1,4 +1,4 @@ -From eeb6911796e6d602cb12c91901fb4ab1f37dca65 Mon Sep 17 00:00:00 2001 +From c6cfe7c55f54504aa50bc6daca31aefde0d24264 Mon Sep 17 00:00:00 2001 From: Alex Crawford Date: Tue, 27 Oct 2020 19:43:48 +0100 Subject: [PATCH 1/3] portage/repository/config.py: add disabled attribute to @@ -12,41 +12,41 @@ https://bugs.gentoo.org/507284 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/portage/repository/config.py b/lib/portage/repository/config.py -index f7c956d..28ec102 100644 +index 0b591d9..7b7f7a1 100644 --- a/lib/portage/repository/config.py +++ b/lib/portage/repository/config.py -@@ -77,6 +77,7 @@ class RepoConfig: - 'clone_depth', - 'create_manifest', - 'disable_manifest', -+ 'disabled', - 'eapi', - 'eclass_db', - 'eclass_locations', -@@ -275,6 +276,11 @@ class RepoConfig: - location = None - self.location = location +@@ -113,6 +113,7 @@ class RepoConfig: + "clone_depth", + "create_manifest", + "disable_manifest", ++ "disabled", + "eapi", + "eclass_db", + "eclass_locations", +@@ -318,6 +319,11 @@ class RepoConfig: + location = None + self.location = location -+ disabled = repo_opts.get('disabled') -+ if disabled is not None: -+ disabled = disabled.strip().lower() == 'true' -+ self.disabled = disabled or False ++ disabled = repo_opts.get('disabled') ++ if disabled is not None: ++ disabled = disabled.strip().lower() == 'true' ++ self.disabled = disabled or False + - missing = True - self.name = name - if self.location is not None: -@@ -754,7 +760,10 @@ class RepoConfigLoader: - # Do this before expanding aliases, so that location_map and - # treemap consistently map unaliased names whenever available. - for repo_name, repo in list(prepos.items()): -- if repo.location is None: -+ if repo.disabled: -+ del prepos[repo_name] -+ continue -+ elif repo.location is None: - if repo_name != 'DEFAULT': - # Skip this warning for repoman (bug #474578). - if settings.local_config and paths: + missing = True + self.name = name + if self.location is not None: +@@ -845,7 +851,10 @@ class RepoConfigLoader: + # Do this before expanding aliases, so that location_map and + # treemap consistently map unaliased names whenever available. + for repo_name, repo in list(prepos.items()): +- if repo.location is None: ++ if repo.disabled: ++ del prepos[repo_name] ++ continue ++ elif repo.location is None: + if repo_name != "DEFAULT": + # Skip this warning for repoman (bug #474578). + if settings.local_config and paths: -- -2.26.2 +2.32.0 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0002-environment-Filter-EROOT-for-all-EAPIs.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0002-environment-Filter-EROOT-for-all-EAPIs.patch index 37900e1446..a6f04ed68f 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0002-environment-Filter-EROOT-for-all-EAPIs.patch +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0002-environment-Filter-EROOT-for-all-EAPIs.patch @@ -1,4 +1,4 @@ -From 9e7ba8e73d8e043a91d215af4b4fcdb8e37921f5 Mon Sep 17 00:00:00 2001 +From a6c80be38b1492d16a3b721564dea5a2ac4106c5 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Tue, 27 Oct 2020 19:47:20 +0100 Subject: [PATCH 2/3] environment: Filter EROOT for all EAPIs @@ -12,7 +12,7 @@ https://bugs.gentoo.org/490014 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh -index 90e622e..ec7b18b 100644 +index d322199..dc6bf62 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -107,10 +107,14 @@ __filter_readonly_variables() { @@ -34,5 +34,5 @@ index 90e622e..ec7b18b 100644 filtered_vars+=" ESYSROOT" fi -- -2.26.2 +2.32.0 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0003-depgraph-ensure-slot-rebuilds-happen-in-the-correct-.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0003-depgraph-ensure-slot-rebuilds-happen-in-the-correct-.patch index a50529309d..f1e7e3a351 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0003-depgraph-ensure-slot-rebuilds-happen-in-the-correct-.patch +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/files/0003-depgraph-ensure-slot-rebuilds-happen-in-the-correct-.patch @@ -1,4 +1,4 @@ -From 91f1cc6fa46e149094a7021f43b10bd13d39b7d9 Mon Sep 17 00:00:00 2001 +From 0d6b2b32bd9fe1399d338c90eccbf6d3f7c4a6cb Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Tue, 27 Oct 2020 19:50:07 +0100 Subject: [PATCH 3/3] depgraph: ensure slot rebuilds happen in the correct root @@ -9,27 +9,27 @@ https://bugs.gentoo.org/520112 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py -index 0bb0352..3d1cdbc 100644 +index 22d0be1..67e096a 100644 --- a/lib/_emerge/depgraph.py +++ b/lib/_emerge/depgraph.py -@@ -4384,13 +4384,13 @@ class depgraph: - a favorite list.""" - debug = "--debug" in self._frozen_config.myopts - onlydeps = "--onlydeps" in self._frozen_config.myopts -- myroot = self._frozen_config.target_root -- pkgsettings = self._frozen_config.pkgsettings[myroot] -- pprovideddict = pkgsettings.pprovideddict -- virtuals = pkgsettings.getvirtuals() - args = self._dynamic_config._initial_arg_list[:] +@@ -5007,13 +5007,13 @@ class depgraph: + a favorite list.""" + debug = "--debug" in self._frozen_config.myopts + onlydeps = "--onlydeps" in self._frozen_config.myopts +- myroot = self._frozen_config.target_root +- pkgsettings = self._frozen_config.pkgsettings[myroot] +- pprovideddict = pkgsettings.pprovideddict +- virtuals = pkgsettings.getvirtuals() + args = self._dynamic_config._initial_arg_list[:] - for arg in self._expand_set_args(args, add_to_digraph=True): -+ myroot = arg.root_config.root -+ pkgsettings = self._frozen_config.pkgsettings[myroot] -+ pprovideddict = pkgsettings.pprovideddict -+ virtuals = pkgsettings.getvirtuals() - for atom in sorted(arg.pset.getAtoms()): - self._spinner_update() - dep = Dependency(atom=atom, onlydeps=onlydeps, + for arg in self._expand_set_args(args, add_to_digraph=True): ++ myroot = arg.root_config.root ++ pkgsettings = self._frozen_config.pkgsettings[myroot] ++ pprovideddict = pkgsettings.pprovideddict ++ virtuals = pkgsettings.getvirtuals() + for atom in sorted(arg.pset.getAtoms()): + self._spinner_update() + dep = Dependency(atom=atom, onlydeps=onlydeps, root=myroot, parent=arg) -- -2.26.2 +2.32.0 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-3.0.28-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-3.0.28-r1.ebuild index b71e6e4a1e..5f1998b275 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-3.0.28-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/portage/portage-3.0.28-r1.ebuild @@ -94,6 +94,8 @@ pkg_pretend() { python_prepare_all() { local PATCHES=( "${DISTDIR}"/${P}-setuptools-install-depr.patch + # Flatcar: downstream patches + "${PATCHES[@]}" ) distutils-r1_python_prepare_all