fff: create proper package variants instead of copying file #96
No reviewers
Labels
No Label
RFC
RFT
WIP
blocked
bsp
bug
build/scripts/tools
duplicate
feature
fixed
layer3
mantis
more details required
needs changes
node
packages/fff
rejected
security
trivial
upstream
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: freifunk-franken/firmware#96
Loading…
Reference in New Issue
No description provided.
Delete Branch "adschm/firmware:fffpkg"
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?
So far, we ensure the selection of a specific variant by copying
included Make files. This not only breaks if the packages are used
as a feed, but also is against the concept of how packages are used.
In this patch, the fff package is converted into a set of variants
that allow selection via a FFF_VARIANT variable that is exported by
buildscript. If no export happens, e.g. when using packages in a
feed, no package is selected.
Since the names fff-node and fff-layer3 are not available anymore,
the packages for the variants are called (though irrelevant for
the user):
The only drawback is that we now have to specify the list of
available variants in the buildscript. However, these values are
hardcoded in several other places as well, and the former code
based on file names was not really appealing anyway.
Signed-off-by: Adrian Schmutzler freifunk@adrianschmutzler.de
@ -24,2 +11,2 @@
+fff-timeserver \
+fff-simple-tc
URL:=https://www.freifunk-franken.de
DEFAULT:=$(if $(findstring fff-variant-$(FFF_VARIANT),$(1)),y,n)
Hier muss 'findstring' durch 'filter' ersetzt werden.
Hi, was steht denn hier in $1 ?
$1 ist der Package-Name wie im Define, also fff-variant-node oder fff-variant-layer3.
Ich wollte erst direkt $(FFF_VARIANT) gegen VARIANT prüfen, aber aus irgendeinem Grund ist VARIANT zu dem Zeitpunkt, wo der Vergleich durchgeführt wird, noch nicht verfügbar (tatsächlich muss man hier statt VARIANT dann BUILD_VARIANT verwenden und ggf. auch "=" statt ":=", aber es hat in keinem Fall funktioniert, weshalb ich auf diese Methode ausgewichen bin, die sich als robust erwiesen hat).
danke dir,
ich glaub ich hab's jetzt tatsaechlich verstanden. Ich bin sehr dafuer.
Mit der function filter:
@ -449,3 +450,3 @@
echo
else
if [ ! -f "src/packages/fff/fff/variant-$2.mk" ]; then
if ! echo "$FFF_VARIANTS" | grep -q "\b$2\b"; then
Nicht so viel greppen, wenn es nicht noetig ist. Die bash ist im shebang ->
Ich bin bash nicht so gewohnt, werd mir das gelegentlich mal ankucken.
Werde das jetzt erstmal ohne bash-specific change mergen.
Vielen Dank.
Tut ja nix an der Sache. Ist nur bild-in vs. external.
Pull request closed