Bug 159962 - [PATCH] Mk/bsd.python.mk: prevent polluting filesystem with easy_install
Summary: [PATCH] Mk/bsd.python.mk: prevent polluting filesystem with easy_install
Status: Closed FIXED
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: 2011-08-21 10:50 UTC by R.Mahmatkhanov
Modified: 2011-11-07 12:50 UTC (History)
0 users

See Also:


Attachments
file.diff (539 bytes, patch)
2011-08-21 10:50 UTC, R.Mahmatkhanov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description R.Mahmatkhanov 2011-08-21 10:50:05 UTC
I'm working on update to net-mgmt/py-snmp4 and i faced with interesting issue with easy_install. Right now we have -N switch in our PYEASYINSTALL_INSTALLARGS, that prevents checking for dependencies that set in distribution's setup.py with requires() calls. But the same thing should be applied to PYEASYINSTALL_UNINSTALLARGS, because the deps checking happens on this stage too and effectively polluting filesystem. See this buildlogs:

With current Mk/bsd.python.mk:
http://happy-nation.by.ru/ports/tb/8.2/py27-snmp4-4.1.16c-leaving-files-after-deinstall.log

With patched Mk.bsd.python.mk:
http://happy-nation.by.ru/ports/tb/8.2/py27-snmp4-4.1.16c.log

There is the patch to net-mgmt/py-snmp4 which let you reproduce the problem:
http://happy-nation.by.ru/ports/py-snmp4-4.1.16c.diff.txt

As you can see, at deinstall it fetches and installs pyasn1-0.0.13-py2.7.egg into PYTHON_SITELIBDIR (i checked this also in my live system - this file isn't created on build stage when requires() run, but on deinstall stage). 

Technically, we can avoid this on port level with two options:
1. Define PYEASYINSTALL_UNINSTALLARGS= -q -N in port's Makefile
2. Patch setup.py to eliminate all the requires() calls.
3. Define dependencies set in RUN_DEPENDS also in BUILD_DEPENDS,
so the port will find it on requires() checks, but this is wrong
logically - we actually need this dependency only on run-time. 

So, i'd prefer to apply this patch to bsd.python.mk

PS. We also may add "-H None" or "--allow-hosts=None" to prevent it download and install anything, as suggested in setuptools manual:
http://peak.telecommunity.com/DevCenter/EasyInstall

but this may be overkill.

Fix: Patch attached with submission follows:
Comment 1 Sunpoet Po-Chuan Hsieh freebsd_committer 2011-08-21 10:54:46 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-python

Over to maintainer(s).
Comment 2 Pav Lucistnik freebsd_committer 2011-11-07 12:39:27 UTC
State Changed
From-To: open->closed

Committed, thanks
Comment 3 dfilter service freebsd_committer 2011-11-07 12:41:07 UTC
pav         2011-11-07 12:40:53 UTC

  FreeBSD ports repository

  Modified files:
    Mk                   bsd.python.mk 
  Log:
  - Stop resolving dependencies on deinstall when juggling python eggs
  
  PR:             ports/159962
  Submitted by:   Ruslan Mahmatkhanov <cvs-src@yandex.ru>
  
  Revision  Changes    Path
  1.142     +2 -2      ports/Mk/bsd.python.mk
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"