Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 864259

Summary: sys-apps/portage: fetches binhost's 'Packages' file multiple times
Product: Portage Development Reporter: John Helmert III <ajak>
Component: Binary packages supportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: david.palao, gentoo
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/portage/pull/897
https://bugs.gentoo.org/show_bug.cgi?id=921436
https://bugs.gentoo.org/show_bug.cgi?id=920937
https://bugs.gentoo.org/show_bug.cgi?id=510296
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 872710    
Bug Blocks:    

Description John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-08-07 22:39:36 UTC
Noticed this when I glanced at my binhost webserver's logs. Running one `emerge -pvuDNG @world` produces this in my nginx access log:

10.5.0.2 - - [07/Aug/2022:22:32:36 +0000] "GET /znver1/Packages HTTP/1.1" 200 3474243 "-" "Gentoo Portage" "-"
10.5.0.2 - - [07/Aug/2022:22:32:38 +0000] "GET /znver1/Packages HTTP/1.1" 200 3474243 "-" "Gentoo Portage" "-"

By adding a breakpoint in bintree.populate, I think I've traced the calls to that function responsible for this:

https://github.com/gentoo/portage/blob/master/lib/_emerge/actions.py#L172
https://github.com/gentoo/portage/blob/master/lib/_emerge/actions.py#L3496
Comment 1 David Palao 2022-08-12 12:28:06 UTC
Hi,
Nice report! Thank you.
I'm working on it.

David Palao
Comment 2 Larry the Git Cow gentoo-dev 2022-09-25 19:12:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=31c04f4b5b014a6a80ad4d1c2c8574106bab2c56

commit 31c04f4b5b014a6a80ad4d1c2c8574106bab2c56
Author:     David Palao <david.palao@gmail.com>
AuthorDate: 2022-09-16 15:08:41 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2022-09-25 19:10:34 +0000

    improvement(bintree)!: binarytree.populate has new default getbinpkg_refresh=False
    
    This, together with a previous commit, fixes Bug #864259:
    
    sys-apps/portage: fetches binhost's 'Packages' file multiple times
    
    Bug: https://bugs.gentoo.org/864259
    Signed-off-by: David Palao <david.palao@gmail.com>
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 lib/portage/dbapi/bintree.py             |  2 +-
 lib/portage/tests/dbapi/test_bintree.py  | 17 +++++++++++++++++
 lib/portage/tests/emerge/test_actions.py |  5 +++++
 3 files changed, 23 insertions(+), 1 deletion(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=7fe37c7bbf6c42fb0b5ea5d8a431abf677df5822

commit 7fe37c7bbf6c42fb0b5ea5d8a431abf677df5822
Author:     David Palao <david.palao@gmail.com>
AuthorDate: 2022-09-16 13:48:39 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2022-09-25 19:10:01 +0000

    test(actions): requiring that run_action calls binarytree.populate correctly
    
    ...which means that since this is the first time, populate uses
    getbinpkg_refresh=True explicitly.
    
    This step is a preparation for a follow-up little change in the API of
    binarytree.populate
    
    Bug: https://bugs.gentoo.org/864259
    Signed-off-by: David Palao <david.palao@gmail.com>
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 lib/_emerge/actions.py                   |  4 ++-
 lib/portage/tests/emerge/test_actions.py | 45 ++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)
Comment 3 Larry the Git Cow gentoo-dev 2022-10-01 03:00:09 UTC
The bug has been closed via the following commit(s):

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

commit 00f62c1578506cb2d94b3ccf922cb40fa128387a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-10-01 02:59:09 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-01 02:59:59 +0000

    sys-apps/portage: add 3.0.38
    
    Closes: https://bugs.gentoo.org/827974
    Closes: https://bugs.gentoo.org/864259
    Closes: https://bugs.gentoo.org/865115
    Closes: https://bugs.gentoo.org/871570
    Closes: https://bugs.gentoo.org/872392
    Closes: https://bugs.gentoo.org/872440
    Closes: https://bugs.gentoo.org/873088
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.38.ebuild | 273 +++++++++++++++++++++++++++++++++
 2 files changed, 274 insertions(+)