2012-02-27 06:01:43 +08:00
|
|
|
;; https://github.com/dimitri/el-get/issues/592
|
|
|
|
;;
|
|
|
|
;; old elc files interfere with compilation on update
|
|
|
|
|
2012-02-27 06:49:52 +08:00
|
|
|
(require 'cl)
|
|
|
|
(let* ((debug-on-error t)
|
2012-02-27 06:01:43 +08:00
|
|
|
;; (el-get-byte-compile nil)
|
|
|
|
(el-get-verbose t)
|
|
|
|
(el-get-default-process-sync t)
|
2012-02-27 06:49:52 +08:00
|
|
|
(recipe-stub
|
2012-02-27 06:01:43 +08:00
|
|
|
'(:name test-pkg
|
|
|
|
:type builtin
|
2012-02-27 06:49:52 +08:00
|
|
|
:build (("echo" "BUILDING TEST PACKAGE")
|
|
|
|
("sh" "-c" "echo 't' > test-pkg.el"))))
|
|
|
|
(recipe1 (append recipe-stub '(:compile ".")))
|
|
|
|
(recipe2 (append recipe-stub '(:compile nil))))
|
2012-02-27 06:01:43 +08:00
|
|
|
;; Install with recipe1, which does compilation
|
|
|
|
(let ((el-get-sources (list recipe1)))
|
|
|
|
(el-get 'sync 'test-pkg)
|
|
|
|
;; Verify that the file was compiled
|
|
|
|
(assert (file-exists-p (expand-file-name
|
|
|
|
"test-pkg.elc"
|
|
|
|
(el-get-package-directory 'test-pkg)))
|
|
|
|
nil
|
|
|
|
"test-pkg.el should be compiled"))
|
2012-02-27 06:49:52 +08:00
|
|
|
;; Now do an update with recipe2, which does not want anything
|
|
|
|
;; compiled
|
2012-02-27 06:01:43 +08:00
|
|
|
(let ((el-get-sources (list recipe2)))
|
2012-02-27 06:49:52 +08:00
|
|
|
(el-get-update 'test-pkg)
|
2012-02-27 06:01:43 +08:00
|
|
|
;; Verify that the file was compiled
|
|
|
|
(assert (not (file-exists-p (expand-file-name
|
|
|
|
"test-pkg.elc"
|
|
|
|
(el-get-package-directory 'test-pkg))))
|
|
|
|
nil
|
|
|
|
"test-pkg.el should no longer be compiled")))
|