mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-08 05:51:31 +02:00
feat(sys-apps/portage): Adding repos.conf patch to ebuild
Pulling in the patch mentioned here (https://bugs.gentoo.org/show_bug.cgi?id=507284). This adds support for the 'disabled' attribute in repository sections within repos.conf.
This commit is contained in:
parent
631063b1cf
commit
edf92a8b5e
@ -0,0 +1,47 @@
|
|||||||
|
commit b2f0e82190e7343374f399d7b0246587ee945870
|
||||||
|
Author: Alex Crawford <alex.crawford@coreos.com>
|
||||||
|
Date: Mon Apr 14 12:43:56 2014 -0700
|
||||||
|
|
||||||
|
Adding disabled attribute to repos.conf
|
||||||
|
|
||||||
|
This flag allows a repos.conf file to disable a previously-defined repository.
|
||||||
|
|
||||||
|
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
|
||||||
|
index 5e0d055..b8b3180 100644
|
||||||
|
--- a/pym/portage/repository/config.py
|
||||||
|
+++ b/pym/portage/repository/config.py
|
||||||
|
@@ -78,8 +78,8 @@ class RepoConfig(object):
|
||||||
|
"""Stores config of one repository"""
|
||||||
|
|
||||||
|
__slots__ = ('aliases', 'allow_missing_manifest', 'allow_provide_virtual',
|
||||||
|
- 'cache_formats', 'create_manifest', 'disable_manifest', 'eapi',
|
||||||
|
- 'eclass_db', 'eclass_locations', 'eclass_overrides',
|
||||||
|
+ 'cache_formats', 'create_manifest', 'disabled', 'disable_manifest',
|
||||||
|
+ 'eapi', 'eclass_db', 'eclass_locations', 'eclass_overrides',
|
||||||
|
'find_invalid_path_char', 'force', 'format', 'local_config', 'location',
|
||||||
|
'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
|
||||||
|
'name', 'portage1_profiles', 'portage1_profiles_compat', 'priority',
|
||||||
|
@@ -173,6 +173,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
|
||||||
|
+
|
||||||
|
eapi = None
|
||||||
|
missing = True
|
||||||
|
self.name = name
|
||||||
|
@@ -633,7 +638,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:
|
@ -228,6 +228,7 @@ src_prepare() {
|
|||||||
fi
|
fi
|
||||||
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
epatch "${WORKDIR}/${PN}-${PATCHVER}.patch"
|
||||||
fi
|
fi
|
||||||
|
epatch "${FILESDIR}/${P}-add-disabled.patch"
|
||||||
einfo "Setting portage.VERSION to ${PVR} ..."
|
einfo "Setting portage.VERSION to ${PVR} ..."
|
||||||
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
sed -e "s/^VERSION=.*/VERSION=\"${PVR}\"/" -i pym/portage/__init__.py || \
|
||||||
die "Failed to patch portage.VERSION"
|
die "Failed to patch portage.VERSION"
|
Loading…
x
Reference in New Issue
Block a user