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): Crearerepo v0.9.8 How reproducible: 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! Actual results: on a repository of 3k packages the metadata was of 120k packages. Expected results: know when thy art looped unto thy self. Additional info:
> 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)' True $ python -c 'import os;print os.path.isdir("repo" + "/foo"*41)' False
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.