Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 864259 - sys-apps/portage: fetches binhost's 'Packages' file multiple times
Summary: sys-apps/portage: fetches binhost's 'Packages' file multiple times
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 872710
Blocks:
  Show dependency tree
 
Reported: 2022-08-07 22:39 UTC by John Helmert III
Modified: 2024-01-07 06:56 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 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(+)