Red Hat Bugzilla – Bug 969754
Createrepo sees multiply copies of each rpm file
Last modified: 2013-06-03 05:18:38 EDT
Description of problem:
When running createrepo on a directory which contains a soft symbolic link
to the same directory, createrepo will claim that for each rpm in the directory there are infact 41 copies of the said rpm file.
Version-Release number of selected component (if applicable):
create a sybolic link to self and run crearerepo
Steps to Reproduce:
1. mkdir /tmp/repo
2. ln -s /tmp/repo /tmp/repo/foo
3. copy a single rpm file to /tmp/repo
4. cd /tmp/repo && createrepo .
5. marvel at your multi-dimensioned rpm file!
on a repository of 3k packages the metadata was of 120k packages.
know when thy art looped unto thy self.
> ln -s /tmp/repo /tmp/repo/foo
Yep, that's a directory cycle. Please don't do that.
> createrepo will claim that for each rpm in the directory there are infact 41 copies of the said rpm file.
While, in fact, there are infinitely many such copies. The only reason this does not fail with an error is this interesting feature/bug:
$ python -c 'import os;print os.path.isdir("repo" + "/foo"*40)'
$ python -c 'import os;print os.path.isdir("repo" + "/foo"*41)'
great. that's a lousy answer. you're just saying "the user is doing something wrong but i wont protect myself against it".
baaaaad code writing.