+UPSTREAM := $(shell head -1 debian/changelog | sed 's/.*(//;s/-.*?*).*//')
That works, but isn't a great fix. The '.?*' from the original, AFAICS, never should have been there, and .*?* is differently buggy... there shouldn't be a literal '?' in the string.
A better fix would be:
+UPSTREAM := $(shell head -1 debian/changelog | sed 's/.*(//;s/-[^)-]\+).*//')
+UPSTREAM := $(shell head -1 debian/changelog | sed 's/.*(/ /;s/-.* ?*).*// ')
That works, but isn't a great fix. The '.?*' from the original, AFAICS, never should have been there, and .*?* is differently buggy... there shouldn't be a literal '?' in the string.
A better fix would be:
+UPSTREAM := $(shell head -1 debian/changelog | sed 's/.*(/ /;s/-[^ )-]\+). *//')