[Rpm-maint] [rpm-software-management/rpm] Shell-like escaping support in %files (PR #1903)
Demi Marie Obenour
notifications at github.com
Fri Mar 18 09:18:23 UTC 2022
@DemiMarie commented on this pull request.
> @@ -665,6 +665,20 @@ void rpmUnescape(char *s)
*p = '\0';
}
+void rpmUnescapeQuotes(char *s)
+{
+ char *p, *q;
+ int esc = 0;
+ p = q = s;
+ while (*q != '\0') {
+ *p = *q++;
+ esc = (*p == '\\') && !esc && *q == '"';
How do you plan to handle these cases?
```
%files
'/foo'\''bar' # single quotes
'/foo'bar # partially quoted word
'/foo'* # mixture of quotes and globs
'/a \\ "\ ' # single quotes treat everything literally
# missing end quotes
'abc
"def
# backslash at end of line
a\
```
Some of those are just syntax errors, but at least RPM needs to report the error properly.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1903#discussion_r829819834
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/1903/review/914112600 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220318/f68a58df/attachment.html>
More information about the Rpm-maint
mailing list