From: Seth Vidal Date: Sat, 11 Sep 2004 20:19:14 +0000 (+0000) Subject: update spec file as 0.3.8 X-Git-Tag: upstream/0.9.9~287 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbaae1150a20af8046109ed0c49b842d08159e2f;p=tools%2Fcreaterepo.git update spec file as 0.3.8 fix for bug in command handling of groups location --- diff --git a/createrepo.spec b/createrepo.spec index cdbaa5f..d2e2488 100644 --- a/createrepo.spec +++ b/createrepo.spec @@ -1,6 +1,6 @@ Summary: Creates a common metadata repository Name: createrepo -Version: 0.3.7 +Version: 0.3.8 Release: 1 License: GPL Group: System Environment/Base @@ -33,6 +33,9 @@ rpm packages %{_bindir}/%{name} %changelog +* Sat Sep 11 2004 Seth Vidal +- 0.3.8 + * Wed Sep 1 2004 Seth Vidal - 0.3.7 diff --git a/genpkgmetadata.py b/genpkgmetadata.py index 02dd452..de65e35 100755 --- a/genpkgmetadata.py +++ b/genpkgmetadata.py @@ -170,6 +170,12 @@ def parseArgs(args): except getopt.error, e: errorprint(_('Options Error: %s.') % e) usage() + # make sure our dir makes sense before we continue + if len(argsleft) != 1: + errorprint(_('Error: Only one directory allowed per run.')) + usage() + else: + directory = argsleft[0] try: for arg,a in gopts: @@ -193,7 +199,7 @@ def parseArgs(args): errorprint(_('Error: Only one groupfile allowed.')) usage() else: - if os.path.exists(a): + if os.path.exists(directory + '/' + a): cmds['groupfile'] = a else: errorprint(_('Error: groupfile %s cannot be found.' % a)) @@ -213,11 +219,6 @@ def parseArgs(args): errorprint(_('Options Error: %s') % e) usage() - if len(argsleft) != 1: - errorprint(_('Error: Only one directory allowed per run.')) - usage() - else: - directory = argsleft[0] return cmds, directory @@ -370,6 +371,7 @@ def doRepoMetadata(cmds): def main(args): cmds, directory = parseArgs(args) + #setup some defaults cmds['primaryfile'] = 'primary.xml.gz' cmds['filelistsfile'] = 'filelists.xml.gz'