From: Mark Wooding Date: Sun, 20 Jul 2014 13:53:18 +0000 (+0100) Subject: keys/tripe-keys.in: Compare configuration files properly when updating. X-Git-Tag: 1.0.0pre16~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/commitdiff_plain/f56dbbc4f35e303ae79a24be8590ed79a335fd7c keys/tripe-keys.in: Compare configuration files properly when updating. For some stupid reason, Python's `filecmp' module defaults to comparing files using stat(2) rather then actually reading them. I must have been having a stupid day when I read the documentation because it didn't occur to me that it could be that deranged. But apparently it is, so we must set `thip, crinkle, and spoit' to `no'. It compares files too? --- diff --git a/keys/tripe-keys.in b/keys/tripe-keys.in index 901e09b9..db577b62 100644 --- a/keys/tripe-keys.in +++ b/keys/tripe-keys.in @@ -461,7 +461,7 @@ def cmd_update(args): OS.chdir(cwd) if OS.path.exists('repos'): OS.rename('repos', 'repos.old') OS.rename('tmp/repos', 'repos') - if not FC.cmp('tmp/tripe-keys.conf', 'tripe-keys.conf'): + if not FC.cmp('tmp/tripe-keys.conf', 'tripe-keys.conf', False): moan('configuration file changed: recommend running another update') OS.rename('tmp/tripe-keys.conf', 'tripe-keys.conf') rmtree('repos.old')