[master] af36bc5 make the copyright section optional again
Nils Goroll
nils.goroll at uplex.de
Thu Jun 16 12:07:08 CEST 2016
commit af36bc5d9694a410342f9fd8ca3424fdd9a7bd69
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sun Jun 12 21:10:38 2016 +0200
make the copyright section optional again
VDD discussion result:
- we want to make vcc files rst so that they can be read by rst
parsers (github) right from the repo
- vcc prototypes should be integrated into the rst
- scn wants to look after this
- we should make the copyright mandatory
- for the time being, we tolerate a missing copyright to make
existing vmod builds work again, the move to rst will change
the interface anyway
Closes #1978
diff --git a/lib/libvcc/vmodtool.py b/lib/libvcc/vmodtool.py
index 176f618..6275e13 100755
--- a/lib/libvcc/vmodtool.py
+++ b/lib/libvcc/vmodtool.py
@@ -648,6 +648,7 @@ class vcc(object):
self.pfx = outputprefix
self.contents = []
self.commit_files = []
+ self.copyright = None
def commit(self):
for i in self.commit_files:
@@ -658,11 +659,15 @@ class vcc(object):
a = a.split("\n$")
for i in range(len(a)):
b = a[i].split("\n", 1)
+ c = b[0].split(None, 1)
+
if i == 0:
- self.copyright = a[0]
+ if c[0] == "$Module":
+ s_module(c, b[1:], self)
+ else:
+ self.copyright = a[0]
continue
- c = b[0].split(None, 1)
- if i == 1:
+ if i == 1 and self.copyright != None:
if c[0] != "Module":
err("$Module must be first stanze")
if c[0] == "Module":
@@ -702,7 +707,8 @@ class vcc(object):
for i in self.contents:
i.rstfile(fo, man)
- self.rst_copyright(fo)
+ if self.copyright != None:
+ self.rst_copyright(fo)
fo.close()
More information about the varnish-commit
mailing list