From nobody Tue Jul 2 12:50:28 2024 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WD2nl4kkqz5QMsD for ; Tue, 02 Jul 2024 12:50:35 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WD2nl0Rjhz4rGD; Tue, 2 Jul 2024 12:50:34 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Authentication-Results: mx1.freebsd.org; none Received: from kalamity.joker.local (123-1-21-232.area1b.commufa.jp [123.1.21.232]) (authenticated bits=0) by www121.sakura.ne.jp (8.17.1/8.17.1/[SAKURA-WEB]/20201212) with ESMTPA id 462CoT8U043763; Tue, 2 Jul 2024 21:50:29 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dec.sakura.ne.jp; s=s2405; t=1719924629; bh=bo6KoalrhlaSLFp3LELKzzFFWQ58ktiPfQVSyM26BrY=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=DgnPKvxzXaOBjxp9O4zYfIpObff9bgL70ST9ViChWNGhRPordtV8KukB3NY35f1/G 3cS29wD5G1SX0GRE3wverdtXhiaAJTAHok7HEcJiqWO2RBGnCv2Bf+wP5QorkcVg5y B1uSftO3b8Rs4f1Sl2eHYnKNq7g+Cq8xh1QJ5k5g= Date: Tue, 2 Jul 2024 21:50:28 +0900 From: Tomoaki AOKI To: DutchDaemon - FreeBSD Forums Administrator Cc: ports@freebsd.org Subject: Re: Can `pkg prime-origins` be "trained" to pick up flavors? Message-Id: <20240702215028.c9038518cef1d323a8042c5a@dec.sakura.ne.jp> In-Reply-To: <1144fd28-c9d5-43be-b3ce-77a8e0051634@FreeBSD.org> References: <20240702022215.86f678352bf5d7c6bf3dea4d@dec.sakura.ne.jp> <748eaf90-6c2d-41e3-8334-88458c21b7c3@FreeBSD.org> <20240702064448.1072c2a31ba44ed483730d0b@dec.sakura.ne.jp> <20240702075204.2c10d58cb4402523a8af9732@dec.sakura.ne.jp> <1144fd28-c9d5-43be-b3ce-77a8e0051634@FreeBSD.org> Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports@freebsd.org Sender: owner-freebsd-ports@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP] X-Rspamd-Queue-Id: 4WD2nl0Rjhz4rGD On Tue, 2 Jul 2024 13:21:30 +0200 DutchDaemon - FreeBSD Forums Administrator wrote: > On 2-7-2024 00:52, Tomoaki AOKI wrote: > > Script below would work for you. > > for port in $( /usr/local/sbin/pkg prime-origins | sort -u ) > > do > > flavor=$( /usr/local/sbin/pkg info -A "${port}" | \ > > /usr/bin/grep "flavor" | /usr/bin/awk '{print $NF}' | \ > > /usr/bin/grep -v "default" ) > > [ "x${flavor}" = "x" ] && echo "${port}" || \ > > for flvr in ${flavor} > > do > > echo -n ${flvr} ; [ "x${flvr}" = "x" ] && echo "${port}" || \ > > echo "${port}@${flvr}" > > done > > done > > > I don't think I have anything multi-flavored anywhere, but good catch. > Thanks! Ah, sorry! Forgot to remove debug echo. echo -n ${flvr} ; [ "x${flvr}" = "x" ] && echo "${port}" || \ should be as below. [ "x${flvr}" = "x" ] && echo "${port}" || \ -- Tomoaki AOKI