Discussion:
3 commits - createrepo/merge.py genpkgmetadata.py
z***@osuosl.org
2013-10-18 09:17:50 UTC
Permalink
createrepo/merge.py | 7 +++----
genpkgmetadata.py | 4 ++--
2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit b71484e58ccfd205b87c397b2aecc7716cf89af6
Author: Zdenek Pavlas <***@redhat.com>
Date: Fri Oct 18 11:14:02 2013 +0200

mergerepo: --repo option should work with relative paths.

diff --git a/createrepo/merge.py b/createrepo/merge.py
index 80d9df5..7f03c6a 100644
--- a/createrepo/merge.py
+++ b/createrepo/merge.py
@@ -83,7 +83,8 @@ class RepoMergeBase:
# in the repolist
count = 0
for r in self.repolist:
- if r[0] == '/':
+ if ':' not in r:
+ r = os.path.abspath(r)
r = 'file://' + r # just fix the file repos, this is silly.
count +=1
rid = 'repo%s' % count
commit 51224f8a71b45245dfbbe0e467c5dd6c2c012ac2
Author: Zdenek Pavlas <***@redhat.com>
Date: Fri Oct 18 11:01:42 2013 +0200

mergerepo: merge package versions from multiple repos. BZ 1020756

diff --git a/createrepo/merge.py b/createrepo/merge.py
index 1ac43bb..80d9df5 100644
--- a/createrepo/merge.py
+++ b/createrepo/merge.py
@@ -70,9 +70,7 @@ class RepoMergeBase:

for repo in repos:
for pkg in repo.sack:
- others = self.yumbase.pkgSack.searchNevra(name=pkg.name, arch=pkg.arch)
- # NOTE the above is definitely going to catch other versions which may
- # be an invalid comparison
+ others = self.yumbase.pkgSack.searchNevra(pkg.name, pkg.epoch, pkg.version, pkg.release, pkg.arch)
if len(others) > 1:
for thatpkg in others:
if pkg.repoid == thatpkg.repoid: continue
commit dc32efba18cefdb4155befb186a3e1793eb30ca7
Author: Zdenek Pavlas <***@redhat.com>
Date: Tue Oct 8 13:47:15 2013 +0200

abort if $PWD does not exist. BZ 1001629

People use "createrepo ." often enough to make "chdir /" a bad idea.

diff --git a/genpkgmetadata.py b/genpkgmetadata.py
index 212b075..1c175b8 100755
--- a/genpkgmetadata.py
+++ b/genpkgmetadata.py
@@ -246,8 +246,8 @@ def main(args):
os.getcwd()
except OSError, e:
if e.errno != errno.ENOENT: raise
- print ('No getcwd() access in current directory, moving to /')
- os.chdir("/")
+ print ('No getcwd() access in current directory.')
+ sys.exit(1)
start_st = time.time()
conf = createrepo.MetaDataConfig()
conf = parse_args(args, conf)

Loading...