From 5a3a34294b31518f8aa8a5a18e08e5f02997ad53 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 14 Oct 2010 18:42:21 -0400 Subject: [PATCH] Cleanup and fixes. --- freshmeat-submit | 13 +++++++++---- freshmeat-submit.xml | 16 ++++++++++++---- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/freshmeat-submit b/freshmeat-submit index 1929b08..424d723 100755 --- a/freshmeat-submit +++ b/freshmeat-submit @@ -160,11 +160,13 @@ class FreshmeatMetadataFactory: if key.endswith("-URL"): urls.update({key[:-4] : value}) else: + if key.endswith("List"): + value = map(lambda x: x.strip(), value.split()) data.update({self.header_to_field(key) : value}) if not 'changes' in data: data['changes'] = message.get_payload() if prior_version and data.get("version") != prior_version: - raise FreshmeatSessionException("Version number conflict on stdin.") + raise FreshmeatSessionException("Version conflict on stdin.") # Merge in options from the command line; # they override what's on stdin. prior_version = data.get("version") @@ -173,14 +175,17 @@ class FreshmeatMetadataFactory: if key != 'read' and value != None: data[key] = value if data.get("version") != prior_version: - raise FreshmeatSessionException("Version number conflict in options.") - # Release-Focus field special handling + raise FreshmeatSessionException("Version conflict in options.") + # Release-Focus field special handling. if "release_focus" in data: if data["release_focus"] in '123456789': data["release_focus"] = focus_values[int(data["release_focus"])-1] if data["release_focus"] not in focus_values: raise FreshmeatSessionException("Invalid release focus") - data["tag_list"] = data["release_focus" ] + if "tag_list" not in data: + data["tag_list"] = data["release_focus" ] + else: + data["tag_list"].append(data["release_focus" ]) del data["release_focus"] # Now merge in the URLs, doing symbol substitution data['approved_urls'] = [] diff --git a/freshmeat-submit.xml b/freshmeat-submit.xml index 34d2883..227e504 100644 --- a/freshmeat-submit.xml +++ b/freshmeat-submit.xml @@ -152,6 +152,14 @@ below. + +Tag-List: - +-t--tag-list + +Tags to attach to this release. May be a comma-separated list. + + + Hide: - -x--hide @@ -162,11 +170,11 @@ release will not be visible on the project page. -License: - --l--license +License-List: - +-l--license-list Specify the licenses under which the release is issued. This -may be a comma-reparated list. Note that this is not copied from the +may be a comma-separated list. Note that this is not copied from the RPM License field, because the values don't map. @@ -191,7 +199,7 @@ RPM License field, because the values don't map. The License-List and all URL fields, when specified, actually change -the record for the project. Only the Changes, Version, +the record for the project. Only the Tag-List, Changes, Version, Release-Focus, and Hide fields are actually stored for each version. -- 2.43.0