GNOME Bugzilla – Bug 796011
Crash in ScanDirectory caused by overlooked use of renamed `dir` variable
Last modified: 2018-05-10 19:49:03 UTC
Created attachment 371906 [details] [review] fix for the bug 9292e0a renamed the first argument to `ScanDirectory` from `dir` to `scan_dir`, but one use of `dir` was not renamed. When this line gets hit, it causes gtk-doc to crash: html/ActUser.html:524: warning: no link for: "G-SIGNAL-RUN-LAST:CAPS" -> (Run Last). cp: cannot stat './libaccountsservice.pdf': No such file or directory make[4]: [Makefile:817: dist-hook] Error 1 (ignored) Traceback (most recent call last):
+ Trace 238607
sys.exit(rebase.run(options))
ScanDirectory(dir, options)
ScanDirectory(subdir, options)
onlinedir = ReadIndex(dir, entry)
for line in common.open_text(os.path.join(dir, file)):
a = os.fspath(a)
make[4]: *** [Makefile:821: dist-hook] Error 1 The fix is simple, just correct the variable name to `scan_dir`. Patch attached.
Note hitting this line got much easier in 1.28 because of https://git.gnome.org/browse/gtk-doc/commit/?id=b77d97bfe0186eb727604dbad565dc4dde0eb273 . Before that fix, at least accountsservice never actually hit this line, because the ReadDevhelp regex did not match so there was no `onlinedir`.
Thanks a lot. gtkdoc-rebase really needs some python tests :/ Contributions here would be very welcome.
I'm unfortunately a bit too overloaded to commit to anything like that ATM, sorry :/ just happened to be chatting with halfline when he ran into these and was able to see what was wrong. (FWIW, I like pytest for writing tests, it's an awesome framework. Its handling of test fixtures and parametrization is great.)