Merge #321 Add support for top-level variant IDs with dashes.
This commit is contained in:
commit
469c275670
@ -94,7 +94,8 @@ def compose_to_composeinfo(compose):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
# variant details
|
# variant details
|
||||||
var.id = variant.id
|
# remove dashes from variant ID, rely on productmd verification
|
||||||
|
var.id = variant.id.replace("-", "")
|
||||||
var.uid = variant.uid
|
var.uid = variant.uid
|
||||||
var.name = variant.name
|
var.name = variant.name
|
||||||
var.type = variant.type
|
var.type = variant.type
|
||||||
@ -230,7 +231,8 @@ def write_tree_info(compose, arch, variant, timestamp=None):
|
|||||||
var.name = variant.parent.name
|
var.name = variant.parent.name
|
||||||
var.type = "variant"
|
var.type = "variant"
|
||||||
else:
|
else:
|
||||||
var.id = variant.id
|
# remove dashes from variant ID, rely on productmd verification
|
||||||
|
var.id = variant.id.replace("-", "")
|
||||||
var.uid = variant.uid
|
var.uid = variant.uid
|
||||||
var.name = variant.name
|
var.name = variant.name
|
||||||
var.type = variant.type
|
var.type = variant.type
|
||||||
|
@ -198,8 +198,6 @@ class VariantsXmlParser(object):
|
|||||||
class Variant(object):
|
class Variant(object):
|
||||||
def __init__(self, id, name, type, arches, groups, environments=None,
|
def __init__(self, id, name, type, arches, groups, environments=None,
|
||||||
buildinstallpackages=None, is_empty=False, parent=None):
|
buildinstallpackages=None, is_empty=False, parent=None):
|
||||||
if not id.isalnum():
|
|
||||||
raise ValueError("Variant ID must contain only alphanumeric characters: %s" % id)
|
|
||||||
|
|
||||||
environments = environments or []
|
environments = environments or []
|
||||||
buildinstallpackages = buildinstallpackages or []
|
buildinstallpackages = buildinstallpackages or []
|
||||||
|
@ -73,4 +73,29 @@
|
|||||||
</variants>
|
</variants>
|
||||||
</variant>
|
</variant>
|
||||||
|
|
||||||
|
<!-- layered products - Tools for Foo and Bar variants from a base product -->
|
||||||
|
<variant id="Foo-Tools" name="Tools" type="variant" has_optional="false">
|
||||||
|
<arches>
|
||||||
|
<arch>x86_64</arch>
|
||||||
|
</arches>
|
||||||
|
<groups>
|
||||||
|
<group default="true" uservisible="true">core</group>
|
||||||
|
</groups>
|
||||||
|
<environments>
|
||||||
|
<environment>minimal</environment>
|
||||||
|
</environments>
|
||||||
|
</variant>
|
||||||
|
|
||||||
|
<variant id="Bar-Tools" name="Tools" type="variant" has_optional="false">
|
||||||
|
<arches>
|
||||||
|
<arch>x86_64</arch>
|
||||||
|
</arches>
|
||||||
|
<groups>
|
||||||
|
<group default="true" uservisible="true">core</group>
|
||||||
|
</groups>
|
||||||
|
<environments>
|
||||||
|
<environment>minimal</environment>
|
||||||
|
</environments>
|
||||||
|
</variant>
|
||||||
|
|
||||||
</variants>
|
</variants>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export PYTHONPATH=$(pwd)/../
|
export PYTHONPATH=$(pwd)/../:$PYTHONPATH
|
||||||
export PATH=$(pwd)/../bin:$PATH
|
export PATH=$(pwd)/../bin:$PATH
|
||||||
|
|
||||||
mkdir -p _composes
|
mkdir -p _composes
|
||||||
|
Loading…
Reference in New Issue
Block a user