Opened 8 years ago
Closed 8 years ago
#204 closed defect (fixed)
rpm popt alias (--last) apparent syntax error
Reported by: | Lewis Rosenthal | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | rpm | Version: | |
Severity: | low | Keywords: | |
Cc: |
Description
I really thought this was working, but testing it now, I get:
[c:\]rpm -qa --last %-sn, , substr(sh.exe,length()+2))}' : 1: %-sn, , substr(sh.exe,length()+2))}' : Syntax error: Unterminated quoted string
Versions:
gawk-4.0.0-2.oc00.pentium4
sed-4.2.1-2.oc00.pentium4
coreutils-8.25-3.oc00.pentium4
coreutils-common-8.25-3.oc00.pentium4
rpm-4.13.0-9.oc00.pentium4
rpm-libs-4.13.0-9.oc00.pentium4
rpm-python-4.13.0-9.oc00.pentium4
rpm-build-4.13.0-9.oc00.pentium4
(in case it's a failure of one of those).
I can reproduce under CMD, 4OS2, bash, and dash.
I've tried playing with the command line for the alias, but awk keeps barking at me because my escaping is lousy. Sorry I can't be of more help!
Change History (3)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
And just FYI, popen does NOT need sh -c
as it will do sh -c
on its own given a proper EMXSHELL setup or directory layout (see r1006). So if sh -c
were not there it would all work as expected, even with popen.
I confirm this and this in fact is related to fixes made within #143. As Yuri uses
sh -c
there to start commands it causes replacement of $0 and $1 in the ash call to arguments ofsh -c
which is totally wrong and breaks the command. Also other symbols disappear (like \ in front of s and n). As sh -c is used unconditionally now, this will never work. I'm now restoring original fork in RPM and this problem should go away once I'm done.