1 |
On Sat, Sep 14, 2013 at 6:38 PM, Michał Górny <mgorny@g.o> wrote: |
2 |
> Dnia 2013-09-14, o godz. 18:16:33 |
3 |
> Mike Gilbert <floppym@g.o> napisał(a): |
4 |
> |
5 |
>> On Fri, Sep 13, 2013 at 2:58 PM, Michał Górny <mgorny@g.o> wrote: |
6 |
>> > The sub-roots are no longer necessary since we're installing scripts to |
7 |
>> > per-impl directories initially. |
8 |
>> > --- |
9 |
>> > gx86/eclass/distutils-r1.eclass | 9 +++------ |
10 |
>> > 1 file changed, 3 insertions(+), 6 deletions(-) |
11 |
>> > |
12 |
>> > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass |
13 |
>> > index 7102c58..5fcb55e 100644 |
14 |
>> > --- a/gx86/eclass/distutils-r1.eclass |
15 |
>> > +++ b/gx86/eclass/distutils-r1.eclass |
16 |
>> > @@ -476,9 +476,7 @@ distutils-r1_python_install() { |
17 |
>> > addpredict "$(python_get_sitedir)" |
18 |
>> > addpredict /usr/lib/portage/pym |
19 |
>> > |
20 |
>> > - local root=${D}/_${EPYTHON} |
21 |
>> > - [[ ${DISTUTILS_SINGLE_IMPL} ]] && root=${D} |
22 |
>> > - flags+=( --root="${root}" ) |
23 |
>> > + flags+=( --root="${D}" ) |
24 |
>> > |
25 |
>> > if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then |
26 |
>> > local PYTHON_SCRIPTDIR |
27 |
>> > @@ -488,13 +486,12 @@ distutils-r1_python_install() { |
28 |
>> > |
29 |
>> > esetup.py install "${flags[@]}" "${@}" |
30 |
>> > |
31 |
>> > - if [[ -d ${root}$(python_get_sitedir)/tests ]]; then |
32 |
>> > + if [[ -d ${D}$(python_get_sitedir)/tests ]]; then |
33 |
>> > die "Package installs 'tests' package, file collisions likely." |
34 |
>> > fi |
35 |
>> > |
36 |
>> > if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then |
37 |
>> > - _distutils-r1_wrap_scripts "${root}" |
38 |
>> > - multibuild_merge_root "${root}" "${D}" |
39 |
>> > + _distutils-r1_wrap_scripts "${D}" |
40 |
>> > fi |
41 |
>> > } |
42 |
>> > |
43 |
>> > -- |
44 |
>> > 1.8.3.2 |
45 |
>> > |
46 |
>> |
47 |
>> I believe this patch causes a race condition which causes |
48 |
>> java-config's ebuild to fail. |
49 |
>> |
50 |
>> running install_data |
51 |
>> running install_egg_info |
52 |
>> Writing /tmp/portage/dev-java/java-config-2.2.0/image/usr/lib64/python2.7/site-packages/java_config- |
53 |
>> 2.2.0-py2.7.egg-info |
54 |
>> error: /tmp/portage/dev-java/java-config-2.2.0/image//usr/share/java-config-2/config/: |
55 |
>> File exists |
56 |
> |
57 |
> I love when people hack build systems and have no idea about writing |
58 |
> build systems... |
59 |
> |
60 |
> What are you suggesting? Finding all the broken stuff and fixing it, or |
61 |
> restoring sub-roots? |
62 |
> |
63 |
|
64 |
This is a well-used package which will be broken if we apply this |
65 |
patch. I'm not sure we can reliably identify this kind of problem, and |
66 |
fixing individual packages would be a bit of work in any case.. |
67 |
Keeping the sub-roots code in place seems like the safer course of |
68 |
action here. |
69 |
|
70 |
Also FYI, I looked into java-config's setup.py, and the code has an |
71 |
unchecked os.mkdir call followed by an open() call. The former will |
72 |
fail for multiple python implementations even with a serialized |
73 |
install, and the latter is racy. |