From nobody Thu Nov 10 17:13:53 2022 X-Original-To: questions@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 4N7T2Y0DtDz4dR63 for ; Thu, 10 Nov 2022 17:13:57 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N7T2X6gFFz3lQG; Thu, 10 Nov 2022 17:13:56 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668100436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=j70D5wje+wJ50vhtG+jzfa2SxRyzk6hofRf+NvhP/qQ=; b=UBW0s/xgSmIxVBPupQGsTCNiP4+yhTTpYykd7X2GPpMPrDns8g9EgNLUWxFRxa9AdmWfqm wI3aMqlFse7rTXqBcjgbu/N8ItXLpQfLuLhRE+vPQF7IyOJ3/lRDnRiLBBMVmFLxrahbiM 3ndWx6lUXjyTKi7MwRmm6hTrEShyj5YKh/xISojkEvby7Q94FJZiZxwS6u4gTxoLHGPsji ue9bkKT+arNOYVWrgfa02tc3LBehNsMDzFBXzzODS2VAEyUDg3GLMHZfQ9PTgUONIt9BYh YlA5fpobIL0jgf2FipqG8uz9ak4OJHmFQXiIbVtBw+lr+G5G83KktHYFLMlcrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668100436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=j70D5wje+wJ50vhtG+jzfa2SxRyzk6hofRf+NvhP/qQ=; b=wkxxUVrgHCLnFVvjEfBgPNyV3Z3joKWMWhwNgerFZu+q3wLZPs5orcCtLZk6ACLo7hO+U5 gC8ocS5KssD9FtVNiAm3izK304rArvQtPgvvlX8uz4/+X+PnR0+tQ1DtbXUeaspX6xRp+Q 6VNJjWWjbfa6XS3IQMB64A9aV6+BIPw0pMIHtlFFGWOU02Le99hCzS30kFRDkw1fDlQ+g4 e+9LiR0gPaV+rnNC5fo8P9mcLEearp7Y/Nh+IkQMQHyC6oOxQ0gXZVKA6QnaDfFWYbm+Hc NVlmyYC7+uVVOcr7OuCk3WAymb3uAj3EZvY0KC8W7sEoAYhhSsSKWJ1Azs+6zQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668100436; a=rsa-sha256; cv=none; b=OYybPf/h0dms8cCG2hLFiV0fcepaoopCgVqgITYToRdT5HvXpcbSb8vc+b5vtaFxGWh7wn ui2uUwJ+qTajtvZIpEquEeaAOWnFxhgsBbbGEOq+510CQCJtMScNQNBffrHfeWV8MAKQdN MPMp3Z8tvtiMgSOMzfYMf9GMnCITOQuETyu9zugrab7fbBlQYwdjEqx57ELStKrabTuKat qqcFKLlfGUOVoS6XKzG6fzrid5futODkQI0eybLCT9AoSsqY5mfybP88f2Bg5/3SwmaOow mk4WfcY/OhzTM5vnzwU9UTqkSRR7jZeVUaaqhSg8PrElJ6GJsNQfVqQeMgiLGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (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) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4N7T2X55w4zfBJ; Thu, 10 Nov 2022 17:13:56 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 556BD6C2E8; Thu, 10 Nov 2022 18:13:53 +0100 (CET) Date: Thu, 10 Nov 2022 18:13:53 +0100 From: Baptiste Daroussin To: Ian Smith Cc: questions@freebsd.org Subject: Re: Which repo will pkg(8) select? Message-ID: <20221110171353.qruvyay2skdob66h@aniel.nours.eu> References: <48BC01A7-465A-45F5-A34A-609A2105191C@nimnet.asn.au> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48BC01A7-465A-45F5-A34A-609A2105191C@nimnet.asn.au> X-ThisMailContainsUnwantedMimeParts: N On Fri, Nov 11, 2022 at 04:11:18AM +1100, Ian Smith wrote: > Hi crew, > > is there any way to have pkg reveal which repository it will select with the present configuration, without it having to actually connect with that repo? > > Specifically, bsdconfig(8) needs to know which /var/db/pkg/${something}.sqlite to check, where $something may be repo-FreeBSD or repo-FreeBSD_install_cdrom or some custom repo, likely from the default /etc/pkg/FreeBSD.conf or from (e.g) /usr/local/etc/pkg/repos/FreeBSD_install_cdrom.conf or other, or an overriding REPOS_DIR setting. > > I'd sooner not have to scan each of the $REPOS_DIR directories and then parse all *.conf files, emulating pkg(8)'s described selection algorithm, but I've found no suitable option in pkg-*(8) so far. > > Thanks, Ian pkg -vv should provide you the information you are looking for. Best regards, Bapr