From owner-freebsd-ports@freebsd.org Fri Apr 8 16:53:55 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A4C9B09818 for ; Fri, 8 Apr 2016 16:53:55 +0000 (UTC) (envelope-from marquis@roble.com) Received: from mx5.roble.com (mx5.roble.com [206.40.34.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx5.roble.com", Issuer "mx5.roble.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B9281DC2; Fri, 8 Apr 2016 16:53:55 +0000 (UTC) (envelope-from marquis@roble.com) Date: Fri, 8 Apr 2016 09:53:54 -0700 (PDT) From: Roger Marquis To: Matthew Seaman cc: freebsd-ports@freebsd.org Subject: Re: Deriving base port/package names In-Reply-To: <5707CCEE.6040301@FreeBSD.org> References: <51300.1460083670@server1.tristatelogic.com> <5707b24b.9143620a.1a679.ffffbb00SMTPIN_ADDED_MISSING@mx.google.com> <20160408144957.26ad363f@gumby.homeunix.com> <5707CCEE.6040301@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2016 16:53:55 -0000 Matthew Seaman wrote: > Put another way, if you're working with full pkgnames '%n-%v' it's always > the last '-' character that separates the name from the version. > $ pkgname='postgresql92-client-9.2.16' > $ echo ${pkgname%-*} > postgresql92-client > $ echo ${pkgname##*-} > 9.2.16 Those of us who prefer to avoid shell perlisms/bashisms (blessed by POSIX' IBM/RH/Oracle-dominated board or not) appreciate your inclusion of the equivalent sed regex. > $ echo $pkgname | sed -e 's,-[^-]*$,,' > postgresql92-client > $ echo $pkgname | sed -e 's,^.*-,,' > 9.2.16 > I think a proposal to rename large chunks of the ports tree to eliminate > hyphens and digits would certainly not receive a warm welcome. `pkg rquery -a %n | grep -- '-[0-9]' | wc -l` shows only 40 ports (of 25096). Doesn't seem like a whole lot or a difficult refactor but perhaps we're missing the use case of this particular group. Anyone know why these 40 ports are so named? Roger