Date: Wed, 12 Jul 2006 14:24:35 +0400 From: Sergey Matveychuk <sem@FreeBSD.org> To: Atanas <atanas@asd.aplus.net> Cc: freebsd-stable@freebsd.org Subject: Re: portupgrade bug: -M no longer works after v2.1.0 Message-ID: <44B4CDE3.60205@FreeBSD.org> In-Reply-To: <44B4A164.50003@asd.aplus.net> References: <44B40863.9060403@asd.aplus.net> <44B483B8.6000005@FreeBSD.org> <44B4A164.50003@asd.aplus.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Atanas wrote: > Sergey Matveychuk said the following on 7/11/2006 10:08 PM: >> Atanas wrote: >>> Recent portupgrade versions no longer obey the -M command line switch, >>> i.e. any optional arguments to be prepended to each make command. >>> >>> How to reproduce: >>> >>> # portinstall -M "APACHE_HARD_SERVER_LIMIT=1024" www/apache13 >> >> Everything work file. Use -m for getting what you want. >> > For www/apache13 the -m switch could give the same result as -M would, > but I'm not sure whether it's not just a coincidence. The -m switch was > supposed to serve a different purpose: > > -m > --make-args Specify arguments to append to each make(1) com- > mand line. > -M > --make-env Specify arguments to prepend to each make(1) com- > mand line. > > I tried testing another port where I used both: > > # portinstall -M 'WITH_SYSLOG_FACILITY=local5' -m '-DWITHOUT_IPV6' > mail/courier-imap > > With portupgrade-2.0.1_1,1 (the stock 6.1-RELEASE package) it worked. > With portupgrade-2.1.3.2,2 it failed (ignoring the -M part like for > www/apache13 before). > > Then I joined both in one -m switch: > > # portinstall -m 'WITH_SYSLOG_FACILITY=local5 -DWITHOUT_IPV6' > mail/courier-imap > > and the latest portupgrade-2.1.3.2,2 did it just fine. > > So, like you suggested, the -m switch seems to cover the functionality > that -M used to provide. I'm not sure however whether this "prepend to > append" conversion would work for all ports. But for these that I use it > appears to work, so I have no problem and will update my scripts to use > -m only. > > The no longer working (obsolete?) -M switch would need to be removed > from the man page though. Both -m and -M works fine but do different things. -m pass its argument as make file argument(s) and -M pass its argument as environment variable(s). You can't set make variable with environment variable. They are different! -M has never worked as you expected. You can test it with a command: %cd /usr/ports/www/apache13 %env APACHE_HARD_SERVER_LIMIT=1024 make against of % make APACHE_HARD_SERVER_LIMIT=1024 I think you confuse the two variables types. -- Dixi. Sem.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44B4CDE3.60205>