diff options
Diffstat (limited to 'meta-ibm/recipes-phosphor')
-rw-r--r-- | meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend b/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend index e3e5002bb..7898a1039 100644 --- a/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend +++ b/meta-ibm/recipes-phosphor/ipmi/phosphor-ipmi-config.bbappend @@ -22,14 +22,18 @@ python do_patch_ibm-ac-server() { from shutil import copyfile version_id = do_get_version(d) - # count from the commit version + # count from the commit version, minimum of one digit count = re.findall("-(\d{1,4})-", version_id) + if count: + commit = count[0] + else: + commit = "0" release = re.findall("-r(\d{1,4})", version_id) if release: - auxVer = count[0] + "{0:0>4}".format(release[0]) + auxVer = commit + "{0:0>4}".format(release[0]) else: - auxVer = count[0] + "0000" + auxVer = commit + "0000" workdir = d.getVar('WORKDIR', True) file = os.path.join(workdir, 'dev_id.json') |