We use a profile with these options: metadata/layout.conf masters = gentoo repo-name = nucleus profile-formats = portage-2 profile-set build-id I want to download all the binary packages before install, then install the binary packages without the delay downloading the binary packages. after upgrading to sys-apps/portage-2.2.20.1 and switching to profile-set build-id in our profile-formats every time i do: emerge -vauNDf world or a single package the binary packages are downloaded correctly. if i run another time emerge -vauNDf world or a single package all the binary packages are downloaded again. If i install the packages , they are redownloaded again. example of portage/packages/sys-libs/ncurses/ -rw-r--r-- 1 root root 1329555 Sep 22 14:04 ncurses-5.9-r5-1.xpak -rw-r--r-- 1 root root 1329555 Sep 22 14:04 ncurses-5.9-r5-2.xpak -rw-r--r-- 1 root root 1329555 Sep 22 14:04 ncurses-5.9-r5-3.xpak -rw-r--r-- 1 root root 1329555 Sep 22 14:04 ncurses-5.9-r5-4.xpak -rw-r--r-- 1 root root 1329555 Sep 22 14:04 ncurses-5.9-r5-5.xpak -rw-r--r-- 1 root root 1329555 Sep 22 14:04 ncurses-5.9-r5-6.xpak -rw-r--r-- 1 root root 15928 Sep 22 14:04 ncurses-5.9-r99-1.xpak -rw-r--r-- 1 root root 15928 Sep 22 14:04 ncurses-5.9-r99-2.xpak -rw-r--r-- 1 root root 15928 Sep 22 14:04 ncurses-5.9-r99-3.xpak -rw-r--r-- 1 root root 15928 Sep 22 14:04 ncurses-5.9-r99-4.xpak -rw-r--r-- 1 root root 15928 Sep 22 14:04 ncurses-5.9-r99-5.xpak -rw-r--r-- 1 root root 15928 Sep 22 14:04 ncurses-5.9-r99-6.xpak md5s are the same af394baf8a2ee590bac265cc9c97895f ncurses-5.9-r5-1.xpak af394baf8a2ee590bac265cc9c97895f ncurses-5.9-r5-2.xpak af394baf8a2ee590bac265cc9c97895f ncurses-5.9-r5-3.xpak af394baf8a2ee590bac265cc9c97895f ncurses-5.9-r5-4.xpak af394baf8a2ee590bac265cc9c97895f ncurses-5.9-r5-5.xpak af394baf8a2ee590bac265cc9c97895f ncurses-5.9-r5-6.xpak 03034a55ca52bcccb6e2eb099c368205 ncurses-5.9-r99-1.xpak 03034a55ca52bcccb6e2eb099c368205 ncurses-5.9-r99-2.xpak 03034a55ca52bcccb6e2eb099c368205 ncurses-5.9-r99-3.xpak 03034a55ca52bcccb6e2eb099c368205 ncurses-5.9-r99-4.xpak 03034a55ca52bcccb6e2eb099c368205 ncurses-5.9-r99-5.xpak 03034a55ca52bcccb6e2eb099c368205 ncurses-5.9-r99-6.xpak why the binary packages are downloaded every time ? Reproducible: Always Expected Results: The binary packages must be downloaded only one time .
The binary packages are compared using a tuple generated by the _instance_key_multi_instance method here: https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/dbapi/virtual.py?h=v2.2.20.1#n55 Can you attach some of the duplicate entries from you $PKGDIR/Packages file? That will probably show us why _instance_key_multi_instance is returning a different result. If the package mtime changes or is not preserved for some reason, then that could trigger it.
Created attachment 415140 [details] packages sample file
Packages file added
(In reply to marco from comment #2) > Created attachment 415140 [details] > packages sample file All of those entries appear to be identical. We should look at the server-side entry for the same package. Is it identical to these entries?
Created attachment 415214 [details, diff] debug patch This patch will make emerge output some useful debugging information to stderr. Sample usage: emerge -pvg ncurses > debug.log 2>&1
Created attachment 415222 [details] Extract of Packages from the Builder
Created attachment 415224 [details] Extract of Packages from the server
Created attachment 415226 [details] emerge log after patch
(In reply to Zac Medico from comment #5) > Created attachment 415214 [details, diff] [details, diff] > debug patch > > This patch will make emerge output some useful debugging information to > stderr. Sample usage: > > emerge -pvg ncurses > debug.log 2>&1 I have attached the debug.log file. Thanks for the support
(In reply to marco from comment #8) > Created attachment 415226 [details] > emerge log after patch This shows that the instance key contains a None value for the BUILD_ID, while the local instance has BUILD_ID: 1 in the Packages file, so that explains why the comparison is failing. I'll have to investigate some more to find out what causes this.
*** Bug 563820 has been marked as a duplicate of this bug. ***
Does is make any difference if you remove the cached copy of the remote Packages file? You can remove all cached copies with this command: rm -rf /var/cache/edb/binhost
(In reply to Zac Medico from comment #12) > Does is make any difference if you remove the cached copy of the remote > Packages file? You can remove all cached copies with this command: > > rm -rf /var/cache/edb/binhost Previously i tried to remove /usr/portage/packages/ but without success. Perfect , once removed the edb/binhost cache all is ok . Do you need something else to investigate ?
(In reply to marco from comment #13) > Perfect , once removed the edb/binhost cache all is ok . Great! > Do you need something else to investigate ? Now that we have isolated the problem to the cache, I'll focus my attention on that area, and then I'll let you know if I need anything else. @zerochaos: Does removing the cache also solve it for you?