Open bdrewery opened 4 months ago
@pizzamig
I tried to understand poudriere internals. but I have to admit that I hit my limits.
The bug is the result of the copy&paste, but I guess it's gqueue
.
But, the subpackage should not be built, only the origin
should be built once.
I have a couple to test ports I've used to develope the feature you can re-use link
Sorry there's no design doc! The queue is definitely a weird mess that came out of FLAVORS support. Thanks for the overlay. I'll bring those in and add some tests for subpackages. Thanks for your work on this.
Let me know if you need other explanations on how I tried to add subpackage support to poudriere. In general, the approach should be:
I've found problematic to manage subpackage's information to manage functions like delete_old_pkg
Maybe subpackages can be added to the meta
queue, as only metadata are needed for delete_old_pkg
, but I'm not 100% sure on how the mqueue
are held.
Adding a subpackage
queue seems overkill to me, but maybe a cleaner approach.
I'm pretty sure this is dead code. I put an err 99 dead
in there and nothing triggers it. There's no point in doing much here without a full test suite to cover the cases.
To support that it is dead code, this function handles queued items. Subpackages don't get queued. Only the main port does.
https://github.com/freebsd/poudriere/commit/270784e04a8efd0e83178ab19cd0a2e876fc3905
$queue
here is not set when there is a$dep_subpkg
value. The queues have very special different handling. It matters which queue an item ends up in.