From owner-freebsd-stable@FreeBSD.ORG Wed Jul 12 17:53:10 2006 Return-Path: X-Original-To: freebsd-stable@FreeBSD.org Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CE7116A4DD; Wed, 12 Jul 2006 17:53:10 +0000 (UTC) (envelope-from atanas@asd.aplus.net) Received: from pro20.abac.com (pro20.abac.com [66.226.64.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90CBB43D55; Wed, 12 Jul 2006 17:53:09 +0000 (GMT) (envelope-from atanas@asd.aplus.net) Received: from [216.55.129.5] (asd2.aplus.net [216.55.129.5]) (authenticated bits=0) by pro20.abac.com (8.13.6/8.13.6) with ESMTP id k6CHr6N5096564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Jul 2006 10:53:06 -0700 (PDT) (envelope-from atanas@asd.aplus.net) Message-ID: <44B5389D.9020808@asd.aplus.net> Date: Wed, 12 Jul 2006 10:59:57 -0700 From: Atanas User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060516) MIME-Version: 1.0 To: Sergey Matveychuk References: <44B40863.9060403@asd.aplus.net> <44B483B8.6000005@FreeBSD.org> <44B4A164.50003@asd.aplus.net> <44B4CDE3.60205@FreeBSD.org> In-Reply-To: <44B4CDE3.60205@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 1.47 (SPF_SOFTFAIL) Cc: freebsd-stable@FreeBSD.org Subject: Re: portupgrade bug: -M no longer works after v2.1.0 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2006 17:53:10 -0000 Sergey Matveychuk said the following on 7/12/06 3:24 AM: > 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! > Yes, I know that. That's why I quoted the man page in my previous post (see above). > -M has never worked as you expected. > I expected -M to work exactly as documented, like it has been doing so for years. > You can test it with a command: > %cd /usr/ports/www/apache13 > %env APACHE_HARD_SERVER_LIMIT=1024 make > Sure, the port build works: % cd /usr/ports/www/apache13 % env APACHE_HARD_SERVER_LIMIT=1024 make ===> src/os/unixcc -c -I../../os/unix -I../../include -I/usr/local/include -funsigned-char -O2 -fno-strict-aliasing -pipe -DDOCUMENT_LOCATION=\"/usr/local/www/data\" -DDEFAULT_PATH=\"/bin:/usr/bin:/usr/local/bin\" -DHARD_SERVER_LIMIT=1024 `../../apaci` os.c while portupgrade -M fails: % portinstall -M "APACHE_HARD_SERVER_LIMIT=1024" www/apache13 ===> src/os/unixcc -c -I../../os/unix -I../../include -I/usr/local/include -funsigned-char -O2 -fno-strict-aliasing -pipe -DDOCUMENT_LOCATION=\"/usr/local/www/data\" -DDEFAULT_PATH=\"/bin:/usr/bin:/usr/local/bin\" -DHARD_SERVER_LIMIT=512 `../../apaci` os.c > against of > % make APACHE_HARD_SERVER_LIMIT=1024 > This doesn't make much sense to me. Perhaps you meant: % make -DAPACHE_HARD_SERVER_LIMIT=1024 But I wouldn't expect this to succeed either: ===> src/os/unixcc -c -I../../os/unix -I../../include -I/usr/local/include -funsigned-char -O2 -fno-strict-aliasing -pipe -DDOCUMENT_LOCATION=\"/usr/local/www/data\" -DDEFAULT_PATH=\"/bin:/usr/bin:/usr/local/bin\" -DHARD_SERVER_LIMIT=512 `../../apaci` os.c Your suggestion however (to replace -M with -m) surprisingly worked: cc -c -I../../os/unix -I../../include -I/usr/local/include -funsigned-char -O2 -fno-strict-aliasing -pipe -DDOCUMENT_LOCATION=\"/usr/local/www/data\" -DDEFAULT_PATH=\"/bin:/usr/bin:/usr/local/bin\" -DHARD_SERVER_LIMIT=1024 `../../apaci` os.c And this is what's confusing. > I think you confuse the two variables types. > No, I think I know what these are for. But trying your suggestion to replace -M with -m and finding it to work (for some ports?), just threw some more fog into the case. Let's say it clear again - I have found that all recent versions of portupgrade (2.1.0+) fail to obey the -M switch and ignore any optional port parameters (i.e. arguments to prepend to each make command line) supplied there. Please, don't get me wrong. I'm not asking for help or for a workaround. I'm actually trying to help identifying a problem or regression. If this is not a bug, but a feature change, please have it documented. What the portupgrade(1) man page says about the -M switch is incorrect, as it no longer prepends any arguments specified to each make(1) command line. Regards, Atanas