[Rpm-metadata] 2 commits - createrepo/__init__.py genpkgmetadata.py
skvidal at osuosl.org
skvidal at osuosl.org
Fri Mar 5 18:18:30 UTC 2010
createrepo/__init__.py | 5 ++++-
genpkgmetadata.py | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
New commits:
commit ba1853d5c8e54c8876f3a52801451643a5b5e116
Merge: 72af125... ce96384...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Mar 5 13:18:32 2010 -0500
Merge branch 'master' of ssh://createrepo.baseurl.org/srv/projects/createrepo/git/createrepo
* 'master' of ssh://createrepo.baseurl.org/srv/projects/createrepo/git/createrepo:
Trim trailing whitespace.
diff --cc createrepo/__init__.py
index cb8ba16,d29c9d8..8704562
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@@ -100,10 -100,9 +100,10 @@@ class MetaDataConfig(object)
self.revision = str(int(time.time()))
self.content_tags = [] # flat list of strings (like web 2.0 tags)
self.distro_tags = []# [(cpeid(None allowed), human-readable-string)]
+ self.repo_tags = []# strings, forwhatever they are worth
self.read_pkgs_list = None # filepath/name to write out list of pkgs
# read in this run of createrepo
-
+
class SimpleMDCallBack(object):
def errorlog(self, thing):
print >> sys.stderr, thing
@@@ -803,12 -802,12 +803,12 @@@ class MetaDataGenerator
reporoot = repodoc.newChild(None, "repomd", None)
repons = reporoot.newNs('http://linux.duke.edu/metadata/repo', None)
reporoot.setNs(repons)
- rpmns = reporoot.newNs("http://linux.duke.edu/metadata/rpm", 'rpm')
+ rpmns = reporoot.newNs("http://linux.duke.edu/metadata/rpm", 'rpm')
repopath = os.path.join(self.conf.outputdir, self.conf.tempdir)
repofilepath = os.path.join(repopath, self.conf.repomdfile)
-
+
revision = reporoot.newChild(None, 'revision', self.conf.revision)
- if self.conf.content_tags or self.conf.distro_tags:
+ if self.conf.content_tags or self.conf.distro_tags or self.conf.repo_tags:
tags = reporoot.newChild(None, 'tags', None)
for item in self.conf.content_tags:
c_tags = tags.newChild(None, 'content', item)
diff --cc genpkgmetadata.py
index 81e86c2,4ab4e9a..1c6a8b3
--- a/genpkgmetadata.py
+++ b/genpkgmetadata.py
@@@ -100,10 -100,8 +100,10 @@@ def parse_args(args, conf)
default=False, action="store_true")
parser.add_option("--distro", default=[], action="append",
help="distro tag and optional cpeid: --distro" "'cpeid,textname'")
- parser.add_option("--content", default=[], dest='content_tags',
+ parser.add_option("--content", default=[], dest='content_tags',
action="append", help="tags for the content in the repository")
+ parser.add_option("--repo", default=[], dest='repo_tags',
+ action="append", help="tags to describe the repository itself")
parser.add_option("--revision", default=None,
help="user-specified revision for this repository")
parser.add_option("--deltas", default=False, action="store_true",
commit 72af125c317b2baeca125d9c24ab461c0bdcfc5a
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Mar 5 13:11:56 2010 -0500
add repo tags and --repo option to describe the repo itself.
request from suse.
diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 0c0c7d8..cb8ba16 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -100,6 +100,7 @@ class MetaDataConfig(object):
self.revision = str(int(time.time()))
self.content_tags = [] # flat list of strings (like web 2.0 tags)
self.distro_tags = []# [(cpeid(None allowed), human-readable-string)]
+ self.repo_tags = []# strings, forwhatever they are worth
self.read_pkgs_list = None # filepath/name to write out list of pkgs
# read in this run of createrepo
@@ -807,10 +808,12 @@ class MetaDataGenerator:
repofilepath = os.path.join(repopath, self.conf.repomdfile)
revision = reporoot.newChild(None, 'revision', self.conf.revision)
- if self.conf.content_tags or self.conf.distro_tags:
+ if self.conf.content_tags or self.conf.distro_tags or self.conf.repo_tags:
tags = reporoot.newChild(None, 'tags', None)
for item in self.conf.content_tags:
c_tags = tags.newChild(None, 'content', item)
+ for item in self.conf.repo_tags:
+ c_tags = tags.newChild(None, 'repo', item)
for (cpeid, item) in self.conf.distro_tags:
d_tags = tags.newChild(None, 'distro', item)
if cpeid:
diff --git a/genpkgmetadata.py b/genpkgmetadata.py
index 7877ba9..81e86c2 100755
--- a/genpkgmetadata.py
+++ b/genpkgmetadata.py
@@ -102,6 +102,8 @@ def parse_args(args, conf):
help="distro tag and optional cpeid: --distro" "'cpeid,textname'")
parser.add_option("--content", default=[], dest='content_tags',
action="append", help="tags for the content in the repository")
+ parser.add_option("--repo", default=[], dest='repo_tags',
+ action="append", help="tags to describe the repository itself")
parser.add_option("--revision", default=None,
help="user-specified revision for this repository")
parser.add_option("--deltas", default=False, action="store_true",
More information about the Rpm-metadata
mailing list