Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Aug 2009 19:43:46 +0100
From:      Bruce Simpson <bms@incunabulum.net>
To:        ruby@FreeBSD.org, Akinori MUSHA <knu@iDaemons.org>,  Sergey Matveychuk <sem@FreeBSD.org>
Subject:   portupgrade not passing BATCH? [Fwd: Re: ports/mail/nullmailer: nudge re BATCH]
Message-ID:  <4A9C19E2.2090200@incunabulum.net>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040500000601030903010103
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi guys,

I noticed nullmailer's deinstall script was prompting for input, during 
a portupgrade -a.

Greg looked at the issue and found that portupgrade wasn't even passing 
BATCH in the environment, during deinstallation. Are you already aware 
of the issue? Do any patches exist?

thanks,
BMS

--------------040500000601030903010103
Content-Type: message/rfc822;
	name="Re: ports/mail/nullmailer: nudge re BATCH.eml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
	filename="Re: ports/mail/nullmailer: nudge re BATCH.eml"

Received: from compute1.internal (compute1.internal [10.202.2.41])
	by store75m.internal (Cyrus v2.3.14-fmsvn20249-7d77aea6) with LMTPA;
	Mon, 31 Aug 2009 14:38:15 -0400
X-Sieve: CMU Sieve 2.3
X-Spam-score: 0.0
X-Spam-source: IP='72.32.213.11', Host='113901-app1.sourcehosting.net',
	Country='US', FromHeader='org', MailFrom='org'
X-Spam-charsets: plain='ISO-8859-1'
X-Delivered-to: bms@incunabulum.net
Received: from mx1.messagingengine.com ([10.202.2.200])
	by compute1.internal (LMTPProxy); Mon, 31 Aug 2009 14:38:15 -0400
Received: from mail1.sourcehosting.net (113901-app1.sourcehosting.net
	[72.32.213.11])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.messagingengine.com (Postfix) with ESMTPS id 50832123
	for <bms@incunabulum.net>; Mon, 31 Aug 2009 14:38:14 -0400 (EDT)
Received: from 68-189-245-235.dhcp.oxfr.ma.charter.com ([68.189.245.235]
	helo=cube.entropy.prv)
	by mail1.sourcehosting.net with esmtp (Exim 4.69 (FreeBSD))
	(envelope-from <glarkin@FreeBSD.org>) id 1MiBlW-0000YG-8Q
	for bms@incunabulum.net; Mon, 31 Aug 2009 14:38:11 -0400
Received: from [127.0.0.1] (fireball.entropy.prv [192.168.1.12])
	by cube.entropy.prv (Postfix) with ESMTP id 5735B33E753B
	for <bms@incunabulum.net>; Mon, 31 Aug 2009 14:38:06 -0400 (EDT)
Message-ID: <4A9C188B.3090601@FreeBSD.org>
Date: Mon, 31 Aug 2009 14:38:03 -0400
From: Greg Larkin <glarkin@FreeBSD.org>
Reply-To: glarkin@FreeBSD.org
Organization: The FreeBSD Project
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: Bruce Simpson <bms@incunabulum.net>
Subject: Re: ports/mail/nullmailer: nudge re BATCH
References: <4A965D25.3040409@incunabulum.net> <4A982562.2050503@FreeBSD.org>
	<4A98FFF3.6060608@incunabulum.net>
In-Reply-To: <4A98FFF3.6060608@incunabulum.net>
X-Enigmail-Version: 0.96.0
OpenPGP: id=1C940290
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Remote-Spam-Score: -0.4 (/)
X-Truedomain-DKIM: None
X-Truedomain: Neutral

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bruce Simpson wrote:
> Greg Larkin wrote:
>> I just tried "make BATCH=yes install clean", and I was not prompted for
>> any input.  Can you send me the command that you're using to install the
>> port so I can try to reproduce the problem here?
>>   
> 
> If I have nullmailer installed on a system, and I do 'portupgrade -a
> --batch', then during the deinstall step, the pkg-deinstall script seems
> to prompt for input even though portupgrade has set BATCH=yes in the
> environment.
> 
> cheers,
> BMS

Hi Bruce,

Thanks for the clarification on that.  I haven't tried using portupgrade
in batch mode much, but looking at its source code, it turns out that
this is a bug in portupgrade itself.

For some reason, the --batch flag only sets BATCH=yes for port
installation.  When it calls pkg_deinstall, it does not set the
variable.  You can see this in lines 1967->1974 of the portupgrade
script (version 2.4.6,2).

I would create a patch for the script and open a PR against it.  It
should be pretty easy for the maintainer to verify that feature and
commit it, unless there is some other reason that he has chosen not to
implement it that way.

Best regards,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/           - The Power To Serve
http://www.sourcehosting.net/     - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFKnBiL0sRouByUApARAgKNAJ9zxk+BIfEWEwKy1oEtXa0aSC7vZgCeIvSl
KP7jjepGoiK/rRwKERXg4/Q=
=lwAC
-----END PGP SIGNATURE-----


--------------040500000601030903010103--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A9C19E2.2090200>