[Yum-devel] [PATCH] createrepo: buggy getFileList() - please review

Zdenek Pavlas zpavlas at redhat.com
Thu Nov 29 08:28:20 UTC 2012


> ...the idea (AIUI) is that you have, say:
> 
> CD1/foo.rpm
> CD1/bar.rpm
> CD2/baz.rpm
> [...]
> 
> ...then you run createrepo over the entire set with --split, and it
> removes the dirs. so that the location is foo.rpm or bar.rpm (which
> will be correct with reference to the CDn part being a "root").

This is done outside getFileList(), it's called in a for loop
with paths to CD1, CD2, etc, and returns relative locations.
=> seems we don't need a custom getFileList.

        for mydir in self.conf.directories:
            if os.path.isabs(mydir):
                thisdir = mydir
            else:
                if mydir.startswith('../'):
                    thisdir = os.path.realpath(mydir)
                else:
                    thisdir = os.path.join(self.conf.basedir, mydir)
            filematrix[mydir] = self.getFileList(thisdir, '.rpm')


More information about the Yum-devel mailing list