createrepo/__init__.py createrepo/readMetadata.py

[email protected]
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
 createrepo/__init__.py     |    5 +++--
 createrepo/readMetadata.py |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit ffd4fe4c0240c0a37dad28bc89c88148593894e7
Author: Seth Vidal <[email protected]>
Date:   Wed Apr 21 13:53:49 2010 -0400

    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

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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.