Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress invalid binary error from portage #35

Closed
wants to merge 2 commits into from

Conversation

hyprsyd
Copy link
Contributor

@hyprsyd hyprsyd commented Oct 5, 2023

Fix pkgindex.py and Suppress invalid binary error from portage.

see also: gentoo/portage#1123

@hyprsyd
Copy link
Contributor Author

hyprsyd commented Oct 5, 2023

before

1696693436
After

@@ -573,7 +573,7 @@ def findPackages(
settings = var_dbapi.settings
bin_dbapi = portage.binarytree(pkgdir=pkgdir, settings=settings).dbapi
if "force_reindex" in signature(bin_dbapi.bintree.populate).parameters:
bin_dbapi.bintree.populate(force_reindex=True)
bin_dbapi.bintree.populate(force_reindex=True, invalid_errors=False)
Copy link
Member

@zmedico zmedico Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could test if invalid_errors is supports, like:

    pop_sig_params = signature(bin_dbapi.bintree.populate).parameters
    populate_kwargs = {}
    if "invalid_errors" in pop_sig_params:
        populate_kwargs["invalid_errors"] = False
    bin_dbapi.bintree.populate(force_reindex=True, **populate_kwargs)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zmedico I forgot again :-(

Last implemention was importing binhost module incorectly.
Calling Modules() from portage.module
which sets binhost var to the BinhostHandler class
would always fail as it needs name and namepath
leading to always call emaint via a subprocess call.

Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
Copy link
Member

@zmedico zmedico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@gentoo-bot gentoo-bot closed this in a12d24f Oct 8, 2023
gentoo-bot pushed a commit to gentoo/portage that referenced this pull request Oct 8, 2023
Introduce 'invalid_errors' var to enable suppression of invalid binary error,
for use by gentoolkit.

[sam: See gentoolkit side at gentoo/gentoolkit#35].

Bug: https://bugs.gentoo.org/900224
Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
Closes: #1123
Signed-off-by: Sam James <sam@gentoo.org>
hyprsyd added a commit to hyprsyd/gentoolkit that referenced this pull request Oct 9, 2023
[sam: Note that this needs gentoo/portage#1123 on
the Portage side.]

Bug: https://bugs.gentoo.org/900224
Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
Closes: gentoo#35
Signed-off-by: Sam James <sam@gentoo.org>
palao pushed a commit to palao/portage that referenced this pull request Oct 16, 2023
Introduce 'invalid_errors' var to enable suppression of invalid binary error,
for use by gentoolkit.

[sam: See gentoolkit side at gentoo/gentoolkit#35].

Bug: https://bugs.gentoo.org/900224
Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
Closes: gentoo#1123
Signed-off-by: Sam James <sam@gentoo.org>
palao pushed a commit to palao/portage that referenced this pull request Oct 22, 2023
Introduce 'invalid_errors' var to enable suppression of invalid binary error,
for use by gentoolkit.

[sam: See gentoolkit side at gentoo/gentoolkit#35].

Bug: https://bugs.gentoo.org/900224
Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
Closes: gentoo#1123
Signed-off-by: Sam James <sam@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants