Bug 127203

Summary: shell commands not working properly in specfiles
Product: [Fedora] Fedora Reporter: Andrea Santilli <sacntct>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-07-04 00:05:54 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 Andrea Santilli 2004-07-03 23:12:57 UTC
Description of problem:
shell commands seem to not work properly in specfiles.

In bash if you do:
echo 1.4.2 | sed 's/.*\.//'
it will correctly reply:
2

but in a specfile, if you do:
%define minor %(echo 1.4.2 | sed 's/.*\.//')
it returns an empty string.

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

How reproducible:
Always

Steps to Reproduce:
1. write a specfile
2. run a shell command containing an operation on regular expressions
while defining a macro
3. it returns the wrong value
  
Actual results:
on some operations it returns the wrong value

Expected results:
to work properly

Additional info:

Comment 1 Jeff Johnson 2004-07-04 00:05:54 UTC
%define minor %(echo 1.4.2 | sed 's/.*\\.//')