Bug 175561 - [patch] [bsd.pkgng.mk] Enhancement to avoid pkgng "/bin/sh: Argument list too long"
Summary: [patch] [bsd.pkgng.mk] Enhancement to avoid pkgng "/bin/sh: Argument list too...
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Baptiste Daroussin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-25 14:40 UTC by Romain Tartière
Modified: 2014-11-13 22:57 UTC (History)
1 user (show)

See Also:


Attachments
bsd.pkgng.mk.diff (772 bytes, patch)
2013-01-25 14:40 UTC, Romain Tartière
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Romain Tartière freebsd_committer 2013-01-25 14:40:00 UTC
When trying to register a port with many dependencies (2141 ports in my case)
using pkgng, it fails with error:

===>   Registering installation for texlive-scheme-full-20110217,1
/bin/sh: Argument list too long
pkg: Invalid manifest format
*** [fake-pkg] Error code 74

Stop in /usr/ports/print/texlive-scheme-full.


The ${ACTUAL-PACKAGE-DEPENDS} generated snippet is too long and this result in
an invalid metadata file to be generated, thus making pkg fail a bit later.

In my case, ${_LIB_RUN_DEPENDS} is 204172 bytes long while the max commandline
length is 262144 bytes, there is therefore no much room for the rest of the
arguments.  However, the " " argument passed to `pkg query` prevent it from
failing if ${_LIB_RUN_DEPENDS} where empty, so the test to "protect" it against
that is useless.

Fix: The following patch helps avoiding this situation.
How-To-Repeat: 
One can get the TeXLive ports from
http://code.google.com/p/freebsd-texlive/

and try to install print/texlive-scheme-full with WITH_PKGNG=yes in
/etc/make.conf.
Comment 1 Edwin Groothuis freebsd_committer 2013-01-25 14:40:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

bsd.pkgng.mk is portmgr territory (via the GNATS Auto Assign Tool)
Comment 2 Romain Tartière freebsd_committer 2013-01-25 14:49:58 UTC
Responsible Changed
From-To: portmgr->bapt

I guess bapt will be interested in this.  Please reassign to somebody 
else if I am wrong. 

Thanks!
Comment 3 Carlo Strub freebsd_committer 2014-09-11 20:06:59 UTC
Is this PR still relevant?
Comment 4 Baptiste Daroussin freebsd_committer 2014-11-13 22:57:17 UTC
In theory it is but I never encounter the case when it can happen