fix up volume shortening substituions to actually work
This commit is contained in:
parent
ea8f3909ac
commit
6177cf6f88
@ -1358,13 +1358,13 @@ class Pungi(pypungi.PungiBase):
|
|||||||
arch = self.tree_arch
|
arch = self.tree_arch
|
||||||
|
|
||||||
for k, v in subsitutions.iteritems():
|
for k, v in subsitutions.iteritems():
|
||||||
if name.contains(k):
|
if k in name:
|
||||||
name.replace(k, v)
|
name = name.replace(k, v)
|
||||||
if version.contains(k):
|
if k in version:
|
||||||
version.replace(k, v)
|
version = version.replace(k, v)
|
||||||
volid = "%s-%s-%s" % (name, version, arch)
|
volid = "%s-%s-%s" % (name, version, arch)
|
||||||
if len(volid) > 32:
|
if len(volid) > 32:
|
||||||
raise RuntimeError("Volume ID %s is longer than 32 characters")
|
raise RuntimeError("Volume ID %s is longer than 32 characters" % volid)
|
||||||
else:
|
else:
|
||||||
return volid
|
return volid
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user