Bug 193811 - Uses/python.mk: PYDISTUTILS_EGGINFODIR got expanded into wrong dir because of staging
Summary: Uses/python.mk: PYDISTUTILS_EGGINFODIR got expanded into wrong dir because of...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Marcus von Appen
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2014-09-21 14:29 UTC by Gleb Popov
Modified: 2014-10-07 16:52 UTC (History)
2 users (show)

See Also:
mva: exp-run+


Attachments
Patch to fix the problem. (541 bytes, patch)
2014-09-21 14:29 UTC, Gleb Popov
no flags Details | Diff
Proper egginfo fix, needs an exp-run (596 bytes, patch)
2014-10-03 16:47 UTC, Marcus von Appen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gleb Popov freebsd_committer 2014-09-21 14:29:05 UTC
Created attachment 147526 [details]
Patch to fix the problem.

When i install my port (devel/tortisehg) into custom PREFIX, it fails on package registering phase because of wrong paths to egginfo files.

How to reproduce:
$ make -C /usr/ports/devel/tortoisehg PREFIX=/tmp/thg install clean

Attached patch fixes this. Relevant PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=116278
Comment 1 Marcus von Appen freebsd_committer freebsd_triage 2014-10-03 16:47:49 UTC
Created attachment 147938 [details]
Proper egginfo fix, needs an exp-run

Your attached patch seems to be wrong. We already set 

PYDISTUTILS_EGGINFODIR?=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}

Rather than PYDISTUTILS_EGGINFODIR, the replacement in

add-plist-egginfo:
... 
 ${ECHO_CMD} ${PYDISTUTILS_EGGINFODIR:S;^${STAGEDIR}${PYTHONBASE}/;;}/${egginfo}/$${f} >> ${TMPPLIST}; 

is wrong, since it assumes PREFIX == PYTHONBASE. This however is not true for a custom prefix, so the line should be changed to 

 ${ECHO_CMD} ${PYDISTUTILS_EGGINFODIR:S;^${STAGEDIR}${PREFIX}/;;}/${egginfo}/$${f} >> ${TMPPLIST};
Comment 2 Marcus von Appen freebsd_committer freebsd_triage 2014-10-03 16:49:51 UTC
portmgr@: please exp-run attachment 147938 [details].

6yearold: Can you give my patch another try? It works for me.
Comment 3 Marcus von Appen freebsd_committer freebsd_triage 2014-10-03 16:50:47 UTC
Added python@ and portmgr@ in CC
Comment 4 Gleb Popov freebsd_committer 2014-10-03 18:34:57 UTC
(In reply to Marcus von Appen from comment #2)
> portmgr@: please exp-run attachment 147938 [details].
> 
> 6yearold: Can you give my patch another try? It works for me.

Yup, seems to work. Now i'm able to install devel/tortoisehg into custom PREFIX.
Comment 5 Antoine Brodin freebsd_committer 2014-10-04 15:45:27 UTC
bugzilla seems buggy, this bug wasn't assigned to portmgr
Comment 6 Marcus von Appen freebsd_committer freebsd_triage 2014-10-05 06:33:46 UTC
(In reply to Antoine Brodin from comment #5)
> bugzilla seems buggy, this bug wasn't assigned to portmgr

No, I did not reassign it but added portmgr to the CC...
Comment 7 Antoine Brodin freebsd_committer 2014-10-05 17:49:50 UTC
no regression during the exp-run
Comment 8 commit-hook freebsd_committer 2014-10-07 16:51:29 UTC
A commit references this bug:

Author: mva
Date: Tue Oct  7 16:51:21 UTC 2014
New revision: 370366
URL: https://svnweb.freebsd.org/changeset/ports/370366

Log:
  - Do not blindly assume PREFIX to be the same as PYTHONBASE, when creating the
    egg-info entries for the plist

  PR:		193811
  Reported by:	6yearold@gmail.com
  Exp-run by:	antoine@
  With hat:	python@

Changes:
  head/Mk/Uses/python.mk
Comment 9 Marcus von Appen freebsd_committer freebsd_triage 2014-10-07 16:51:55 UTC
Committed in ports r370366. Thanks for reporting and testing!
Comment 10 Marcus von Appen freebsd_committer freebsd_triage 2014-10-07 16:52:37 UTC
And we also need to close it...