mirror of
https://github.com/flatcar/scripts.git
synced 2025-12-07 18:31:54 +01:00
sys-apps/portage: apply CoreOS changes to 2.3.8
Update patch for portage 2.3.8
This commit is contained in:
parent
fb7c682180
commit
3561c7d780
@ -0,0 +1,47 @@
|
||||
From 1b8ccc0e487a523aa6d974b3ebe26548ad6502b6 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Crawford <alex.crawford@coreos.com>
|
||||
Date: Mon, 14 Apr 2014 12:43:56 -0700
|
||||
Subject: [PATCH 1/4] portage/repository/config.py: add disabled attribute to
|
||||
repos.conf
|
||||
|
||||
This flag allows a repos.conf file to disable a previously-defined repository.
|
||||
|
||||
Updated 03-Nov-17 for portage 2.3.8
|
||||
---
|
||||
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
|
||||
index b65ed97ce..f3e2f112b 100644
|
||||
--- a/pym/portage/repository/config.py
|
||||
+++ b/pym/portage/repository/config.py
|
||||
@@ -76,7 +76,7 @@ class RepoConfig(object):
|
||||
|
||||
__slots__ = ('aliases', 'allow_missing_manifest', 'allow_provide_virtual',
|
||||
'auto_sync', 'cache_formats', 'clone_depth',
|
||||
- 'create_manifest', 'disable_manifest',
|
||||
+ 'create_manifest', 'disable_manifest', 'disabled',
|
||||
'eapi', 'eclass_db', 'eclass_locations', 'eclass_overrides',
|
||||
'find_invalid_path_char', 'force', 'format', 'local_config', 'location',
|
||||
'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
|
||||
@@ -198,6 +198,11 @@ class RepoConfig(object):
|
||||
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
|
||||
+
|
||||
missing = True
|
||||
self.name = name
|
||||
if self.location is not None:
|
||||
@@ -651,7 +656,10 @@ class RepoConfigLoader(object):
|
||||
# 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:
|
||||
@ -16,7 +16,7 @@ DESCRIPTION="Portage is the package management and distribution system for Gento
|
||||
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Portage"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="build doc epydoc +ipc linguas_ru +native-extensions selinux xattr"
|
||||
|
||||
@ -78,6 +78,15 @@ TARBALL_PV=${PV}
|
||||
SRC_URI="mirror://gentoo/${PN}-${TARBALL_PV}.tar.bz2
|
||||
$(prefix_src_archives ${PN}-${TARBALL_PV}.tar.bz2)"
|
||||
|
||||
PATCHES=(
|
||||
# upstream bug: https://bugs.gentoo.org/507284
|
||||
"${FILESDIR}/${PN}-2.3.8-0001-portage-repository-config.py-add-disabled-attribute-.patch"
|
||||
# upstream bug: https://bugs.gentoo.org/490014
|
||||
"${FILESDIR}/${PN}-2.2.18-0002-environment-Filter-EROOT-for-all-EAPIs.patch"
|
||||
# upstream bug:
|
||||
"${FILESDIR}/${PN}-2.2.18-0003-depgraph-ensure-slot-rebuilds-happen-in-the-correct-.patch"
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
use epydoc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
|
||||
}
|
||||
@ -85,6 +94,9 @@ pkg_setup() {
|
||||
python_prepare_all() {
|
||||
distutils-r1_python_prepare_all
|
||||
|
||||
# CoreOS does not use the gentoo repo, silence oodles of errors about it:
|
||||
echo "# no defaults, configuration is in /etc" > cnf/repos.conf
|
||||
|
||||
if use native-extensions; then
|
||||
printf "[build_ext]\nportage-ext-modules=true\n" >> \
|
||||
setup.cfg || die
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user