Browse files

Merge branch 'emacs-goodies-fix'

  • Loading branch information...
2 parents 4f7c13e + 7757e21 commit ce045b374187f59c227bde4b72595c390088fab5 @DarwinAwardWinner DarwinAwardWinner committed Jun 18, 2012
Showing with 62 additions and 25 deletions.
  1. +6 −1 el-get-core.el
  2. +56 −24 recipes/emacs-goodies-el.rcp
View
7 el-get-core.el
@@ -388,7 +388,12 @@ makes it easier to conditionally splice a command into the list.
(error "el-get: %s %s" cname errorm))
(when cbuf (kill-buffer cbuf))
(if next
- (el-get-start-process-list package next final-func)
+ ;; Prevent stack overflow on very long command
+ ;; lists. This allows
+ ;; `el-get-start-process-list' (but not other
+ ;; functions) to recurse indefinitely.
+ (let ((max-specpdl-size (+ 100 max-specpdl-size)))
+ (el-get-start-process-list package next final-func))
(when (functionp final-func)
(funcall final-func package)))))
;; async case
View
80 recipes/emacs-goodies-el.rcp
@@ -10,37 +10,69 @@
:url "http://alioth.debian.org/snapshots.php?group_id=30060"
:options ("xzf")
:build
- (let ((makerfiles
- (split-string (shell-command-to-string "find . -name '*.make'"))))
- (mapcar
- (lambda (makerfile)
- (let ((maker-dir (file-name-directory makerfile))
- (maker-command
- (replace-regexp-in-string
- "\n" ""
- (replace-regexp-in-string
- "^emacs" el-get-emacs
- (with-temp-buffer
- (insert-file-contents makerfile)
- (buffer-string))))))
- (format "cd %s && %s" maker-dir maker-command)))
- makerfiles))
+ (let* ((pdir (el-get-package-directory 'emacs-goodies-el))
+ ;; This will return "PDIR" or
+ ;; "PDIR/pkg-goodies-el-YYYY-MM-DD" depending on whether
+ ;; tar-cleanup-extract-hook has run already.
+ (pkg-goodies-dir
+ (or (car (directory-files pdir 'full "^pkg-goodies-el-"))
+ pdir))
+ (default-directory
+ (file-name-as-directory
+ (expand-file-name "emacs-goodies-el"
+ pkg-goodies-dir))))
+ ;; the :build elisp form is evaluated to build the
+ ;; command list before
+ ;; el-get-http-tar-cleanup-extract-hook but the
+ ;; commands are run afterward, so the directory
+ ;; structure is different.
+ (el-get-verbose-message "Building commands from %s" default-directory)
+ (el-get-verbose-message "Expecting commands to run in %s" pdir)
+ (append
+ ;; Apply all patches
+ (mapcar
+ (lambda (patch-file)
+ (list "patch" "-p1" "-f" "--no-backup-if-mismatch"
+ ;; Post-cleanup paths
+ "-i" (expand-file-name patch-file (expand-file-name "emacs-goodies-el/debian/patches" pdir))
+ "-d" (expand-file-name "emacs-goodies-el" pdir)))
+ (with-temp-buffer
+ ;; Pre-cleanup path
+ (insert-file-contents "debian/patches/series")
+ (split-string (buffer-string) "\n" t)))
+ ;; Run all "*.make" files
+ (let ((makerfiles
+ ;; Will return relative file names
+ (split-string (shell-command-to-string "find . -name '*.make'"))))
+ (el-get-verbose-message "Makerfiles: %S" makerfiles)
+ (mapcar
+ (lambda (makerfile)
+ ;; `maker-dir' is post-cleanup path
+ (let* ((maker-dir (expand-file-name (file-name-directory makerfile) (expand-file-name "emacs-goodies-el" pdir)))
+ (maker-command
+ (replace-regexp-in-string
+ "\n" ""
+ (replace-regexp-in-string
+ "^emacs" el-get-emacs
+ (with-temp-buffer
+ (insert-file-contents makerfile)
+ (buffer-string))))))
+ (format "cd %s && %s" maker-dir maker-command)))
+ makerfiles))))
:load-path ("emacs-goodies-el/elisp/debian-el"
"emacs-goodies-el/elisp/devscripts-el"
"emacs-goodies-el/elisp/dpkg-dev-el"
"emacs-goodies-el/elisp/emacs-goodies-el"
;; "emacs-goodies-el/elisp/gnus-bonus-el"
"emacs-goodies-el/elisp/vm-bonus-el")
;; The :features and :post-init are taken from the
- ;; debain/*.emacsen-startup files in the source package. Some
- ;; of these files just require specific features, and those are
- ;; added to :features. Others have some significant init code,
- ;; and this has been manually copied into :post-init. The
- ;; emacsen-startup files cannot be used directly because they
- ;; have hardcoded paths to where dpkg would install the
- ;; packages. Importantly, this means that if these files are
- ;; ever changed in the debian packages, then the following
- ;; parts of the recipe would need to be updated manually.
+ ;; debain/*.emacsen-startup files in the source package.
+ ;; Some of these files just require specific features,
+ ;; and those are added to :features. Others have some
+ ;; significant init code, and this has been manually
+ ;; copied into :post-init. The emacsen-startup files
+ ;; cannot be used directly because they have hardcoded
+ ;; paths to where dpkg would install the packages.
:features (emacs-goodies-el
debian-el
dpkg-dev-el)

0 comments on commit ce045b3

Please sign in to comment.