From nobody Wed Aug 27 21:45:21 2025 X-Original-To: pkg@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 4cBykV3N63z65jcT for ; Wed, 27 Aug 2025 21:45:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cBykV2yHVz3D54 for ; Wed, 27 Aug 2025 21:45:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756331122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CeTzV5e48YR8ACiRfYkbdF60M2t9fD5WlogK6l6g68E=; b=W3mjWFz56Cyw3MYvgYO/PdDd/urVcuh3WxffGmR+wNbQim9RoptrhoBQwa+V/NwSEjdfCk GA/u84YV8jIilUi+qAILy1vo4hlYEGkEyhcInq/osxPZo2LTXyC+aTUWoPwDf+1+MN25CB qQxZMcKGi0jSZ+c2BSYtkZwbz6yAuIZViUTlLhY/LuoLv+/0hMF4BYmTf62Ajz6wx48cr7 JIPj10Xnhxmsf78lCpSVMyAfrqm8x/l+oAXHlWqCqQ9GjCISTj97GC+yelRn2gjlEqyrrg dGrn+j3iznB9nUgqKviNMDex/jhMUZqYbsOXtiJsneLnsgdxhsWpesxgnWQlfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756331122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CeTzV5e48YR8ACiRfYkbdF60M2t9fD5WlogK6l6g68E=; b=UdNCE0JwMSKiX2z5ogBXDi0/4+/MwotjD4IIEhPtG/U0mRMpZQ6yllnzWr3xgCW2T/Px6G yaTIZ9BHISYGI395t2U0ZQMyWe+szEOoaKjuZIaE3vj5VodMGhWCItOETRmK9vP/0fe45j G9tubjrFLX2Yzq2FWksxvpW7xjHnZ+CEXh+sdNSIAiQEq28hljQu1pozjpAzk2Wzv2MnUT iKMURkdf9sdAFlpoFanVQ7my2fLeL7MGPp4IE2uEpiWAKxico57TRNjZ2hMpy5JU6EVY9H NH98FyOuIc9dWZYaHP8WutgEjqyNS+l6xtSf1pXTg5biiX13uU5XlsTLulw6Ug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1756331122; a=rsa-sha256; cv=none; b=wkldRJxJ1wQ0h9sHEHxRi2iRg6+JHBvu5WZofd5XzDOuO608CJqaa6e5eAe9lB4bttej6n 6R8z7LxY4fDv2ZJewQocIb0XhR5qyuBoOLZFkkSnAcHHNNvgrDULJ1SgxpVIL9vNRSSA4p b8dntWBp19VZVngy3DGFDUUcHl6BLy+IsooRDwBkEL8yyB+flVD7VuEzWVA6kpC/hFqQWM Ob1wp5/mmhwUoNANuyjGFOksXm2crkFzKLfkpKuHIqxNHuMCyp+IPyNNFKbeFMTz6vgivb AUsjAi+LpUqm4YQHRNTJTppozUe42zrh7CXCCX3UNRMwcgSf5nesYMyijsAO9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cBykV2Xk1zgmm for ; Wed, 27 Aug 2025 21:45:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 57RLjMIl007859 for ; Wed, 27 Aug 2025 21:45:22 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 57RLjMQi007858 for pkg@FreeBSD.org; Wed, 27 Aug 2025 21:45:22 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: [Bug 286510] pkgbase: make update-packages regressed after base be61deae0aa2 Date: Wed, 27 Aug 2025 21:45:21 +0000 X-Bugzilla-Reason: AssignedTo CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pkg@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Binary package management and package tools discussion List-Archive: https://lists.freebsd.org/archives/freebsd-pkg List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkg@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D286510 --- Comment #4 from commit-hook@FreeBSD.org --- A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D62947e5081616bff1e9623a0e4292e92b= 49c3910 commit 62947e5081616bff1e9623a0e4292e92b49c3910 Author: Isaac Freund AuthorDate: 2025-04-23 10:27:35 +0000 Commit: Ed Maste CommitDate: 2025-08-27 21:42:53 +0000 pkg: clarify argument parsing Currently pkg parses all arguments and subcommands in a single getopt_long() loop. This results in quite a bit of accidental complexity, especially around the -r option for the bootstrap and add subcommands. This also results in the undocumented behavior of all options understood by pkg(7) being accepted anywhere in the argument list regardless of their position. This contradicts the behavior of pkg(8) and I find it quite unexpected. This patch splits the argument parsing done by pkg(7) into two phases for global options and subcommand options. This gives behavior that matches pkg(8), accepting the subset of pkg(8) options supported by pkg(7) in the exact same positions that pkg(8) accepts them. This is however a somewhat breaking change, as options are no longer accepted by pkg(7) in places they are rejected by pkg(8). For example, `pkg -f bootstrap` no longer works, only `pkg bootstrap -f`. The original motivation for writing this patch was investigating support for --rootdir in pkg(7). Since pkg(8) uses -r as the short form for both --rootdir and --repository depending on the position, I decided that pkg(7) needed to be brought inline with pkg(8)'s argument parsing behavior to avoid confusion. This patch also gets rid of args_add_message (unused since 40b9f924b1) Relnotes: yes Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49977 (cherry picked from commit be61deae0aa2923bb9908fc5b37b35712603e622) pkg: suppress error on unknown options pkg(7) does not understand all the options that pkg(8) understands and should never log errors about unknown options that it will pass on to pkg(8) without touching. PR: 286510 Reviewed by: bapt Fixes: be61deae0aa2 ("pkg: clarify argument parsing") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50163 (cherry picked from commit 73ba568b1c35aabc1682540b5b4d5d77220c5468) usr.sbin/pkg/pkg.7 | 5 +- usr.sbin/pkg/pkg.c | 174 ++++++++++++++++++++++++++-----------------------= ---- 2 files changed, 87 insertions(+), 92 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug.=