[Rpm-metadata] 2 commits - createrepo/__init__.py
skvidal at osuosl.org
skvidal at osuosl.org
Thu Apr 15 14:24:55 UTC 2010
createrepo/__init__.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 346d4fc5c34059eb52cbe3e8588ea23bfde879f9
Merge: f9a657a... 9c7b182...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Apr 15 10:24:27 2010 -0400
Merge branch 'master' of ssh://createrepo.baseurl.org/srv/projects/createrepo/git/createrepo
* 'master' of ssh://createrepo.baseurl.org/srv/projects/createrepo/git/createrepo:
Tell git to ignore tarballs.
Document --repo in man page.
Add bash completion.
commit f9a657aa401f4d13b5c1dc7fc787b5535e6561f3
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Apr 15 10:23:07 2010 -0400
- catch errors when moving the olddir out/back
- if we get a yumLocalPackage object in our pkglist we should record we read it.
diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 8704562..e2402ae 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -29,7 +29,7 @@ import stat
from yum import misc, Errors, to_unicode
from yum.sqlutils import executeSQL
from yum.packageSack import MetaSack
-from yum.packages import YumAvailablePackage
+from yum.packages import YumAvailablePackage, YumLocalPackage
import rpmUtils.transaction
from utils import _, errorprint, MDError
@@ -529,7 +529,8 @@ class MetaDataGenerator:
else:
po = pkg
- self.read_pkgs.append(po.localpath)
+ if isinstance(pkg, YumLocalPackage):
+ self.read_pkgs.append(po.localpath)
if self.conf.database_only:
pass # disabled right now for sanity reasons (mine)
@@ -1046,6 +1047,11 @@ class MetaDataGenerator:
'Could not remove old metadata file: %s: %s') % (oldfile, e)
# Move everything else back from olddir (eg. repoview files)
+ try:
+ old_contents = os.listdir(output_old_dir)
+ except (OSError, IOError), e:
+ old_contents = []
+
for f in os.listdir(output_old_dir):
oldfile = os.path.join(output_old_dir, f)
finalfile = os.path.join(output_final_dir, f)
More information about the Rpm-metadata
mailing list