Bug 221024

Summary: Regression: patsubst causes warnings with empty '?' pattern
Product: [Fedora] Fedora Reporter: Enrico Scholz <rh-bugzilla>
Component: m4Assignee: Miloslav Trmač <mitr>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6Keywords: Regression
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.4.5-4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-12 23:17:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Enrico Scholz 2006-12-30 13:58:27 UTC
Description of problem:

Recent 'm4' creates a warning for patsubst expressions with the '?' 
pattern when result is empty

| $ echo 'patsubst(config.h,\([^:]*/\)?.*,\1)' | m4 -E ; echo $?
| stdin:1: m4: Warning: sub-expression 1 not present
| 1
| $

With 'm4-1.4.4' from FC-5, things are fine

| $ echo 'patsubst(config.h,\([^:]*/\)?.*,\1)' | m4 -E ; echo $?
|
| 0
| $


This causes real trouble when building old software which is using
automake-1.4. There, AM_CONFIG_HEADER() contains the pattern

| <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,                

and will trigger an error on e.g.

| AM_CONFIG_HEADER(config.h)


Version-Release number of selected component (if applicable):

m4-1.4.5-3

Comment 1 Miloslav Trmač 2007-01-05 04:43:07 UTC
Again, thanks for the report.

Comment 2 Fedora Update System 2007-01-05 17:00:51 UTC
m4-1.4.5-4 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 3 Fedora Update System 2007-01-12 19:37:17 UTC
m4-1.4.5-4 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.