David Mulder
47eae704ae
- Update to cifs-utils 6.8. + document more mount options + man pages now generated from RST files + add python-docutils build dependency + update keyring to check tarball signature - Add typo corrections, better doc and configure fixes from upstream + add 0001-docs-cleanup-rst-formating.patch + add 0002-mount.cifs.rst-document-new-no-handlecache-mount-opt.patch + add 0003-manpage-update-mount.cifs-manpage-with-info-about-rd.patch + add 0004-checkopts-add-python-script-to-cross-check-mount-opt.patch + add 0005-mount.cifs.rst-document-missing-options-correct-wron.patch + add 0006-cifs-utils-support-rst2man-3.patch + add 0007-checkopts-report-duplicated-options-in-man-page.patch + add 0008-mount.cifs.rst-more-cleanups.patch + add 0009-mount.cifs.rst-document-vers-3-mount-option.patch + add 0010-mount.cifs.rst-document-vers-3.02-mount-option.patch - Cleanup spec file * assume SUSE vendor and SLE >= 11 OBS-URL: https://build.opensuse.org/request/show/634977 OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/cifs-utils?expand=0&rev=153
68 lines
2.0 KiB
Diff
68 lines
2.0 KiB
Diff
From 77b028c11fee787d1235a08fd06c8b60d20eb9c0 Mon Sep 17 00:00:00 2001
|
|
From: Aurelien Aptel <aaptel@suse.com>
|
|
Date: Wed, 8 Aug 2018 11:38:15 +0200
|
|
Subject: [PATCH 07/10] checkopts: report duplicated options in man page
|
|
|
|
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
|
|
---
|
|
checkopts | 19 ++++++++++++++++---
|
|
1 file changed, 16 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/checkopts b/checkopts
|
|
index 26ca271..88e70b1 100755
|
|
--- a/checkopts
|
|
+++ b/checkopts
|
|
@@ -98,9 +98,12 @@ def extract_man_opts(fn):
|
|
state = STATE_BASE
|
|
rx = RX()
|
|
opts = {}
|
|
+ ln = 0
|
|
|
|
with open(fn) as f:
|
|
for s in f.readlines():
|
|
+ ln += 1
|
|
+
|
|
if state == STATE_EXIT:
|
|
break
|
|
|
|
@@ -113,7 +116,9 @@ def extract_man_opts(fn):
|
|
s = chomp(s)
|
|
names = extract_canonical_opts(s)
|
|
for name in names:
|
|
- opts[name] = s
|
|
+ if name not in opts:
|
|
+ opts[name] = []
|
|
+ opts[name].append({'ln':ln, 'fmt':s})
|
|
elif rx.search(r'^[A-Z]+', s):
|
|
state = STATE_EXIT
|
|
return opts
|
|
@@ -174,6 +179,14 @@ def main():
|
|
def opt_is_doc(o):
|
|
return o in manopts
|
|
|
|
+ print('DUPLICATED DOC OPTIONS')
|
|
+ print('======================')
|
|
+
|
|
+ for opt in sortedset(man_opts_set):
|
|
+ if len(manopts[opt]) > 1:
|
|
+ lines = ", ".join([str(x['ln']) for x in manopts[opt]])
|
|
+ print("OPTION %-20.20s (lines %s)"%(opt, lines))
|
|
+ print()
|
|
|
|
print('UNDOCUMENTED OPTIONS')
|
|
print('====================')
|
|
@@ -208,8 +221,8 @@ def main():
|
|
unex_opts = man_opts_set - kernel_opts_set
|
|
# group opts and their negations together
|
|
for opt in sortedset(unex_opts):
|
|
- fmt = manopts[opt]
|
|
- print('OPTION %s ("%s")' % (opt, fmt))
|
|
+ man = manopts[opt][0]
|
|
+ print('OPTION %s ("%s") line %d' % (opt, man['fmt'], man['ln']))
|
|
|
|
|
|
print('')
|
|
--
|
|
2.13.7
|
|
|