Need help on tcl and mpkg (was Re: port mpkg and variants: failure)

Blair Zajac blair at orcaware.com
Sat Dec 15 21:11:46 PST 2012


On 12/8/12 8:14 AM, Jeremy Lavergne wrote:
>> "port mpkg" should package a port and all its dependencies, with the variants you specify. So if you "sudo port mpkg foo +bash_completion +dbus +doc +hdri +huge +icu +jbig +jpeg2 +nls +openldap +openssl +pear +perl5_12 +pcre +postgresql92 +python +python27 +svn +ssl +tools +ucs4" it should package up that port and its dependencies with those variants. If that works, then I guess the bug is that mpkg doesn't read variants.conf? mpkg seems to be its own little world; there are several outstanding bugs affecting only mpkg.
>
> This is a bug I've experienced as well: the variants chosen actually change as it trickles down the tree. Something somewhere clobbers the set of variants.

I've been looking at Tcl code for two days now trying to figure out 
where the variants are getting clobbered or lost and cannot figure it 
out.  I'm dropping a lot of puts in the code and trying to trace the 
variable flow.  Also learning about tcl (upvars as variable references, 
wow).

Any help out would be greatly appreciated, a pointer on where to start 
or a fix itself ;)

I good example to try is to add +jbig to variants.conf and rebuild tiff 
(making sure to delete your old archive), then run 'port -v mpkg lcms2', 
this fails pretty quickly.  I'm sure there's other ports people have 
installed with different variants, but this one has only a few 
dependencies before it tries to build.


--->  Package for jpeg-8d is up-to-date
...
libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I. 
-I/opt/local-10.7-2012-08/--->  Computing dependencies for tiff
DEBUG: Searching for dependency: jpeg
DEBUG: Found Dependency: receipt exists for jpeg
DEBUG: Searching for dependency: zlib
DEBUG: Found Dependency: receipt exists for zlib
DEBUG: Executing org.macports.main (tiff)
DEBUG: changing euid/egid - current euid: 0 - current egid: 0
DEBUG: egid changed to: 501
DEBUG: euid changed to: 503
DEBUG: archivefetch phase started at Sat Dec 15 20:59:26 PST 2012
--->  Fetching archive for tiff
DEBUG: Executing org.macports.archivefetch (tiff)
DEBUG: euid/egid changed to: 0/0
DEBUG: chowned /opt/local-10.7-2012-08/var/macports/incoming to macports
DEBUG: euid/egid changed to: 503/501
--->  tiff-3.9.7_0.darwin_11.x86_64.tbz2 doesn't seem to exist in 
/opt/local-10.7-2012-08/var/macports/incoming/verified


The URL here should have +jbig in it.  It looks like it's getting the 
variant wrong pretty quickly, even before it tries to get the archive.

I've tried to have eval_variants() be called from 
portmpkg::make_one_package() but that doesn't seem to work.

Thanks,
Blair


More information about the macports-dev mailing list