From: Seth Vidal Date: Thu, 17 Jan 2008 17:52:36 +0000 (-0500) Subject: make --update and --split mostly work again X-Git-Tag: upstream/0.9.9~153 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fdd7cdba561d61d523c692785c6a70c43588b88f;p=tools%2Fcreaterepo.git make --update and --split mostly work again --- diff --git a/createrepo/__init__.py b/createrepo/__init__.py index 32e3b6c..5381fe9 100644 --- a/createrepo/__init__.py +++ b/createrepo/__init__.py @@ -670,10 +670,25 @@ class SplitMetaDataGenerator(MetaDataGenerator): def doPkgMetadata(self): """all the heavy lifting for the package metadata""" - import types if len(self.conf.directories) == 1: MetaDataGenerator.doPkgMetadata(self) return + + if self.conf.update: + #build the paths + primaryfile = os.path.join(self.conf.outputdir, self.conf.finaldir, self.conf.primaryfile) + flfile = os.path.join(self.conf.outputdir, self.conf.finaldir, self.conf.filelistsfile) + otherfile = os.path.join(self.conf.outputdir, self.conf.finaldir, self.conf.otherfile) + opts = { + 'verbose' : self.conf.verbose, + 'pkgdir' : os.path.normpath(self.package_dir) + } + if self.conf.skip_stat: + opts['do_stat'] = False + + #and scan the old repo + self.oldData = readMetadata.MetadataIndex(self.conf.outputdir, + primaryfile, flfile, otherfile, opts) filematrix = {} for mydir in self.conf.directories: