From 2e89e9f20abfeb8744bc3a0282a3164e379fe058 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Wed, 19 Jun 2024 15:22:23 +0800 Subject: gnu: vim-vlime: Fix build. * gnu/packages/vim.scm (vim-vlime)[arguments]: Correct order of phases. Change-Id: I449cceff6022cee481840e49b732a8bba8031a61 --- gnu/packages/vim.scm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'gnu/packages/vim.scm') diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm index 1ab69b9572..786a85ab58 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -1217,6 +1217,14 @@ to Lisp.") '(#:plugin-name "vlime" #:phases (modify-phases %standard-phases + (add-after 'install 'symlink-files + (lambda* (#:key outputs plugin-name mode #:allow-other-keys) + (with-directory-excursion + (string-append (assoc-ref outputs "out") + "/share/vim/vimfiles/pack/guix/" mode "/" plugin-name) + (for-each (lambda (dir) + (symlink (string-append "./vim/" dir) dir)) + (list "after" "autoload" "doc" "ftplugin" "syntax"))))) (add-after 'symlink-files 'install-lisp-files (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -1226,15 +1234,7 @@ to Lisp.") (copy-recursively "lisp" (string-append common-lisp "/source/vlime")) (mkdir-p (string-append common-lisp "/systems/")) (symlink (string-append common-lisp "/source/vlime/vlime.asd") - (string-append common-lisp "/systems/vlime.asd"))))) - (add-after 'install 'symlink-files - (lambda* (#:key outputs plugin-name mode #:allow-other-keys) - (with-directory-excursion - (string-append (assoc-ref outputs "out") - "/share/vim/vimfiles/pack/guix/" mode "/" plugin-name) - (for-each (lambda (dir) - (symlink (string-append "./vim/" dir) dir)) - (list "after" "autoload" "doc" "ftplugin" "syntax")))))))) + (string-append common-lisp "/systems/vlime.asd")))))))) (propagated-inputs (list cl-alexandria cl-slime-swank -- cgit v1.2.3 ase.cc --- a/crawl-ref/source/database.cc 2018-08-09 21:49:26.000000000 -0400 +++ b/crawl-ref/source/database.cc 2018-10-07 18:06:41.022445789 -0400 @@ -24,6 +24,7 @@ #include "stringutil.h" #include "syscalls.h" #include "unicode.h" +#include "version.h" // TextDB handles dependency checking the db vs text files, creating the // db, loading, and destroying the DB. @@ -54,6 +55,7 @@ vector<string> _input_files; DBM* _db; string timestamp; + string version; TextDB *_parent; const char* lang() { return _parent ? Options.lang_name : 0; } public: @@ -163,7 +165,7 @@ TextDB::TextDB(const char* db_name, const char* dir, vector<string> files) : _db_name(db_name), _directory(dir), _input_files(files), - _db(nullptr), timestamp(""), _parent(0), translation(0) + _db(nullptr), timestamp(""), version(""), _parent(0), translation(0) { } @@ -171,7 +173,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) { } @@ -186,6 +188,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; @@ -229,6 +234,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; @@ -246,7 +254,7 @@ ts += buf; } - if (no_files) + if (no_files && version.empty()) { // No point in empty databases, although for simplicity keep ones // for disappeared translations for now. @@ -312,7 +320,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;