Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 413955 - python-distutils-ng: should not manipulate ${S} like it does
Summary: python-distutils-ng: should not manipulate ${S} like it does
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-29 07:38 UTC by Michał Górny
Modified: 2012-05-03 00:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch (python-distutils-ng-local-S.patch,924 bytes, patch)
2012-05-02 23:53 UTC, Mike Gilbert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-04-29 07:38:14 UTC
<@floppym> I don't really care for this strange manipulation of ${S} all over the place, however.
<@floppym> We should really be using a different variable I think.
Comment 1 Krzysztof Pawlik (RETIRED) gentoo-dev 2012-04-30 08:29:11 UTC
Mike: I think that using ${S} makes thing cleaner - it's always S, you don't have to check what new name this eclass uses. Is there anything specific that you don't like how S get's changed?
Comment 2 Mike Gilbert gentoo-dev 2012-04-30 15:12:14 UTC
At a technical level, PMS allows S to be reassigned only if it has not been assigned as a global (outside of a function). I don't know of a sane way to deal with this inside the eclass.

Personally, I always think of S as a constant; it is assigned once in global scope and never changes. I find it a bit disorienting to start in one place in src_prepare, but start in another place in src_install.
Comment 3 Krzysztof Pawlik (RETIRED) gentoo-dev 2012-05-02 22:59:08 UTC
S is "constant" with regards to implementation. I find it consistent - it's S, the place where sources are, ruby-ng eclass does the same manipulation of S by the way. Is it ok if I close this bug then?
Comment 4 Mike Gilbert gentoo-dev 2012-05-02 23:53:25 UTC
Created attachment 310649 [details, diff]
patch

What if we make S local in _python-distutils-ng_run_for_impl? That would make S behave consistently between src_compile and src_install.

That also allows us to eliminate the reset in python-distutils-ng_src_install.

See patch.
Comment 5 Krzysztof Pawlik (RETIRED) gentoo-dev 2012-05-03 00:06:00 UTC
(In reply to comment #4)
> Created attachment 310649 [details, diff] [details, diff]
> patch
> 
> What if we make S local in _python-distutils-ng_run_for_impl? That would
> make S behave consistently between src_compile and src_install.
> 
> That also allows us to eliminate the reset in
> python-distutils-ng_src_install.
> 
> See patch.

I think it's a cosmetic change, feel free to commit if you care enough and lets close this bug.
Comment 6 Mike Gilbert gentoo-dev 2012-05-03 00:32:15 UTC
It is not just cosmetic; without this change, S has a indeterminate value upon entry to src_install due to being manipulated by src_compile.

I have committed the change.