summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2013-11-27 14:13:29 +0100
committerEdward Hervey <edward@collabora.com>2013-12-10 09:55:01 -0500
commited53803ccac24b4c43795b8019aea895f5d54be4 (patch)
treecbc131940bbf75c055b209c91562005b1c7e8ee2
parent9fbce782422dd30f2838b740a08ef63ce96d9764 (diff)
WIP manifest2cerbero
-rwxr-xr-xmanifest2cerbero.py24
1 files changed, 20 insertions, 4 deletions
diff --git a/manifest2cerbero.py b/manifest2cerbero.py
index 72c4939..9ad8256 100755
--- a/manifest2cerbero.py
+++ b/manifest2cerbero.py
@@ -7,6 +7,13 @@
import argparse, shutil
import xml.etree.ElementTree as ET
+import sys
+
+toconvert = [
+ "gstreamer", "gst-plugins-base", "gst-plugins-good",
+ "gst-plugins-bad", "gst-plugins-ugly", "gst-libav",
+ "gst-editing-services", "gst-rtsp-server", "gst-plugins-gl"
+]
def main(**kwargs):
try:
@@ -20,17 +27,26 @@ def main(**kwargs):
# Create a output dictionary based on the manifest
for atype in root.findall('project'):
- print "Adding package: %s - revision: %s" % (atype.get('name'), atype.get('revision'))
- output[atype.get('name')] = atype.get('revision')
-
+ aname = atype.get('name')
+ arev = atype.get('revision')
+ print "Adding package: %s - revision: %s" % (aname, arev)
+ if aname in toconvert:
+ output["%s-1.0" % aname] = arev
+ output["%s-1.0-static" % aname] = arev
+ else:
+ output[aname] = arev
+
+ print "output:", output
+ print kwargs
# Copy the original cerbero config file to the output destination
shutil.copy2(kwargs['cerbero'], kwargs['output'])
# Append to the output file the dictionary
print "Writing the output file."
with open(kwargs['output'], "a") as outfile:
- outfile.write("recipes_commits = %s" % output)
+ outfile.write("\nrecipes_commits = %s\n" % output)
except:
+ print "Unexpected error:", sys.exc_info()[0]
print "ERROR: Cannot convert manifest into cerbero file. Check manifest file."
if __name__ == '__main__':