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, ports-bugs, robak
Priority: --- Keywords: needs-patch
Version: LatestFlags: koobs: merge-quarterly?
Hardware: Any   
OS: Any   

Description Gerald Pfeifer freebsd_committer 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 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 2018-12-12 15:42:52 UTC
over to maintainer