Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 794669 Details for
Bug 528394
sys-apps/portage: add a repos.conf setting to declare a repo as immutable, for optimized performance
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-porttree-skip-metadata-verification-if-repository-is.patch
0001-porttree-skip-metadata-verification-if-repository-is.patch (text/plain), 2.98 KB, created by
Sam James
on 2022-07-27 03:20:03 UTC
(
hide
)
Description:
0001-porttree-skip-metadata-verification-if-repository-is.patch
Filename:
MIME Type:
Creator:
Sam James
Created:
2022-07-27 03:20:03 UTC
Size:
2.98 KB
patch
obsolete
>From 0b6293a79865fb4556b0bd02e0a41e96e9a56545 Mon Sep 17 00:00:00 2001 >From: Sam James <sam@gentoo.org> >Date: Sat, 5 Mar 2022 04:44:48 +0000 >Subject: [PATCH] porttree: skip metadata verification if repository is > immutable > >Closes: https://bugs.gentoo.org/528394 >Signed-off-by: Sam James <sam@gentoo.org> >--- > lib/portage/dbapi/porttree.py | 5 +++-- > lib/portage/repository/config.py | 7 +++++++ > 2 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/lib/portage/dbapi/porttree.py b/lib/portage/dbapi/porttree.py >index cd919ba31..fa927165c 100644 >--- a/lib/portage/dbapi/porttree.py >+++ b/lib/portage/dbapi/porttree.py >@@ -616,7 +616,8 @@ class portdbapi(dbapi): > if ro_auxdb is not None: > auxdbs.append(ro_auxdb) > auxdbs.append(self.auxdb[repo_path]) >- eclass_db = self.repositories.get_repo_for_location(repo_path).eclass_db >+ repo = self.repositories.get_repo_for_location(repo_path) >+ eclass_db = repo.eclass_db > > for auxdb in auxdbs: > try: >@@ -639,7 +640,7 @@ class portdbapi(dbapi): > # EAPI from _parse_eapi_ebuild_head, we disregard cache entries > # for unsupported EAPIs. > continue >- if auxdb.validate_entry(metadata, ebuild_hash, eclass_db): >+ if repo.immutable or auxdb.validate_entry(metadata, ebuild_hash, eclass_db): > break > else: > metadata = None >diff --git a/lib/portage/repository/config.py b/lib/portage/repository/config.py >index 0b591d94f..7f0fa7448 100644 >--- a/lib/portage/repository/config.py >+++ b/lib/portage/repository/config.py >@@ -120,6 +120,7 @@ class RepoConfig: > "find_invalid_path_char", > "force", > "format", >+ "immutable", > "local_config", > "location", > "main_repo", >@@ -200,6 +201,8 @@ class RepoConfig: > self.eclass_db = None > self.eclass_locations = None > >+ self.immutable = repo_opts.get("immutable", "false").lower() in ("true", "yes") >+ > if local_config or "masters" in force: > # Masters from repos.conf override layout.conf. > masters = repo_opts.get("masters") >@@ -660,6 +663,9 @@ class RepoConfigLoader: > if repos_conf_opts is not None: > # Selectively copy only the attributes which > # repos.conf is allowed to override. >+ # 'immutable' is intentionally not here as >+ # the use case for this is local modifications for development >+ # and we can't assume people are generating metadata for each change. > for k in ( > "aliases", > "auto_sync", >@@ -1211,6 +1217,7 @@ class RepoConfigLoader: > > def config_string(self): > bool_keys = ( >+ "immutable", > "strict_misc_digests", > "sync_allow_hardlinks", > "sync_openpgp_key_refresh", >-- >2.37.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 528394
: 794669