From nobody Sun Nov 27 22:53:34 2022 X-Original-To: ports-bugs@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 4NL3mb2gKYz4j55Y for ; Sun, 27 Nov 2022 22:53:35 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NL3mb0971z3lDb for ; Sun, 27 Nov 2022 22:53:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669589615; 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; bh=os4656wqYBiCgSmlbElsRnZ/mB5qE4JkYtruoIxv+GU=; b=jupOVLIoLy84BoChixCqIIIXcTLaQ2ngE1LGsDBJogJ3IDLMSe3YAZgCEa5qLzFJKn5u11 KScS0ZORQqzFpU68E4gZYcGwoojSG2I/sZvqBVerFXaH6vqIYAp744FG8ypa1mvGkdc6Ak NmikIlrGLtHObdy7rzbRJZ5DE8K43ulSWry8o4bYYYVr3Y8Gh3rTH0kAf21WGrsC3RCkjp N/UO+5klkvZaZ/tunAQgOToESHFg568mc/C1D5l0GCxmYGJ1A1CBWggAjmrHeR9UkpaL7T a3moubbgPLcqjJJ6SPnlBEeYlTuGvmJEKAPuKDbyOimyXvh4tALqJZw5GnPT0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669589615; a=rsa-sha256; cv=none; b=Y6k2w61OfPHppmdWcrvgPGOPDctzJftMPgOfvWQ54ZnzGPxtkViYwEPT4VUIZfeW+/4aav xjVEQAhxdOG9peDzvX/J3SFbvEdsiFmPdVV39kCWTHuFOViJFhIm9WsQ2T4mIfRKulLmq6 ufAUmMRr33abjUBWk9VQ+ggYJ4F77fb5unMUU2MOPKnO4gLg2iuya31kFc5nd5EOLhF9mp bAV+HknU/YFLC8t0ox3o3r30Wbg/NYMC9+tAnfivLXaiYY0BfXy6/obR+hdAU3sthDFbGf JRvQ3g2k4Scu0rcFYvy4VxjDWwIR8cXMd6VtvInWGEiuXgJyFq1Bx5W50rfX1w== 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 4NL3mZ6KNtzGCy for ; Sun, 27 Nov 2022 22:53:34 +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 2ARMrY31009906 for ; Sun, 27 Nov 2022 22:53:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2ARMrY8p009905 for ports-bugs@FreeBSD.org; Sun, 27 Nov 2022 22:53:34 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: ports-bugs@FreeBSD.org Subject: [Bug 268024] .hooks/pre-commit.d/check_portepoch broken on lines affecting PORTEPOCH comments Date: Sun, 27 Nov 2022 22:53:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch, regression X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: mandree@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: portmgr@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created 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 List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268024 Bug ID: 268024 Summary: .hooks/pre-commit.d/check_portepoch broken on lines affecting PORTEPOCH comments Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Keywords: patch, regression Severity: Affects Many People Priority: --- Component: Ports Framework Assignee: portmgr@FreeBSD.org Reporter: mandree@FreeBSD.org CC: portmgr@FreeBSD.org, ports-bugs@FreeBSD.org Attachment #238381 maintainer-approval?(portmgr@FreeBSD.org) Flags: CC: portmgr@FreeBSD.org Created attachment 238381 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D238381&action= =3Dedit fix proposal for check_portepoch to fix various issues with it I was editing dns/dnsmasq-devel 2.88rc3, to upgrade to rc5, and removed a PORTEPOCH comment. This tripped up check_portepoch, which cannot cope with a situation that git renders PORTEPOCH diffs that do not relate to ^PORTEPOCH= =3D23 lines, and it printed=20 [pre-commit] dropped PORTEPOCH in dns/dnsmasq-devel/Makefile So, because I was editing PORTEPOCH comments, git was emitting the lines, b= ut grep was not picking them up. Right. And then the first check for the exit 1 path was simplistic and just assumed "no new portepoch, we're broken". Untr= ue. To fix, only complain about an empty PORTEPOCH if we had one before. If both old and new are empty, we may be safe, so do not complain and do not error = out. Also note that GNU grep complains about the regexps, because it runs withou= t -E option, but the basic regex has \- (you never escape -) and \+ (which has reverse meaning, and you do not want to match multiple ^ anchors instead of matching the literal +), so fix that, too, and be stricter to only look at ^PORTEPOCH lines that have a =3D somewhere. --=20 You are receiving this mail because: You are on the CC list for the bug.=