[Pkg-libvirt-commits] [libguestfs] 09/19: builder: accept also '_' in group names
Hilko Bengen
bengen at moszumanska.debian.org
Wed Feb 26 08:45:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 4c5a6afc848b556999fee1c0ebd246496cdb023b
Author: Pino Toscano <ptoscano at redhat.com>
Date: Wed Feb 19 16:40:00 2014 +0100
builder: accept also '_' in group names
---
builder/index-scan.l | 2 +-
builder/index-validate.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/builder/index-scan.l b/builder/index-scan.l
index b120590..832ea51 100644
--- a/builder/index-scan.l
+++ b/builder/index-scan.l
@@ -52,7 +52,7 @@ extern void yyerror (const char *);
^\n { return EMPTY_LINE; }
/* [...] marks beginning of a section. */
-^"["[-A-Za-z0-9.]+"]"\n {
+^"["[-A-Za-z0-9._]+"]"\n {
yylval.str = strndup (yytext+1, yyleng-3);
return SECTION_HEADER;
}
diff --git a/builder/index-validate.c b/builder/index-validate.c
index 26abaa8..7f02ffb 100644
--- a/builder/index-validate.c
+++ b/builder/index-validate.c
@@ -128,6 +128,14 @@ main (int argc, char *argv[])
int seen_sig = 0;
struct field *fields;
+ if (compat_1_24_0) {
+ if (strchr (sections->name, '_')) {
+ fprintf (stderr, _("%s: %s: section [%s] has invalid characters which will not work with virt-builder 1.24.0\n"),
+ program_name, input, sections->name);
+ exit (EXIT_FAILURE);
+ }
+ }
+
for (fields = sections->fields; fields != NULL; fields = fields->next) {
if (compat_1_24_0) {
if (strchr (fields->key, '[') ||
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list