1 |
Donnie Berkholz yazmış: |
2 |
> On 22:19 Wed 23 Jan , Ali Polatel (hawking) wrote: |
3 |
> > hawking 08/01/23 22:19:05 |
4 |
> > |
5 |
> > Modified: distutils.eclass |
6 |
> > Log: |
7 |
> > Fixed ROOT usage for distutils_pkg_postinst failing when ROOT ends with slash |
8 |
> |
9 |
> > @@ -99,11 +99,14 @@ |
10 |
> > distutils_pkg_postinst() { |
11 |
> > PYTHON_MODNAME=${PYTHON_MODNAME:-${PN}} |
12 |
> > |
13 |
> > + # strip trailing slash |
14 |
> > + myroot="${ROOT%/}" |
15 |
> > + |
16 |
> > if has_version ">=dev-lang/python-2.3"; then |
17 |
> > python_version |
18 |
> > for pymod in ${PYTHON_MODNAME}; do |
19 |
> > - if [ -d "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}" ]; then |
20 |
> > - python_mod_optimize ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${pymod} |
21 |
> > + if [ -d "${myroot}/usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}" ]; then |
22 |
> > + python_mod_optimize ${myroot}/usr/$(get_libdir)/python${PYVER}/site-packages/${pymod} |
23 |
> > fi |
24 |
> > done |
25 |
> > fi |
26 |
> |
27 |
> Seems like this might be better fixed by properly handling ROOT in |
28 |
> python.eclass instead of hacking around it. |
29 |
> |
30 |
|
31 |
You're right. dev-zero has made some changes to these eclasses in python |
32 |
overlay[1] which I'll merge to the tree after some more testing. |
33 |
|
34 |
[1]: http://overlays.gentoo.org/proj/python/browser/overlays/testing/eclass |
35 |
|
36 |
-ali |