Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926048 - sys-apps/portage: emerge --getbinpkg used to work and now raises error InvalidBinaryPackageFormat (UnboundLocalError with binpkg-request-signature)
Summary: sys-apps/portage: emerge --getbinpkg used to work and now raises error Invali...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 925481
Blocks:
  Show dependency tree
 
Reported: 2024-03-02 20:41 UTC by fcrvincent
Modified: 2024-04-28 00:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fcrvincent 2024-03-02 20:41:09 UTC
Error from any emerge command: 
emerge --update --newuse --deep --with-bdeps=y @world
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/portage/dbapi/bintree.py", line 1626, in _populate_remote
    binpkg_format = get_binpkg_format(
                    ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/binpkg.py", line 24, in get_binpkg_format
    raise InvalidBinaryPackageFormat(
portage.exception.InvalidBinaryPackageFormat: Unsupported binary package format from ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/emerge", line 57, in main
    retval = emerge_main()
             ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/_emerge/main.py", line 1308, in emerge_main
    return run_action(emerge_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/_emerge/actions.py", line 3479, in run_action
    mytrees["bintree"].populate(
  File "/usr/lib/python3.11/site-packages/portage/dbapi/bintree.py", line 934, in populate
    self._populate_remote(
  File "/usr/lib/python3.11/site-packages/portage/dbapi/bintree.py", line 1632, in _populate_remote
    "WARN",
    ^^^^^^
UnboundLocalError: cannot access local variable 'e' where it is not associated with a value
Comment 1 fcrvincent 2024-03-02 20:42:33 UTC
/etc/portage/binrepos.conf/gentoobinhost.conf:
[binhost]
priority = 9999
sync-uri = https://mirror.bytemark.co.uk/gentoo/releases/amd64/binpackages/17.1/x86-64/

/etc/make.conf:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
#CFLAGS="-march=westmere -mtune=westmere -O2  -pipe"
#CFLAGS="-march=westmere -mtune=westmere -O2  -pipe"
#CFLAGS="-O2  -pipe"
CFLAGS="-march=westmere -mno-aes -mno-pclmul -O2  -pipe"
CFLAGS="${CFLAGS}"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
#CHOST="i686-pc-linux-gnu"
#MAKEOPTS="-j4"
MAKEOPTS="-j2 -l2"
#SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
USE="lvm vaapi -gallium gtk -gnome -qt4 -qt5 -kde dvd alsa  cdr dbus udev systemd -consolekit -bluetooth"
#INPUT_DEVICES="evdev"
#CPU_FLAGS_X86="mmx mmxext sse sse2 sse3"
CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
INPUT_DEVICES="evdev keyboard mouse synaptics virtualbox"
#VIDEO_CARDS="intel i915"
VIDEO_CARDS="intel i965"
#VIDEO_CARDS="qxl nouveau glint intel mach64 mga nv r128 radeon savage tdfx trident vesa via vmware cirrus ast chips i12
8 i740 imstt s3virge tseng v4l vermilion"
LINGUAS="en_GB fr_FR"
L10N="en-GB fr-FR fr zh-CN"
PORTAGE_ELOG_CLASSES="log"
PORTAGE_ELOG_SYSTEM="save"
ACCEPT_LICENSE="* -@EULA"
SANE_BACKENDS="net"
FEATURES="${FEATURES} binpkg-request-signature"
#FEATURES="ccache"
CCACHE_DIR="/var/cache/ccache"
LLVM_TARGETS="X86"

# Set PORTDIR for backward compatibility with various tools:
#   gentoo-bashcomp - bug #478444
#   euse - bug #474574
#   euses and ufed - bug #478318
PORTDIR="/usr/portage"
# For firefox-bin and thunderbird-bin
FETCHCOMMAND="wget -t 3 -T 60 --no-passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
RESUMECOMMAND="wget -c -t 3 -T 60 --no-passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
# BINHOST
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --getbinpkg"
#BINPKG_FORMAT="gpkg"
#BINPKG_FORMAT="xpak"
#FEATURES="getbinpkg binpkg-request-signature"
# FEATURES="getbinpkg binpkg-request-signature"
#FEATURES="binpkg-request-signature"
FEATURES="${FEATURES} binpkg-request-signature"
#PKGDIR="/var/cache/binpkgs"
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-02 20:43:13 UTC
Looks like this broke in 445f10f4214c673f8fe0a9cc518c12767be4f159.
Comment 3 fcrvincent 2024-03-02 20:44:25 UTC
Profile: 
 [7]   default/linux/amd64/17.1/desktop/gnome/systemd/merged-usr (stable) *


Binary emerges worked well for me until last week; this week I had to emerge all from source because of this error.
Comment 4 fcrvincent 2024-03-02 20:50:16 UTC
What do you mean by: "Looks like this broke in 445f10f4214c673f8fe0a9cc518c12767be4f159."?
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-02 20:56:44 UTC
(In reply to fcrvincent from comment #4)
> What do you mean by: "Looks like this broke in
> 445f10f4214c673f8fe0a9cc518c12767be4f159."?

It's a development comment for one of the people (possibly me) who fixes it. That's the commit which broke it in portage.
Comment 6 fcrvincent 2024-03-02 21:02:23 UTC
OK thanks for that. 
Looking forward to a fix.
Comment 7 Larry the Git Cow gentoo-dev 2024-03-02 22:55:53 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=62ee9bf8c680b2a18713da5bd453e3a771257409

commit 62ee9bf8c680b2a18713da5bd453e3a771257409
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2024-03-02 22:48:54 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-03-02 22:50:54 +0000

    binarytree._populate_remote: Fix UnboundLocalError for binpkg-request-signature
    
    If an InvalidBinaryPackageFormat exception was raised from
    get_binpkg_format for binpkg-request-signature then it
    triggered an UnboundLocalError here.
    
    Fixes: 445f10f4214c ("Use binpkg extensions and header to get format")
    Bug: https://bugs.gentoo.org/926048
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/dbapi/bintree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 8 Larry the Git Cow gentoo-dev 2024-04-28 00:32:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1e53b9368c215451e3af78b557d8b86a2db9677

commit f1e53b9368c215451e3af78b557d8b86a2db9677
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-04-28 00:31:29 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-04-28 00:31:29 +0000

    sys-apps/portage: add 3.0.64
    
    Closes: https://bugs.gentoo.org/925481
    Closes: https://bugs.gentoo.org/675748
    Closes: https://bugs.gentoo.org/712222
    Closes: https://bugs.gentoo.org/920330
    Closes: https://bugs.gentoo.org/925213
    Closes: https://bugs.gentoo.org/925863
    Closes: https://bugs.gentoo.org/925888
    Closes: https://bugs.gentoo.org/925907
    Closes: https://bugs.gentoo.org/926048
    Closes: https://bugs.gentoo.org/926221
    Closes: https://bugs.gentoo.org/927059
    Closes: https://bugs.gentoo.org/927632
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.64.ebuild | 242 +++++++++++++++++++++++++++++++++
 2 files changed, 243 insertions(+)