From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJlms-00057C-FE for guix-patches@gnu.org; Sat, 10 Jun 2017 15:11:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJlmp-0007Yl-9H for guix-patches@gnu.org; Sat, 10 Jun 2017 15:11:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36686) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJlmo-0007YW-NW for guix-patches@gnu.org; Sat, 10 Jun 2017 15:11:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dJlmo-0000RL-Bf for guix-patches@gnu.org; Sat, 10 Jun 2017 15:11:02 -0400 Subject: bug#27250: [PATCH] gnu: crawl: Update to 0.20.0. Resent-Message-ID: References: <9de7211f-6ab6-7a7d-c2a9-ad65f95bbfe4@cock.li> <92906ae2.AEUAK6w8Z7gAAAAAAAAAAAPHYWoAAAACwQwAAAAAAAW9WABZNWdE@mailjet.com> <51e0342f.AEUAK9NcTPcAAAAAAAAAAAO0_XAAAAACwQwAAAAAAAW9WABZNmdv@mailjet.com> <20170607192017.GA6971@jasmine> <5e315f5d.AEAALOqVmtgAAAAAAAAAAAO0_XAAAAACwQwAAAAAAAW9WABZO9qA@mailjet.com> From: nee Message-ID: <0fd6dfc7-6863-6271-5661-f34e782247ba@cock.li> Date: Sat, 10 Jun 2017 21:10:45 +0200 MIME-Version: 1.0 In-Reply-To: <5e315f5d.AEAALOqVmtgAAAAAAAAAAAO0_XAAAAACwQwAAAAAAAW9WABZO9qA@mailjet.com> Content-Type: multipart/mixed; boundary="------------80700EFFA20D841FEF27EF16" Content-Language: en-GB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27250@debbugs.gnu.org This is a multi-part message in MIME format. --------------80700EFFA20D841FEF27EF16 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Am 10.06.2017 um 13:39 schrieb Arun Isaac: > > I'm unable to figure out the issue. This being just a simple update > patch, I think I'll just push it, and we'll see what happens at the > build servers. If there are subsequent problems, we'll fix it up > later. WDYT? > Okay, maybe the buildfarm can give us some hints about this problem. In the meantime there was another commit updating crawl to 0.20. I rebased my patch to it. Please use this one. I tested it with --rounds=2 and didn't run into any problems. I also rebuilt 0.19.5 again and noticed that the 0.20 release adds 2 new test cases. I haven't looked into them, but that could narrow down the location of the problem. --------------80700EFFA20D841FEF27EF16 Content-Type: text/x-patch; name="0001-gnu-crawl-Add-a-patch-to-fix-savegame-upgrades.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-gnu-crawl-Add-a-patch-to-fix-savegame-upgrades.patch" >From 5954d907008c07a06bdbfb129383eaf7813ea358 Mon Sep 17 00:00:00 2001 From: nee Date: Sat, 10 Jun 2017 20:27:58 +0200 Subject: [PATCH] gnu: crawl: Add a patch to fix savegame upgrades. * gnu/packages/games.scm (crawl)[source]: Add a patch to fix savegame upgrades. * gnu/packages/patches/crawl-upgrade-saves.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patch. --- gnu/local.mk | 1 + gnu/packages/games.scm | 3 +- gnu/packages/patches/crawl-upgrade-saves.patch | 83 ++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/crawl-upgrade-saves.patch diff --git a/gnu/local.mk b/gnu/local.mk index 686c3c639..ddf05c706 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -550,6 +550,7 @@ dist_patch_DATA = \ %D%/packages/patches/cpufrequtils-fix-aclocal.patch \ %D%/packages/patches/cracklib-CVE-2016-6318.patch \ %D%/packages/patches/cracklib-fix-buffer-overflow.patch \ + %D%/packages/patches/crawl-upgrade-saves.patch \ %D%/packages/patches/crda-optional-gcrypt.patch \ %D%/packages/patches/crossmap-allow-system-pysam.patch \ %D%/packages/patches/csound-header-ordering.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index a76ab1ddc..4a5b94ab7 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -4049,7 +4049,8 @@ fish. The whole game is accompanied by quiet, comforting music.") version "-nodeps.tar.xz"))) (sha256 (base32 - "0127dgldij2h4m7cf32yy9ndv4vcz03g4km71lmxrsi5mw7ljgpd")))) + "0127dgldij2h4m7cf32yy9ndv4vcz03g4km71lmxrsi5mw7ljgpd")) + (patches (search-patches "crawl-upgrade-saves.patch")))) (build-system gnu-build-system) (inputs `(("lua51" ,lua-5.1) diff --git a/gnu/packages/patches/crawl-upgrade-saves.patch b/gnu/packages/patches/crawl-upgrade-saves.patch new file mode 100644 index 000000000..301942dc3 --- /dev/null +++ b/gnu/packages/patches/crawl-upgrade-saves.patch @@ -0,0 +1,83 @@ +Store the crawl version in the textdatabases in SAVEDIR and +upgrade the databases when the crawl version changes. + +By default crawl checks for a mtime difference on files in DATADIR to see if an +upgrade is required, but guix nulls all file dates, +and crawl would never upgrade saves. + +--- a/source/database.cc 2016-05-31 09:56:08.000000000 +0200 ++++ a/source/database.cc 2017-06-05 03:00:19.270632107 +0200 +@@ -25,6 +25,7 @@ + #include "syscalls.h" + #include "threads.h" + #include "unicode.h" ++#include "version.h" + + // TextDB handles dependency checking the db vs text files, creating the + // db, loading, and destroying the DB. +@@ -55,6 +56,7 @@ + vector _input_files; + DBM* _db; + string timestamp; ++ string version; + TextDB *_parent; + const char* lang() { return _parent ? Options.lang_name : 0; } + public: +@@ -165,7 +167,7 @@ + + TextDB::TextDB(const char* db_name, const char* dir, ...) + : _db_name(db_name), _directory(dir), +- _db(nullptr), timestamp(""), _parent(0), translation(0) ++ _db(nullptr), timestamp(""), version(""), _parent(0), translation(0) + { + va_list args; + va_start(args, dir); +@@ -187,7 +189,7 @@ + : _db_name(parent->_db_name), + _directory(parent->_directory + Options.lang_name + "/"), + _input_files(parent->_input_files), // FIXME: pointless copy +- _db(nullptr), timestamp(""), _parent(parent), translation(nullptr) ++ _db(nullptr), timestamp(""), version(""), _parent(parent), translation(nullptr) + { + } + +@@ -202,6 +204,9 @@ + return false; + + timestamp = _query_database(*this, "TIMESTAMP", false, false, true); ++ version = _query_database(*this, "VERSION", false, false, true); ++ if (version.empty()) ++ return false; + if (timestamp.empty()) + return false; + +@@ -245,6 +250,9 @@ + string ts; + bool no_files = true; + ++ if (string(Version::Long) != version) ++ return true; ++ + for (const string &file : _input_files) + { + string full_input_path = _directory + file; +@@ -261,7 +269,7 @@ + ts += buf; + } + +- if (no_files && timestamp.empty()) ++ if (no_files && timestamp.empty() && version.empty()) + { + // No point in empty databases, although for simplicity keep ones + // for disappeared translations for now. +@@ -321,7 +329,10 @@ + _store_text_db(full_input_path, _db); + } + } ++ ++ string current_version = string(Version::Long); + _add_entry(_db, "TIMESTAMP", ts); ++ _add_entry(_db, "VERSION", current_version); + + dbm_close(_db); + _db = 0; -- 2.13.1 --------------80700EFFA20D841FEF27EF16--