if we cannot find one of the old repodata files make the warning look more dire
authorSeth Vidal <skvidal@fedoraproject.org>
Wed, 21 Apr 2010 17:53:49 +0000 (13:53 -0400)
committerSeth Vidal <skvidal@fedoraproject.org>
Wed, 21 Apr 2010 17:53:49 +0000 (13:53 -0400)
make sure we look for the 'repodata' subdir inside update_md_path

createrepo/__init__.py
createrepo/readMetadata.py

index a786955cec198da4543c513062c881ed9936aefa..ecdf5b3a0e64009aef05978799fc4ee76956a94a 100644 (file)
@@ -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:
index 4f13662bbf2d20f3c2bbb05c1dfd9858cee90064..27d36902df914e33902b5ce6fce530b27058d724 100644 (file)
@@ -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)