Hello, I'm investigating an issue with `vscodium`, but more on that later. I need to switch between multiple builds of the `mesa` package, but I can't find a way to tell `emerge` a specific binary package I'd like to install while the versions are the same. I'm wondering how I can choose a binary package with a specific `build_id`. Here is what I have: # tree /usr/portage/packages/media-libs/ /usr/portage/packages/media-libs/ └── mesa ├── mesa-23.2.1-1.gpkg.tar ├── mesa-23.2.1-2.gpkg.tar ├── mesa-23.2.1-3.gpkg.tar └── mesa-23.2.1-4.gpkg.tar 2 directories, 4 files These packages were built from two different repositories (::gentoo / ::mim) with different use-flags (test / -test). For instance, I want to install mesa-23.2.1-1.gpkg.tar. From the codebase/documentation I see that the last '1' stands for the `build_id`, but it's everything I managed to learn so far. The only option I found is to tell emerge what's the desired repository, but it ignores the desired USE="-test" despite the fact there is an appropriate binary package in /usr/portage/packages/media-libs/: # USE="-test" emerge --usepkgonly media-libs/mesa::gentoo -pv These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 4.69 s (backtrack: 0/20). [binary R ] media-libs/mesa-23.2.1::gentoo [23.2.1::mim] USE="X gles2 llvm lm-sensors proprietary-codecs test* vulkan wayland zstd -d3d9 -debug -gles1 -opencl -osmesa (-selinux) -unwind -vaapi -valgrind -vdpau -vulkan-overlay -xa -zink" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="sse2" VIDEO_CARDS="intel -d3d12 (-freedreno) -lavapipe (-lima) -nouveau (-panfrost) -r300 -r600 -radeon -radeonsi (-v3d) (-vc4) -virgl (-vivante) -vmware" 0 KiB Total: 1 package (1 reinstall, 1 binary), Size of downloads: 0 KiB Please let me know whether what I'm trying to do is even possible without purging the conflicting files. Thanks! Reproducible: Always
The original binpkg-multi-instance support actually added support for build_id atoms, so you can do things like this: emerge =mesa-23.2.1-1 It was included in this commit: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c6e3af2b1e419d70443a74575e9b762a101a3912
Hello Zac, Thank you for your suggestion! However, it was first what I tried before submitting this bug and it didn't work at all. So it looks like something is broken. # emerge --version Portage 3.0.55 (python 3.12.0-final-0, default/linux/amd64/17.1, gcc-13, glibc-2.38-r7, 6.6.1-gentoo-x86_64 x86_64) # emerge =mesa-23.2.1-1 -av These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 2.29 s (backtrack: 0/20). emerge: there are no ebuilds to satisfy "=mesa-23.2.1-1". # emerge --usepkg =mesa-23.2.1-1 -av These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 1.62 s (backtrack: 0/20). emerge: there are no ebuilds to satisfy "=mesa-23.2.1-1". # emerge --usepkg =mesa-23.2.1 -av These are the packages that would be merged, in order: Calculating dependencies... done! Dependency resolution took 3.54 s (backtrack: 0/20). [binary R ] media-libs/mesa-23.2.1::mim USE="X gles2 llvm lm-sensors proprietary-codecs vulkan wayland zstd -d3d9 -debug -gles1 -opencl -osmesa (-selinux) -test -unwind -vaapi -valgrind -vdpau -vulkan-overlay -xa -zink" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="sse2" VIDEO_CARDS="intel -d3d12 (-freedreno) -lavapipe (-lima) -nouveau (-panfrost) -r300 -r600 -radeon -radeonsi (-v3d) (-vc4) -virgl (-vivante) -vmware" 0 KiB Total: 1 package (1 reinstall, 1 binary), Size of downloads: 0 KiB Would you like to merge these packages? [Yes/No] no Quitting. # ls -lh /usr/portage/packages/media-libs/mesa total 130M -rw-r----- 1 root root 33M Oct 21 20:19 mesa-23.2.1-1.gpkg.tar -rw-r----- 1 root root 33M Nov 9 01:34 mesa-23.2.1-2.gpkg.tar -rw-r----- 1 root root 33M Nov 9 01:56 mesa-23.2.1-3.gpkg.tar -rw-r----- 1 root root 33M Nov 9 02:36 mesa-23.2.1-4.gpkg.tar
It's probably something about the gpkg build_id stuff, since I have the old xpak format here and it works with portage-3.0.55: > # emerge -pvk =portage-3.0.55-1 > > These are the packages that would be merged, in order: > > Calculating dependencies... done! > Dependency resolution took 5.70 s (backtrack: 0/20). > > [binary R ~] sys-apps/portage-3.0.55-1::gentoo USE="(ipc) native-extensions rsync-verify xattr -apidoc -build -doc -gentoo-dev (-selinux) -test" PYTHON_TARGETS="python3_10 python3_11 python3_12 -pypy3" 0 KiB
Bug 915494 comment 21 mentions that BUILD_ID sometimes has a newline, which could be related. In lib/portage/versions.py, a newline character could cause BUILD_ID parsing to fail when it tries to cast it to an int here: > self.__dict__["build_id"] = self._long(build_id, None)