From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHqFw-0007wa-JL for guix-patches@gnu.org; Mon, 05 Jun 2017 07:33:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHqFq-0003YH-H9 for guix-patches@gnu.org; Mon, 05 Jun 2017 07:33:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:53881) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHqFq-0003YD-EA for guix-patches@gnu.org; Mon, 05 Jun 2017 07:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dHqFq-0002v7-5e for guix-patches@gnu.org; Mon, 05 Jun 2017 07:33:02 -0400 Subject: bug#27250: [PATCH] gnu: crawl: Update to 0.20.0. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHqEu-0007Ou-Hj for guix-patches@gnu.org; Mon, 05 Jun 2017 07:32:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHqEq-0002rf-Vm for guix-patches@gnu.org; Mon, 05 Jun 2017 07:32:04 -0400 Received: from cock.li ([185.100.85.212]:43185) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHqEq-0002q3-FQ for guix-patches@gnu.org; Mon, 05 Jun 2017 07:32:00 -0400 From: nee Message-ID: <9de7211f-6ab6-7a7d-c2a9-ad65f95bbfe4@cock.li> Date: Mon, 5 Jun 2017 15:31:56 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------0D5DF6F3EC4283397C90BA52" 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. --------------0D5DF6F3EC4283397C90BA52 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, this updates crawl to 0.20.0 which came out about a week ago. crawl-tiles indirectly updated through inheritance. I also wrote a patch to make crawl upgrade cached strings in the SAVEDIR by release version in addition to mtime. Without this patch crawl will not detect that there is a new version installed and will not upgrade files in ~/.crawl/saves/db/, because guix sets all the timestamps on the installed files to 1970. I will attempt to get this patch into crawl master. Announcement for this release: https://crawl.develz.org/wordpress/crawl-0-20-scarf-our-wanderful-fried-f= rogs Changelog for this release: https://github.com/crawl/crawl/blob/stone_soup-0.20/crawl-ref/docs/change= log.txt --------------0D5DF6F3EC4283397C90BA52 Content-Type: text/x-patch; name="0001-gnu-crawl-Update-to-0.20.0.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-gnu-crawl-Update-to-0.20.0.patch" =46rom 3aa8588481fb11a3abaa07d754f768b95433aede Mon Sep 17 00:00:00 2001 From: nee Date: Sun, 4 Jun 2017 17:19:41 +0200 Subject: [PATCH] gnu: crawl: Update to 0.20.0. * gnu/packages/games.scm (crawl)[source]: Add a patch to fix savegame upgrades. Update to 0.20.0. * 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 | 5 +- gnu/packages/patches/crawl-upgrade-saves.patch | 117 +++++++++++++++++++= ++++++ 3 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/crawl-upgrade-saves.patch diff --git a/gnu/local.mk b/gnu/local.mk index e7d5ee2f4..b8a85494d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -550,6 +550,7 @@ dist_patch_DATA =3D \ %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 c1993485b..c2c24f3c8 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -3955,7 +3955,7 @@ fish. The whole game is accompanied by quiet, comf= orting music.") (define-public crawl (package (name "crawl") - (version "0.19.5") + (version "0.20.0") (source (origin (method url-fetch) @@ -3969,7 +3969,8 @@ fish. The whole game is accompanied by quiet, comf= orting music.") version "-nodeps.tar.xz"))) (sha256 (base32 - "00yl2lb2shglxlxzpyk99zvglfx4amjybqwnzdcasvbiggb4cj18")))) + "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/package= s/patches/crawl-upgrade-saves.patch new file mode 100644 index 000000000..c6b6b53bc --- /dev/null +++ b/gnu/packages/patches/crawl-upgrade-saves.patch @@ -0,0 +1,117 @@ +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 se= e 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 +--- b/source/database.cc 2017-06-05 02:25:44.080149014 +0200 +*************** +*** 25,30 **** +--- 25,31 ---- + #include "syscalls.h" + #include "threads.h" + #include "unicode.h" ++ #include "version.h" + =20 + // TextDB handles dependency checking the db vs text files, creating t= he + // db, loading, and destroying the DB. +*************** +*** 55,60 **** +--- 56,62 ---- + vector _input_files; + DBM* _db; + string timestamp; ++ string version; + TextDB *_parent; + const char* lang() { return _parent ? Options.lang_name : 0; } + public: +*************** +*** 165,171 **** + =20 + TextDB::TextDB(const char* db_name, const char* dir, ...) + : _db_name(db_name), _directory(dir), +! _db(nullptr), timestamp(""), _parent(0), translation(0) + { + va_list args; + va_start(args, dir); +--- 167,173 ---- + =20 + TextDB::TextDB(const char* db_name, const char* dir, ...) + : _db_name(db_name), _directory(dir), +! _db(nullptr), timestamp(""), version(""), _parent(0), translati= on(0) + { + va_list args; + va_start(args, dir); +*************** +*** 187,193 **** + : _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(nullpt= r) + { + } + =20 +--- 189,195 ---- + : _db_name(parent->_db_name), + _directory(parent->_directory + Options.lang_name + "/"), + _input_files(parent->_input_files), // FIXME: pointless copy +! _db(nullptr), timestamp(""), version(""), _parent(parent), trans= lation(nullptr) + { + } + =20 +*************** +*** 202,207 **** +--- 204,212 ---- + return false; + =20 + timestamp =3D _query_database(*this, "TIMESTAMP", false, false, tr= ue); ++ version =3D _query_database(*this, "VERSION", false, false, true);= ++ if (version.empty()) ++ return false; + if (timestamp.empty()) + return false; + =20 +*************** +*** 245,250 **** +--- 250,258 ---- + string ts; + bool no_files =3D true; + =20 ++ if (string(Version::Long) !=3D version) ++ return true; ++=20 + for (const string &file : _input_files) + { + string full_input_path =3D _directory + file; +*************** +*** 261,267 **** + ts +=3D buf; + } + =20 +! if (no_files && timestamp.empty()) + { + // No point in empty databases, although for simplicity keep o= nes + // for disappeared translations for now. +--- 269,275 ---- + ts +=3D buf; + } + =20 +! if (no_files && timestamp.empty() && version.empty()) + { + // No point in empty databases, although for simplicity keep o= nes + // for disappeared translations for now. +*************** +*** 321,327 **** +--- 329,338 ---- + _store_text_db(full_input_path, _db); + } + } ++=20 ++ string current_version =3D string(Version::Long); + _add_entry(_db, "TIMESTAMP", ts); ++ _add_entry(_db, "VERSION", current_version); + =20 + dbm_close(_db); + _db =3D 0; --=20 2.13.0 --------------0D5DF6F3EC4283397C90BA52--