Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
Support for Epoch and Release. By default set to 0.
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
  • Loading branch information
Marko Saukko committed Jul 31, 2012
1 parent 16b18cb commit 5331ace
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion repomd-pattern-builder.py
Expand Up @@ -44,7 +44,21 @@ def process_yaml(stream, proot, newobsapi):
if newobsapi:
# <version>
if y.has_key('Version'):
etree.SubElement(proot, "version").attrib['ver'] = "%s" % y['Version']
version = etree.SubElement(proot, "version")
version.attrib['ver'] = "%s" % y['Version']

# Set to 0 by default as that is what OBS expects.
epoch = "0"
if y.has_key('Epoch'):
epoch = y['Epoch']

# As above...
release = "0"
if y.has_key('Release'):
release = y['Release']

version.attrib['epoch'] = "%s" % epoch
version.attrib['rel'] = "%s" % release

# <arch>
if y.has_key('Arch'):
Expand Down

0 comments on commit 5331ace

Please sign in to comment.