Bug 233951

Summary: Tools/scripts/bump-revision.sh fails to handle PORTREVISIONs with a comment
Product: Ports & Packages Reporter: Gerald Pfeifer <gerald>
Component: Ports FrameworkAssignee: Bartek Rutkowski <robak>
Status: Open ---    
Severity: Affects Some People CC: adamw, bugmeister, ports-bugs, robak
Priority: --- Keywords: needs-patch
Version: Latest   
Hardware: Any   
OS: Any   

Description Gerald Pfeifer freebsd_committer freebsd_triage 2018-12-12 03:44:10 UTC
Found the following way:

  # Tools/scripts/bump-revision.sh multimedia/x264
  ERROR: multimedia/x264 PORTREVISION value is not a number, unable to solve!

Looking at multimedia/x264/Makefile
  PORTREVISION?=  5 # 0 in libx264
it appears the problem is that there's "only" a space between the number
and the comment separator ('#'), where if it were a tab it'd just work.

Now we can update the port, and I plan on doing that, but it's probably
just a question of tweaking a regular expression in bump-revision.sh ?
Comment 1 Adam Weinberger freebsd_committer freebsd_triage 2018-12-12 14:46:44 UTC
Yeah, I suspect that line 63 of bump-revision.sh
  case `echo "$revision_str" | awk -F "\t+" '{ print $2 }'` in
could just as easily be
  case `echo "$revision_str" | awk '{ print $2 }'` in

I don't suspect there's much value in caring what sort of whitespace it is.
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2018-12-12 15:42:52 UTC
over to maintainer
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2024-09-30 07:30:27 UTC
^Triage: is this aging PR still relevant?
Comment 4 Gerald Pfeifer freebsd_committer freebsd_triage 2024-09-30 08:57:26 UTC
Yes, this still occurs (though not with this specific port) and is
still relevant if one wants to use this script across a ports tree.