From owner-freebsd-questions@FreeBSD.ORG Tue Jun 12 14:29:55 2007 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A692816A47E for ; Tue, 12 Jun 2007 14:29:55 +0000 (UTC) (envelope-from hemi@puresimplicity.net) Received: from just.puresimplicity.net (just.puresimplicity.net [68.77.126.251]) by mx1.freebsd.org (Postfix) with ESMTP id 5416D13C484 for ; Tue, 12 Jun 2007 14:29:55 +0000 (UTC) (envelope-from hemi@puresimplicity.net) Received: from just.puresimplicity.net (localhost.puresimplicity.net [127.0.0.1]) by just.puresimplicity.net (8.13.8/8.13.6) with ESMTP id l5CETrjO037537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Jun 2007 09:29:53 -0500 (CDT) (envelope-from hemi@just.puresimplicity.net) Received: (from hemi@localhost) by just.puresimplicity.net (8.13.8/8.13.6/Submit) id l5CETq35037536; Tue, 12 Jun 2007 09:29:52 -0500 (CDT) (envelope-from hemi) Date: Tue, 12 Jun 2007 09:29:52 -0500 From: Josh Tolbert To: Alex Zbyslaw Message-ID: <20070612142952.GA37242@just.puresimplicity.net> References: <20070607204129.GA45269@just.puresimplicity.net> <466937C6.1010306@dial.pipex.com> <20070612034110.GA95034@just.puresimplicity.net> <466E7426.3060905@dial.pipex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <466E7426.3060905@dial.pipex.com> User-Agent: Mutt/1.4.2.1i X-Greylist: Sender is SPF-compliant, not delayed by milter-greylist-2.0.2 (just.puresimplicity.net [127.0.0.1]); Tue, 12 Jun 2007 09:29:53 -0500 (CDT) Cc: questions@freebsd.org Subject: Re: portupgrade -o strangeness... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2007 14:29:55 -0000 On Tue, Jun 12, 2007 at 11:23:34AM +0100, Alex Zbyslaw wrote: > It doesn't look like what I was suggesting is the issue so it's all > moot, but the example I can see: > > sudo portupgrade -fo devel/bison2 bison > > is different from what I was suggesting: > > sudo portupgrade -f -o devel/bison2 bison > > which deliberately split -f and -o. Your original version could reasonably > be expected to work, but I have seen software (even written some :-)) which > does not correctly parse flags when they are combined ("-fo") especially > when one of them also takes an argument. That's not what's happening here, > but my suggestion was always a shot in the dark. > > >Anyway, a PR has been filed and the response is, "it's a feature." I'm not > >sure how it's a feature, but it is. The example I was given looks like > >this: > > > >$ pkg_version -t 2.3_1 1.75_2,1 > >< > > > >I'm guessing it's just doing some odd string comparison instead of breaking > >the version number apart and handling it with weight on the major version > >number, etc. > > > > > I find it bizarre too, since I don't even understand *why* the version > numbers matter in that command line. You've said "upgrade using > devel/bison2" as the origin and it's upgrading using "devel/bison". I > could understand the version number bizarre-matching affecting *whether* > portupgrade chooses to upgrade (so requiring -f) but not that it fails > to honour the origin you've given. > > The pkg_version comparison is surely just wrong. The version numbers > look correct to me. Interestingly, if you drop the ,1 from the second > version, the answer is correct (on 5.4 anyway). > > $ pkg_version -t 2.3_1 1.75_2 > > > > Or add a comma to the first > > $ pkg_version -t 2.3_1,1 1.75_2,1 > > > > > which looks like a bug to me, but maybe there's something non-standard > about that version number. Blowed if I can see what; there are plenty > of examples like it in my installed packages. > > There's definitely a bug in something. > > Software, bah. > > --Alex > > PS Presumably deinstalling bison and installing bison2 worked OK as a > workaround? I didn't try separate options for -f and -o. I've always just ran single-letter options together and never had any issues. I'd be surprised if that were the problem. I ended up going back to portupgrade from portupgrade-devel and everything seemed to work fine. Thanks, Josh -- Josh Tolbert hemi@puresimplicity.net || http://www.puresimplicity.net/~hemi/ Security is mostly a superstition. It does not exist in nature, nor do the children of men as a whole experience it. Avoiding danger is no safer in the long run than outright exposure. Life is either a daring adventure, or nothing. -- Helen Keller