From: Seth Vidal Date: Wed, 21 Apr 2010 17:53:49 +0000 (-0400) Subject: if we cannot find one of the old repodata files make the warning look more dire X-Git-Tag: upstream/0.9.9~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ffd4fe4c0240c0a37dad28bc89c88148593894e7;p=tools%2Fcreaterepo.git 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)