Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 920537 - sys-apps/portage-3.0.57 fetching binpkgs from file:// URI: Unsupported scheme.
Summary: sys-apps/portage-3.0.57 fetching binpkgs from file:// URI: Unsupported scheme.
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: 919862
Blocks: 618252 659784 768957
  Show dependency tree
 
Reported: 2023-12-22 16:16 UTC by Esteve Varela Colominas
Modified: 2024-01-14 19:54 UTC (History)
0 users

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 Esteve Varela Colominas 2023-12-22 16:16:26 UTC
When configuring my /etc/portage/binrepos.conf with a sync-uri value of file:///path/to/repo, portage is able to properly obtain and parse the Packages file.
However, once the merge is accepted, the console ends up filled with messages like the following:

    file:///home/mid-kid/.gentoo-current/var/cache/binpkgs/sys-libs/libxcrypt/libxcrypt-4.4.36-1.xpak: Unsupported scheme.

I feel like having this be supported properly would be very useful, though I would suggest following the formatting for GENTOO_MIRRORS, where an absolute path without scheme is used for local paths.
Comment 1 Zac Medico gentoo-dev 2023-12-24 06:14:17 UTC
I guess we could add file copy support to BinpkgFetcher.

The current system requires that we create a copy (or possibly a hardlink) in PKGDIR. I suppose it would be possible to consume the package without actually adding it to PKGDIR though. Is that something that would be desired?
Comment 2 Esteve Varela Colominas 2023-12-24 14:29:35 UTC
I think it'd make a lot of sense, but to avoid complication I'd stick to copying. If such a feature, where local repositories can be accessed without copying, were to exist, I'd also want it to exist for GENTOO_MIRRORS.
Comment 3 Zac Medico gentoo-dev 2023-12-24 23:51:46 UTC
(In reply to Esteve Varela Colominas from comment #2)
> I think it'd make a lot of sense, but to avoid complication I'd stick to
> copying. If such a feature, where local repositories can be accessed without
> copying, were to exist, I'd also want it to exist for GENTOO_MIRRORS.

Okay, https://github.com/gentoo/portage/pull/1215 adds the copy support. It uses that native file copy extension as long as native-extensions is enabled, which uses reflinks when possible.
Comment 4 Larry the Git Cow gentoo-dev 2023-12-26 21:01:36 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=1db44d18578a7aee58449cb97e1991cb06c915c3

commit 1db44d18578a7aee58449cb97e1991cb06c915c3
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2023-12-26 06:42:28 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2023-12-26 06:42:28 +0000

    bintree: support file scheme for binhost src-uri
    
    Add local file scheme support for binhost src-uri in bintree
    and BinpkgFetcher. Make BinpkgFetcher use a coroutine to avoid
    using callbacks. Add AsyncTaskFuture isAlive method that
    BinpkgFetcher can use to check FileCopier state. Add test
    command to test emerge -f --getbinpkgonly with local file
    scheme in binrepos.conf.
    
    Also, fix the getbinpkgonly_fetchonly test command so that
    it does not rename binhost_dir to pkgdir. It seems like it
    should not do this, and it caused the getbinpkgonly_file_uri
    command to fail.
    
    Bug: https://bugs.gentoo.org/920537
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/_emerge/BinpkgFetcher.py               | 117 +++++++++++++++++++----------
 lib/portage/dbapi/bintree.py               |  19 +++--
 lib/portage/tests/emerge/conftest.py       |  21 +++++-
 lib/portage/util/_async/AsyncTaskFuture.py |   8 +-
 4 files changed, 111 insertions(+), 54 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2023-12-27 21:28:39 UTC
The bug has been closed via the following commit(s):

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

commit 0a1f19cdd7a598070b7eb08b3954e677aa4868ad
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-27 21:27:55 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-27 21:28:01 +0000

    sys-apps/portage: add 3.0.59
    
    Closes: https://bugs.gentoo.org/587088
    Closes: https://bugs.gentoo.org/822033
    Closes: https://bugs.gentoo.org/915494
    Closes: https://bugs.gentoo.org/916135
    Closes: https://bugs.gentoo.org/917120
    Closes: https://bugs.gentoo.org/919862
    Closes: https://bugs.gentoo.org/920095
    Closes: https://bugs.gentoo.org/920258
    Closes: https://bugs.gentoo.org/920537
    Closes: https://bugs.gentoo.org/920654
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.59.ebuild | 246 +++++++++++++++++++++++++++++++++
 2 files changed, 247 insertions(+)