View previous topic :: View next topic |
Author |
Message |
bstaletic Guru
Joined: 05 Apr 2014 Posts: 361
|
Posted: Sun Jul 28, 2024 1:13 am Post subject: [SOLVED] GPKG archive name when multiple USE configs availa |
|
|
Title character limits are too limiting sometimes...
I've noticed that binhosts can have multiple variants of the same category/package-version available, differing in set USE flags.
Looking at a binhost's clang package, I can see that the archives have a suffix like -1.
Looking at my $PKGDIR, I can see sys-devel/clang-18.1.8.gpkg.tar, but inside the archive is directory clang-18.1.8-3, corresponding to the third archive from the binhost.
How does portage understand these enumerated binary packages?
More specifically:
In order for emerge to figure out that clang USE flags in archive 3 match my system, does it need to download all archives and then check metadata of each? I see no other way.
Why does the clang archive in my $PKGDIR not contain the -3 suffix?
If the clang archive does not contain the -3 suffix, why does the directory contained in the archive still contain that suffix?
Did I miss the answer to these questions somewhere in gentoo documentation?
Last edited by bstaletic on Sun Jul 28, 2024 7:57 am; edited 1 time in total |
|
Back to top |
|
|
eschwartz Developer
Joined: 29 Oct 2023 Posts: 214
|
Posted: Sun Jul 28, 2024 4:43 am Post subject: Re: GPKG archive name when multiple USE configs availa |
|
|
bstaletic wrote: | How does portage understand these enumerated binary packages?
More specifically:
In order for emerge to figure out that clang USE flags in archive 3 match my system, does it need to download all archives and then check metadata of each? I see no other way. |
The "Packages" file is an index of all available archives, including dependency information, IUSE flags, enabled USE flags, the subslots built against by RDEPEND entries containing :=, etc.
The gpkg filename only needs to be unique.
bstaletic wrote: |
Why does the clang archive in my $PKGDIR not contain the -3 suffix?
If the clang archive does not contain the -3 suffix, why does the directory contained in the archive still contain that suffix?
Did I miss the answer to these questions somewhere in gentoo documentation? |
I am not sure why the one in your PKGDIR doesn't have a -3. It is, generally, possible for archives to have a different suffix internally since I don't think anything enforces it. Portage will, at least sometimes, rename the downloaded gpkg since it clashes with a gpkg you already have-- e.g. imagine if you rebuilt it three times locally yourself with different USE flags, then downloaded a -3 package from the binhost with a fourth combo? It would be unable to download to the -3 filename and therefore *must* rename itself.
(I would probably argue that that is a reason why the internal archive should not store the number at all, and it should only be an artifact of the on-disk storage, but I had no part in designing the format... ) |
|
Back to top |
|
|
bstaletic Guru
Joined: 05 Apr 2014 Posts: 361
|
Posted: Sun Jul 28, 2024 7:56 am Post subject: |
|
|
eschwartz wrote: | The "Packages" file |
Ah, that makes more sense! I've seen it, but completely ignored its specification and focused on individual gpkgs.
eschwartz wrote: |
I am not sure why the one in your PKGDIR doesn't have a -3. It is, generally, possible for archives to have a different suffix internally since I don't think anything enforces it. Portage will, at least sometimes, rename the downloaded gpkg since it clashes with a gpkg you already have-- e.g. imagine if you rebuilt it three times locally yourself with different USE flags, then downloaded a -3 package from the binhost with a fourth combo? It would be unable to download to the -3 filename and therefore *must* rename itself.
(I would probably argue that that is a reason why the internal archive should not store the number at all, and it should only be an artifact of the on-disk storage, but I had no part in designing the format... ) |
I see why those suffixes are needed. Now I also see why renames might happen.
I still think it's silly for the archive to have no suffix, but the contained directory to have one.
I'll play around with changing USE flags some more to satisfy the remainder of my curiosity regarding gpkgs.
Marking as solved. |
|
Back to top |
|
|
bstaletic Guru
Joined: 05 Apr 2014 Posts: 361
|
Posted: Sun Jul 28, 2024 8:27 am Post subject: |
|
|
My FEATURES do not have binpkg-multi-instance, hence no BUILD_ID suffix in my gpkg archives! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|