Bug 228827 - createrepo doesn't handle sub-symlinks to directories
createrepo doesn't handle sub-symlinks to directories
Product: Fedora
Classification: Fedora
Component: createrepo (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Seth Vidal
: 240112 246292 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2007-02-15 09:03 EST by Robert Scheck
Modified: 2014-01-21 17:57 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-26 12:54:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Robert Scheck 2007-02-15 09:03:02 EST
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 09:21:38 EST
IIRC in 0.4.4, the stuff worked - could that be?
Comment 2 Seth Vidal 2007-07-29 09:21:17 EDT
*** Bug 246292 has been marked as a duplicate of this bug. ***
Comment 3 Seth Vidal 2007-07-29 09:21:47 EDT
*** Bug 240112 has been marked as a duplicate of this bug. ***
Comment 4 Seth Vidal 2007-07-29 09:31:37 EDT
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 12:54:45 EST
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.