Comments (2)
el-get-lock-unlock
で明示的にバージョン固定対象から外していた場合の考慮が漏れていたので、以下のようにした方がよいですね。(あと:checkout
を潰す方法が上のはちょっと雑だったので直してます。)
(defun el-get-lock-save-installed-version-to-status (package)
(let* ((name (if (stringp package) package (el-get-source-name package)))
(checksum (ignore-errors (el-get-checksum name)))
(recipe (el-get-package-def name))
(unlocked (memq (intern name) el-get-lock-unlocked-packages)))
(when (and checksum (not (plist-get recipe :checksum)) (not unlocked))
(setq recipe (plist-put recipe :checksum checksum)
recipe
(loop for (k v) on recipe by #'cddr
unless (eq k :checkout)
collect k and collect v))
(el-get-save-package-status name "installed" recipe))))
(add-hook 'el-get-post-install-hooks #'el-get-lock-save-installed-version-to-status)
(add-hook 'el-get-post-update-hooks #'el-get-lock-save-installed-version-to-status)
from el-get-lock.
ご報告および調査ありがとうございます。
el-get-update
の際にも同様の問題があり、元々はel-get本体側の変更でうまくいかなくなっていたという認識でしたが、いろいろ精査したところ、仰る通りel-get-status-file
の状態に:checksum
が正しく反映されないのが原因とみてよさそうでした。el-get-update
の場合にも適用されるようにel-get-post-update-hooks
にも登録する、el-get-update
の際にはel-get-lockが:checkout
を強制的に置き換えることでアップデートするのでそれがel-get-status-file
に入ってしまうのを防ぐ、という点を加えれば、@yewtonさんの提案ほぼそのままでうまくいきそうでした。以下のような具合です。
(defun el-get-lock-save-installed-version-to-status (package)
(let* ((name (if (stringp package) package (el-get-source-name package)))
(checksum (ignore-errors (el-get-checksum name)))
(recipe (el-get-package-def name)))
(when (and checksum (not (plist-get recipe :checksum)))
(let* ((recipe (plist-put recipe :checksum checksum))
(recipe (plist-put recipe :checkout nil)))
(el-get-save-package-status name "installed" recipe)))))
(add-hook 'el-get-post-install-hooks #'el-get-lock-save-installed-version-to-status)
(add-hook 'el-get-post-update-hooks #'el-get-lock-save-installed-version-to-status)
つきましては、上記コードを加えるpull requestをしていただけないでしょうか? (せっかく修正案まで作っていただいたので、@yewtonさんをauthorとして取り込みたいとおもいます。)
from el-get-lock.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from el-get-lock.