Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 751253 - sys-apps/portage: a tool to add/remove binary packages from a repository and merge two binpkg caches
Summary: sys-apps/portage: a tool to add/remove binary packages from a repository and ...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-26 00:22 UTC by Zac Medico
Modified: 2022-09-25 03:18 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pkgdir-merge script (pkgdir-merge,1.47 KB, text/x-python)
2021-06-17 19:03 UTC, Zac Medico
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2020-10-26 00:22:12 UTC
There are cases where people may want to add or remove binary packages from a repository, so we should provide a tool for this.
Comment 1 Zac Medico gentoo-dev 2021-06-17 19:03:55 UTC
Created attachment 716640 [details]
pkgdir-merge script

usage: pkgdir-merge [-h] [-v] SRC DEST

  
  A tool to merge two directories of portage binary packages together

positional arguments:
  SRC            Source package directory
  DEST           Destination package directory

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  verbose logging (each occurence increases verbosity)
Comment 2 Yixun Lan archtester gentoo-dev 2022-06-03 14:13:09 UTC
I second this idea, also try to add more ..

1) expand to multi SRC repos
 pkgdir-merge [-h] [-v] SRC1 SRC2 SRC3 .. DEST

2) support FEATURE=binpkg-multi-instance, need to handle multi binpkgs for one same package, do the deduplication, and fix two binpkg with same BUILD_ID (build with different USE configuration)

3) support old/new (xpak/gpkg) format (GLEP 78)
Comment 3 Sheng Yu 2022-09-25 02:27:41 UTC
The problem is how can we do the deduplication? Like how can we know 2 binpkgs are interchangeable from their metadata. Gentoo is not doing reproducible building, so the binary mismatch is common.

I think in this case that more people want to build on multiple systems and share it somewhere, the configuration hash is more useful. 2 binpkgs with same configuration hash should be interchangeable.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-25 03:18:06 UTC
(In reply to Sheng Yu from comment #3)
> The problem is how can we do the deduplication? Like how can we know 2
> binpkgs are interchangeable from their metadata. Gentoo is not doing
> reproducible building, so the binary mismatch is common.
> 

Good point. I think as long as the configuration is the same (CFLAGS, etc), we should be fine with merging them. Then if we ever truly get reproducible builds (we will really benefit naturally from the ecosystem moving towards this), we can revisit and allow more fine-grained checks?