Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 880879 Details for
Bug 920828
Handle KeyError for missing binpkg when running _do_global_updates
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
corrupt.patch
corrupt.patch (text/plain), 3.71 KB, created by
Sam James
on 2023-12-29 02:01:42 UTC
(
hide
)
Description:
corrupt.patch
Filename:
MIME Type:
Creator:
Sam James
Created:
2023-12-29 02:01:42 UTC
Size:
3.71 KB
patch
obsolete
>$ git diff HEAD >diff --git a/lib/portage/tests/update/test_move_ent.py b/lib/portage/tests/update/test_move_ent.py >index 436b846cf..d7a63e2b9 100644 >--- a/lib/portage/tests/update/test_move_ent.py >+++ b/lib/portage/tests/update/test_move_ent.py >@@ -13,6 +13,8 @@ from portage.util import ensure_dirs > from portage._global_updates import _do_global_updates > from portage.output import colorize > >+from portage.tests import TestCase >+ > > class MoveEntTestCase(TestCase): > def testMoveEnt(self): >@@ -230,3 +232,92 @@ class MoveEntTestCase(TestCase): > > finally: > playground.cleanup() >+ >+ def testMoveEntWithCorruptIndex(self): >+ ebuilds = { >+ "dev-libs/A-moved-1::test_repo": { >+ "EAPI": "4", >+ "SLOT": "2", >+ }, >+ "dev-libs/B-1::test_repo": {"EAPI": "4", "RDEPEND": "dev-libs/A-moved"}, >+ } >+ >+ installed = { >+ "dev-libs/A-1::test_repo": { >+ "EAPI": "4", >+ }, >+ "dev-libs/B-1::test_repo": {"EAPI": "4", "RDEPEND": "dev-libs/A"}, >+ } >+ >+ binpkgs = { >+ "dev-libs/A-1::test_repo": { >+ "EAPI": "4", >+ "BUILD_ID": "1", >+ }, >+ "dev-libs/B-1::test_repo": { >+ "EAPI": "4", >+ "BUILD_ID": "1", >+ "RDEPEND": "dev-libs/A", >+ }, >+ } >+ >+ updates = textwrap.dedent( >+ """ >+ move dev-libs/A dev-libs/A-moved >+ """ >+ ) >+ >+ for binpkg_format in ("gpkg",): >+ with self.subTest(binpkg_format=binpkg_format): >+ print(colorize("HILITE", binpkg_format), end=" ... ") >+ sys.stdout.flush() >+ playground = ResolverPlayground( >+ binpkgs=binpkgs, >+ ebuilds=ebuilds, >+ installed=installed, >+ user_config={ >+ "make.conf": ( >+ f'BINPKG_FORMAT="{binpkg_format}"', >+ f'FEATURES="binpkg-multi-instance pkgdir-index-trusted"', >+ ), >+ }, >+ debug=True, >+ ) >+ >+ settings = playground.settings >+ trees = playground.trees >+ eroot = settings["EROOT"] >+ test_repo_location = settings.repositories["test_repo"].location >+ portdb = trees[eroot]["porttree"].dbapi >+ vardb = trees[eroot]["vartree"].dbapi >+ bindb = trees[eroot]["bintree"].dbapi >+ >+ updates_dir = os.path.join(test_repo_location, "profiles", "updates") >+ >+ try: >+ ensure_dirs(updates_dir) >+ with open(os.path.join(updates_dir, "1Q-2010"), "w") as f: >+ f.write(updates) >+ >+ # Make the Packages index out-of-date >+ os.remove( >+ os.path.join( >+ bindb.bintree.pkgdir, "dev-libs", "A", "A-1-1.gpkg.tar" >+ ) >+ ) >+ >+ global_noiselimit = portage.util.noiselimit >+ portage.util.noiselimit = -2 >+ try: >+ _do_global_updates(trees, {}) >+ finally: >+ portage.util.noiselimit = global_noiselimit >+ >+ # Workaround for cache validation not working >+ # correctly when filesystem has timestamp precision >+ # of 1 second. >+ vardb._clear_cache() >+ >+ # ... >+ finally: >+ playground.cleanup() > >
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 920828
:
880873
| 880879