Merge pull request #479 from OrdnanceNetworks/fix-onlversion-subst

mkinstaller.py: Substitude ONLVERSION in installer.sh.in template
This commit is contained in:
Jeffrey Townsend
2018-12-26 09:09:56 -08:00
committed by GitHub
4 changed files with 8 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ include $(ONL)/make/versions/version-onl.mk
INSTALLER_NAME=$(FNAME_PRODUCT_VERSION)_ONL-OS_$(FNAME_BUILD_ID)_$(UARCH)_$(BOOTMODE)_INSTALLER
MKINSTALLER_OPTS = \
--onl-version "$(VERSION_STRING)" \
--arch $(ARCH) \
--boot-config boot-config \
--add-dir config \

View File

@@ -11,6 +11,7 @@ include $(ONL)/make/versions/version-onl.mk
INSTALLER_NAME=$(FNAME_PRODUCT_VERSION)_ONL-OS_$(FNAME_BUILD_ID)_$(UARCH)_$(BOOTMODE)_INSTALLER
MKINSTALLER_OPTS = \
--onl-version "$(VERSION_STRING)" \
--arch $(ARCH) \
--boot-config boot-config \
--add-dir config \

View File

@@ -23,7 +23,7 @@ if ONL is None:
sys.exit(1)
class InstallerShar(object):
def __init__(self, arch, template=None, work_dir=None):
def __init__(self, onl_version, arch, template=None, work_dir=None):
self.ONL = ONL
if template is None:
@@ -60,6 +60,8 @@ class InstallerShar(object):
else:
self.setvar("ARCH", self.arch)
self.setvar("ONLVERSION", onl_version)
def abort(self, msg):
logger.error(msg)
sys.exit(1)
@@ -174,6 +176,7 @@ class InstallerShar(object):
if __name__ == '__main__':
ap = argparse.ArgumentParser(NAME)
ap.add_argument("--onl-version", help="Installer ONL Version.", required=True)
ap.add_argument("--arch", help="Installer Architecture.", required=True,
choices = ['amd64', 'powerpc', 'armel', 'armhf', 'arm64'])
ap.add_argument("--initrd", nargs=2, help="The system initrd.")
@@ -195,7 +198,7 @@ if __name__ == '__main__':
help="Specify a Python plugin (runs from within the installer chroot)")
ops = ap.parse_args()
installer = InstallerShar(ops.arch, ops.work_dir)
installer = InstallerShar(ops.onl_version, ops.arch, ops.work_dir)
if ops.arch == 'amd64':
if ops.initrd is None:

View File

@@ -920,6 +920,7 @@ include %(MTOP)s/make/versions/version-%(prefix)s.mk
INSTALLER_NAME=$(FNAME_PRODUCT_VERSION)_ONL-OS_$(FNAME_BUILD_ID)_$(UARCH)_$(BOOTMODE)_INSTALLER
MKINSTALLER_OPTS := \
--onl-version "$(VERSION_STRING)" \
--arch $(ARCH) \
--boot-config boot-config \
--swi %(prefix)s-swi:$(ARCH)