On Sun, 2008-11-02 at 10:52 +0530, Anil Gulecha wrote: > Hi, > > I think I'm running into a parsing bug with dh_installsmf with the > package postgresql-8.3.. the manifest seems fine and defines a section > as follows.. > > ---------snip manifest----- > <service_bundle type='manifest' name='postgresql-8.3'> > > <service > name='database/postgresql-8.3' > type='service' > version='1'> > ----------------- > > however, running: > # dh_installsmf --service postgresql-8.3 --manifest > debian/postgres.xml -ppostgresql-8.3 > Wrong manifest file (postgresql-8.3 != postgresql) at > /usr/bin/dh_installsmf line 129 > > Somehow $name is picked up as postgresql, and not as postgresql-8.3.. > so the regular expression below may be at fault.. can someone suggest > the fix.. the perl seems greek to me. > > --------------------- > > my ($found, $name, $group) = (0, "", ""); > while (<FD>) { > if (!$found && /<\s*service/) { > $found = 1; > next if (! > /<\s*service\s+.*name\s*=\s*['"]?(\S+)['"]?/); > ($group, $name) = ($1, $2) if > (/['"]?([\w\/]+)\/(\w+)['"]?/);
change this regexp to: /['"]?([\w\-\.\/]+)\/([\w\-\.]+)['"]?/ > last; > } > if ($found) { > next if (/^\s*$/); > next if (! /\s*name\s*=\s*(['"]?\S+['"]?)/); > ($group, $name) = ($1, $2) if > (/['"]?([\w\/]+)\/(\w+)['"]?/); and this to: /['"]?([\w\-\.\/]+)\/([\w\-\.]+)['"]?/ > last; > } > } > close FD; > die "Couldn't parse manifest file" if ($name eq "" || $group eq ""); > die "Wrong manifest file ($service != $name)" if ($service ne > $name); <----line 129 but may be we should find a better way to parse it.. > > Regards > Anil > _______________________________________________ > gnusol-devel mailing list > gnusol-devel@lists.sonic.net > http://lists.sonic.net/mailman/listinfo/gnusol-devel > _______________________________________________ gnusol-devel mailing list gnusol-devel@lists.sonic.net http://lists.sonic.net/mailman/listinfo/gnusol-devel