chiark / gitweb /
keys/tripe-keys.in: Compare configuration files properly when updating.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 20 Jul 2014 13:53:18 +0000 (14:53 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 21 Jul 2014 00:27:21 +0000 (01:27 +0100)
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?

keys/tripe-keys.in

index 901e09b96155263c0c8b2783b88a037a6b361a80..db577b6266869da79a030b335f7478fb06cbf5ce 100644 (file)
@@ -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')