Bootstrap support for forky.
Until now we've been happily building all version × suite combinations but that's not possible anymore (armel was dropped). Generating an empty recipe is just a proof of concept, based on the idea the Python script contains the logic, and the Makefile doesn't/shouldn't know about those details.
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
# pylint: disable=invalid-name
|
# pylint: disable=invalid-name
|
||||||
|
|
||||||
@@ -18,12 +19,23 @@ if version not in ["1", "2", "3", "4"]:
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
suite = sys.argv[2]
|
suite = sys.argv[2]
|
||||||
if suite not in ['bullseye', 'bookworm', 'trixie']:
|
if suite not in ['bullseye', 'bookworm', 'trixie', 'forky']:
|
||||||
print("E: unsupported suite %s" % suite, file=sys.stderr)
|
print("E: unsupported suite %s" % suite, file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
target_yaml = 'raspi_%s_%s.yaml' % (version, suite)
|
target_yaml = 'raspi_%s_%s.yaml' % (version, suite)
|
||||||
|
|
||||||
|
|
||||||
|
### Detect unsupported combinations
|
||||||
|
#
|
||||||
|
# Some version/suite combinations are no longer supported (e.g. the architecture
|
||||||
|
# got removed from the archive), in which case generate an empty file and let
|
||||||
|
# the Makefile pick it up from there.
|
||||||
|
if version == '1' and suite in ['forky']:
|
||||||
|
print(f'W: generating an empty recipe for unsupported combination ({version}×{suite})')
|
||||||
|
Path(target_yaml).write_text('')
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
### Setting variables based on suite and version starts here
|
### Setting variables based on suite and version starts here
|
||||||
|
|
||||||
# Arch, kernel, DTB:
|
# Arch, kernel, DTB:
|
||||||
|
|||||||
Reference in New Issue
Block a user