From owner-freebsd-ports-bugs@freebsd.org Mon Apr 2 01:34:46 2018 Return-Path: Delivered-To: freebsd-ports-bugs@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 AB9C0F53B73 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 43DF086F00 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 6E2712F292 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 w321Yjog030149 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 w321YjoD030147 for freebsd-ports-bugs@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 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [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-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None 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: david@catwhisker.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: pkg@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2018 01:34:47 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227193 Bug ID: 227193 Summary: ports-mgmt/pkg: pkg updating only recognizes exact string matches for port origins Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: pkg@FreeBSD.org Reporter: david@catwhisker.org CC: dhw@FreeBSD.org Assignee: pkg@FreeBSD.org Flags: maintainer-feedback?(pkg@FreeBSD.org) 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(lin= e, 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(dat= eline, 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.) --=20 You are receiving this mail because: You are the assignee for the bug.=