From f56dbbc4f35e303ae79a24be8590ed79a335fd7c Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sun, 20 Jul 2014 14:53:18 +0100 Subject: [PATCH] keys/tripe-keys.in: Compare configuration files properly when updating. Organization: Straylight/Edgeware From: Mark Wooding 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- [mdw]