From owner-freebsd-pkg@freebsd.org Mon Apr 2 01:34:47 2018 Return-Path: Delivered-To: freebsd-pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73BFCF53B78 for ; Mon, 2 Apr 2018 01:34:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E81EE86F06 for ; Mon, 2 Apr 2018 01:34:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id A4990F53B71; Mon, 2 Apr 2018 01:34:46 +0000 (UTC) Delivered-To: pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80106F53B6F for ; Mon, 2 Apr 2018 01:34:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A7FD86EFF for ; Mon, 2 Apr 2018 01:34:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 2CAC82F291 for ; Mon, 2 Apr 2018 01:34:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w321YjYi030144 for ; Mon, 2 Apr 2018 01:34:45 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w321YjVP030143 for pkg@FreeBSD.org; Mon, 2 Apr 2018 01:34:45 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: maintainer-feedback requested: [Bug 227193] ports-mgmt/pkg: pkg updating only recognizes exact string matches for port origins Date: Mon, 02 Apr 2018 01:34:45 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pkg@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2018 01:34:47 -0000 Bugzilla Automation has asked pkg@FreeBSD.org for maintainer-feedback: Bug 227193: ports-mgmt/pkg: pkg updating only recognizes exact string match= es for port origins https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227193 --- Description --- The Porter's Handbook, section 11.2.1, contains a passage: Note: It is recommended that the AFFECTS line contains a glob matching all the po= rts affected by the entry so that automated tools can parse it as easily as possible. If an update concerns all the existing BIND 9 versions the AFFECTS content must be users of dns/bind9*, it must not be users of BIND 9 However, empirical observations (ref., e.g., the email thread that starts at ) and inspection= of the code in pkg-1.10.5's src/updating.c: tmp =3D NULL; if (found =3D=3D 0) { if (strstr(line, "AFFECTS") !=3D NULL) { SLIST_FOREACH(port, &origins, next) { if (caseinsensitive) { if ((tmp =3D strcasestr(line, port->origin)) !=3D NULL) { break; } } else { if ((tmp =3D strstr(line, port->origin)) !=3D NULL) { break; } } } if (tmp !=3D NULL) { if ((date !=3D NULL) && strncmp(dateline, date, 8) < 0) { continue; } printf("%s%s",dateline, line); found =3D 1; } } } else { printf("%s",line); } shows that "pkg updating" cannot make constructive use of "globs" -- and if they are specified in ports/UPDATING, "pkg updating" will fail to match such entries to any installed port, and will thus fail to display the entries for affected ports. That said, another way to address the inconsistency (between the Porter's Handbook recommendation and the code in updating.c) would be to change the recommendation (and corresponding practice) to only use port origin specifi= ers that "pkg updating" will recognize: I am not in a position to make a claim = as to which approach makes more sense (either now or in the future). (Indeed: it may well be that it may be better to use regular expressions, rather than globs -- in which case code, documentation, and practice would = each need to change. But that's not my call.)