Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 228827 - createrepo doesn't handle sub-symlinks to directories
Summary: createrepo doesn't handle sub-symlinks to directories
Alias: None
Product: Fedora
Classification: Fedora
Component: createrepo
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Seth Vidal
QA Contact:
: 240112 246292 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2007-02-15 14:03 UTC by Robert Scheck
Modified: 2014-01-21 22:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-11-26 17:54:45 UTC

Attachments (Terms of Use)

Description Robert Scheck 2007-02-15 14:03:02 UTC
Description of problem:
[14:51:24] < rsc> skvidal: is it correct, that createrepo ignores symlinks to 
[14:51:37] < skvidal> ummm
[14:51:41] < skvidal> I dunno
[14:51:42] < skvidal> hold on
[14:52:00] < rsc> skvidal: using 0.4.6 this is the case, in the past the stuff 
[14:52:06] < skvidal> rsc: wait - do you mean top-level symlinks or sub-
[14:52:47] < rsc> skvidal: hm?
[14:53:12] < skvidal> ie: createrepo /some/symlink
[14:53:28] < skvidal> or createrepo /some/path    <- some dir in that path is a 
[14:54:24] < rsc> skvidal: createrepo /some/path where dir in path is a symlink
[14:56:19] < skvidal> rsc: you said it changed b/t 0.4.6 and 0.4.7?
[14:56:32] < rsc> skvidal: nope, I think before 0.4.6
[14:57:01] < skvidal> rsc: okay, please file the bug I'll look at it soon
[14:57:02] < skvidal> thanks
[14:57:16] < rsc> okay

Version-Release number of selected component (if applicable):

How reproducible:

Actual results:
createrepo doesn't handle sub-symlinks to directories

Expected results:
Working... ;-)

Comment 1 Robert Scheck 2007-02-15 14:21:38 UTC
IIRC in 0.4.4, the stuff worked - could that be?

Comment 2 Seth Vidal 2007-07-29 13:21:17 UTC
*** Bug 246292 has been marked as a duplicate of this bug. ***

Comment 3 Seth Vidal 2007-07-29 13:21:47 UTC
*** Bug 240112 has been marked as a duplicate of this bug. ***

Comment 4 Seth Vidal 2007-07-29 13:31:37 UTC
okay the change was when we went from using our own function to traverse the
dirs to using os.walk()  - a python builtin. os.walk() intentionally ignores
symlink'd dirs.

There's an easy way to revert and fix this but I want to verify that there
wasn't something else in making that change.

Comment 5 Seth Vidal 2007-11-26 17:54:45 UTC
okay I just fixed this in upstream and for the record the problem is in os.walk
where it uses os.lstat instead of os.stat. Ironically, it is just checking if
something is or is not a dir and it could just as easily use os.path.isdir() but
it doesn't. I've fixed this locally to createrepo and tested that it works. I'm
closing this as upstream but it will be fixed when 0.4.11 comes out.

Thank you

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