Bug 228827 - createrepo doesn't handle sub-symlinks to directories
Summary: createrepo doesn't handle sub-symlinks to directories
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: createrepo
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Seth Vidal
QA Contact:
URL:
Whiteboard:
: 240112 246292 (view as bug list)
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2007-11-26 17:54:45 UTC
Type: ---
Embargoed:


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 
directories?
[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 
worked.
[14:52:06] < skvidal> rsc: wait - do you mean top-level symlinks or sub-
symlinks?
[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 
symlink?
[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):
createrepo-0.4.6-2
createrepo-0.4.7-3

How reproducible:
Everytime.

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.