[Lsb-messages] /var/www/bzr/lsb/devel/libtodb2 r35: Tweak the constants extractor script a bit
Stew Benedict
stewb at linux-foundation.org
Tue Sep 11 15:14:02 UTC 2012
------------------------------------------------------------
revno: 35
committer: Stew Benedict <stewb at linux-foundation.org>
branch nick: libtodb2-gtk3
timestamp: Tue 2012-09-11 11:14:02 -0400
message:
Tweak the constants extractor script a bit
modified:
headertodb2/misc-scripts/constants-to-sql.pl
-------------- next part --------------
=== modified file 'headertodb2/misc-scripts/constants-to-sql.pl'
--- a/headertodb2/misc-scripts/constants-to-sql.pl 2012-08-19 11:54:46 +0000
+++ b/headertodb2/misc-scripts/constants-to-sql.pl 2012-09-11 15:14:02 +0000
@@ -24,11 +24,15 @@
print "set \@Hgid=(select HGid from HeaderGroup where HGname like '%" . $ipath . "');\n";
while (<CONSTANT>) {
- ($discard, $cname, $cvalue) = split;
- if ($cvalue != '') {
+ ($discard, $cname, @cvalue) = split;
+ # may have a comment in the value array
+ $cvalues = join(" ", @cvalue);
+ $cvalues =~ s{/\*.*?\*/}{}gs;
+ # if we have a non-zero value array proceed
+ if ($cvalues) {
print "insert into Constant (Cname, Cheadgroup) Values('" . $cname . "', \@Hgid);\n";
print "SET \@Cid=(SELECT last_insert_id());\n";
- print "insert into ArchConst (ACaid, ACcid, ACvalue, ACappearedin, ACorder) Values (1, \@Cid, '" . $cvalue . "', '" . $lsb_ver . "', " . $ctr . ");\n";
+ print "insert into ArchConst (ACaid, ACcid, ACvalue, ACappearedin, ACorder) Values (1, \@Cid, ". '"' . "$cvalues" . '"' . ", '" . $lsb_ver . "', " . $ctr . ");\n";
$ctr++;
}
}
More information about the lsb-messages
mailing list