Bug 178242 - bsd.python.mk injection of @exec easy_install to PLIST creates inappropriate post-install scripts for pkgng
Summary: bsd.python.mk injection of @exec easy_install to PLIST creates inappropriate ...
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-29 22:40 UTC by Chris Dukes
Modified: 2014-06-03 19:12 UTC (History)
1 user (show)

See Also:


Attachments
bsd.python.mk.patch (719 bytes, patch)
2013-04-30 02:15 UTC, Chris Dukes
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dukes 2013-04-29 22:40:02 UTC
I found that when installing a pkgng package of net/py-ldap2 was installing an appropriate _ldap.so, but the post-install was then failing as easy_install does with the default setup.cfg for python-ldap.

This has further repercussions on any packaged python port that has a USE_PYDISTUTILS=easy_install that even if it's right, the install installs the files, then retrieves them via easy_install and installs them again.

Fix: 

Disable addition of @exec to plist
How-To-Repeat: (Assuming pkgng is already installed)
echo WITH_PKGNG=yes >> /etc/make.conf
mkdir /tmp/foo
cd /usr/ports/net/py-ldap2
make install
pkg create -o /tmp/foo net/py-ldap2
make deinstall
pkg add /tmp/foo/py27-ldap*.txz
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-04-29 22:40:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-python

bsd.python.mk is freebsd-python territory (via the GNATS Auto Assign 
Tool)
Comment 2 Chris Dukes 2013-04-30 02:15:33 UTC
And a patch that seems to fix the issue for pkgng.

For the old style packaging, it could probably stand to have the bit to 
generate the @exec in the plist removed as well.
Comment 3 Chris Dukes 2013-05-01 02:04:23 UTC
And the patch I submitted, while fixing py-ldap2, breaks other packages.

To properly handle pkg and pkgng packages of python modules will require 
the development and use of a tool similar to dh_python[23] from Debian.

But the first step to doing that will involve patching the python builds 
to differentiate between a site-packages (For things installed outside 
pkg and pkgng) and something like dist-packages (For things managed by 
pkg and pkgng).
Comment 4 Baptiste Daroussin freebsd_committer freebsd_triage 2013-05-30 15:16:32 UTC
Hi,

I don't know if that fixes the problem reported or not, but what is sure is
that the patched proposed is wrong :)

and this patch is a "cleaner" version to do with pkgng what
bsd.python.mktries to do with the pointed target. As I don't know how
easy_install
works, I can't say if that also fixes the problem spotted by the reported.

http://people.freebsd.org/~bapt/easy_install.diff

regards,
Bapt
Comment 5 Marcus von Appen freebsd_committer freebsd_triage 2013-11-30 22:14:53 UTC
State Changed
From-To: open->feedback

I am unable to reproduce that issue with an up-to-date ports tree and 
pkg (1.2.1). Does that issue still occur for you? If so, could you 
please provide the steps to reproduce along with the output? Thanks!
Comment 6 Marcus von Appen freebsd_committer freebsd_triage 2014-06-03 19:12:26 UTC
Closed due to missing feedback. If the issue still exists for you, please reopen this bug.