Bug 969754 - Createrepo sees multiply copies of each rpm file
Createrepo sees multiply copies of each rpm file
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: createrepo (Show other bugs)
rawhide
Unspecified Linux
unspecified Severity high
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-02 03:40 EDT by Ronen Angluster
Modified: 2013-06-03 05:18 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-03 05:06:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ronen Angluster 2013-06-02 03:40:21 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):
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:
Comment 1 Zdeněk Pavlas 2013-06-03 05:06:39 EDT
> 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
Comment 2 Ronen Angluster 2013-06-03 05:18:38 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.