[Yum-devel] Patch: Hard-link packages that have already been downloaded.

James Antill james at fedoraproject.org
Mon Sep 21 16:31:18 UTC 2009


On Sat, 2009-09-19 at 00:15 -0400, Ryan Lynch wrote:
> Hi, James,
> 
> Thanks for the feedback.  I understood most of your comments, and I
> agree with everything I understood.  I need a couple of
> clarifications, for the parts I didn't grasp.

 n/p.

> On Fri, Sep 18, 2009 at 00:15, James Antill <james at fedoraproject.org> wrote:
> > 4. I'm not sure you can just use 'path' for symlink's argument, might
> > need to do realpath() ... or at least normalize it.
> 
> My original 'os.symlink()' usage seems to work OK under Python 2.4.3
> (RHEL 5) and 2.6 (F11).  As far as I know, 'os.symlink()', it takes
> the same parameters as 'os.link()', and uses them the same way.  For
> comparison:
> 
>  * http://docs.python.org/library/os.html#os.link
>  * http://docs.python.org/library/os.html#os.symlink
> 
> But think I may not understand your concern--can you clarify?  (Note
> that in the

 The big problem here is what the value of path is, which doesn't matter
for link() but does for symlink(). For instance if you do:

--package-cache /path/to/pkgs blah

...then the symlink for foo is going to be pointing
to /path/to/pkgs/foo, which might not be available from http (where the
reposync ends up being served).
 I guess we can just say "don't do that", but it'd be nice to not have
to.

> > 6. Might as well add the pkgs you download to the cache.
> 
> Again, I'm not quite sure what this means, since I'm not that familiar
> with the YUM/RPM idioms.  Can you clarify?

 Just in case there are two identical pkgs. in the repo. for the
reposync run ... might as well get the second one for free.

> neither of which appealed to me as much as the current
> 'try-except-else usage.  And as much as I hate to fall back on this
> justification, the 'try-except-else' logic just feels more Pythonic.
> But I understand that reasonable people might disagree, so let me know
> your preferences and I can change it, if required.

 I have a personal preference, but esp. here it doesn't usually matter.
I don't think we have any hard rules about it anywhere new.

[...]

> I realize that I might need to break this down into smaller patches.
> Can you let me know whether I'm on the right track, first?

 It looks fine, no need to break it into more patches.

-- 
James Antill <james at fedoraproject.org>
Fedora


More information about the Yum-devel mailing list