plan/main names the fab package, and the resolver drops it silently when it is missing #4
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/tkldev#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
plan/main:3is a bare linefab. It is the only plan file in the wholeorganization that names fab as a package, and after Keel-Linux/fab#9 it will
name a package that no longer exists. It does not fail loudly, and
Provides: fabdoes not save it, because it never reaches apt.Why Provides does not cover this
tkldev/Makefileisinclude $(FAB_PATH)/common/mk/turnkey.mk, soplan/mainis resolved by
fab-plan-resolve, not by apt. fab's own resolver does notresolve virtual packages:
fablib/plan.py:205-206takes the pool's answer and doespackage_name = fname.split("_")[0], thenself._deps[deps[package_name]].The first field of the
.debfilename has to be string-equal to therequested name, so a
keel-fab_2.0.0_all.debreturned for a request offabraises an uncaught
KeyError._get_provided(plan.py:329) readsProvidesonly from packages that havealready been fetched, and
providedis subtracted fromall_missingonly at
plan.py:406. Nothing in that path ever causes a provider to befetched.
And the miss is silent
missingis initialised atplan.py:366and never mutated, whilebrokendepsis built by iterating it at
plan.py:421-422. Soresolve()returns(spec, [])even whenall_missingis non-empty: a plan entry the pool cannotsupply is dropped from the spec and nothing says so.
That is upstream code, not something Keel-Linux/fab#9 introduced, but it is
what turns this from a build failure into a silently wrong image.
Why it is latent rather than broken today
apt/pool/main/f/fab/fab_1.1.1+keel1_all.debis still in the archive. So afterthe conversion, and before anything changes here, TKLDev images built from this
recipe would keep shipping the pre-rename fab while the build host itself
runs
keel-fab, which is a divergence nobody would notice. The dayfableavesthe pool they would ship no fab at all, without an error.
What closes this
plan/main:3becomeskeel-fab, after Keel-Linux/fab#9 is merged and thepackage is published, and before
fabis removed from the pool.overlay/usr/local/sbin/tkldev-setup:372,DEBIAN_FRONTEND=noninteractive apt-get install -y fab, becomeskeel-fab. This one is an apt call, andProvides: fabdoes make it installkeel-fabwhile no realfabisreachable, but that is not the case on a machine with the TurnKey archive
enabled: apt prefers a real package over a virtual provider, and upstream's
real
fabis at priority 999 there. Measured in a container,apt-get install -y fabwithkeel-fabinstalled removeskeel-faband installsupstream's fab. Keel-Linux/apt#15 adds the negative pin that stops that on
the build host; this line should name the right package regardless, since
tkldev-setup runs on machines that do not have our pin file.
tests/tkldev-setup.bats:309asserts the literal stringapt-get install -y faband moves with it.overlay/usr/local/sbin/tkldev-setup:17says "'fab' packagewill be installed when relevant."
Order
Not before Keel-Linux/fab#9 merges and
keel-fabis published, or this recipestops resolving. Not after
fableaves the pool, or it silently stops shippinga builder. Between those two, and the archive change is the one to wait for.
The resolver defects above are worth their own issue in
Keel-Linux/fabwhatever happens here:
resolve()returning no error for a package the poolcould not supply is the kind of thing that costs a day the first time it
matters.