From ffd4fe4c0240c0a37dad28bc89c88148593894e7 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Wed, 21 Apr 2010 13:53:49 -0400 Subject: [PATCH] if we cannot find one of the old repodata files make the warning look more dire make sure we look for the 'repodata' subdir inside update_md_path --- createrepo/__init__.py | 5 +++-- createrepo/readMetadata.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/createrepo/__init__.py b/createrepo/__init__.py index a786955..ecdf5b3 100644 --- a/createrepo/__init__.py +++ b/createrepo/__init__.py @@ -338,8 +338,9 @@ class MetaDataGenerator: if self.conf.update_md_path: norm_u_md_path = os.path.normpath(self.conf.update_md_path) - if not os.path.exists(norm_u_md_path): - msg = _('Warning: could not open update_md_path: %s') % norm_u_md_path + u_md_repodata_path = norm_u_md_path + '/repodata' + if not os.path.exists(u_md_repodata_path): + msg = _('Warning: could not open update_md_path: %s') % u_md_repodata_path self.callback.errorlog(msg) old_repo_path = os.path.normpath(norm_u_md_path) else: diff --git a/createrepo/readMetadata.py b/createrepo/readMetadata.py index 4f13662..27d3690 100644 --- a/createrepo/readMetadata.py +++ b/createrepo/readMetadata.py @@ -59,7 +59,7 @@ class MetadataIndex(object): for fn in self.files.values(): if not os.path.exists(fn): #cannot scan - errorprint(_("Previous repo file missing: %s") % fn) + errorprint(_("Warning: Old repodata file missing: %s") % fn) return root = libxml2.parseFile(self.files['base']).getRootElement() self._scanPackageNodes(root, self._handleBase) -- 2.34.1