[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin e2b9274 266/439: [admin int] Simplify ‘archive--wri
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin e2b9274 266/439: [admin int] Simplify ‘archive--write-pkg-file’ calling convention. |
Date: |
Sun, 17 Oct 2021 15:48:17 -0400 (EDT) |
branch: elpa-admin
commit e2b9274160a520e14a09adeff87b144c5780aa5d
Author: Thien-Thi Nguyen <ttn@gnu.org>
Commit: Thien-Thi Nguyen <ttn@gnu.org>
[admin int] Simplify ‘archive--write-pkg-file’ calling convention.
* admin/archive-contents.el (archive--write-pkg-file):
No longer take VERSION, DESC, REQUIRES, EXTRAS; instead,
take METADATA and destructure it to obtain those values.
(batch-make-archive, archive--refresh-pkg-file):
Update calls to ‘archive--write-pkg-file’ accordingly.
---
admin/archive-contents.el | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index 6ebf5dd..7ec415c 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -86,8 +86,7 @@ Delete backup files also."
(apply #'archive--process-simple-package
dir pkg (cdr metadata))
(if (nth 1 metadata)
- (apply #'archive--write-pkg-file
- dir pkg (cdr metadata)))
+ (archive--write-pkg-file dir pkg metadata))
(archive--process-multi-file-package dir pkg))
packages)))))
((debug error) (error "Error in %s: %S" dir v))))
@@ -323,10 +322,9 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
(defun archive--refresh-pkg-file ()
(let* ((dir (directory-file-name default-directory))
(pkg (file-name-nondirectory dir)))
- (apply #'archive--write-pkg-file dir pkg
- (cdr (archive--metadata dir pkg)))))
+ (archive--write-pkg-file dir pkg (archive--metadata dir pkg))))
-(defun archive--write-pkg-file (pkg-dir name version desc requires extras)
+(defun archive--write-pkg-file (pkg-dir name metadata)
(let ((pkg-file (expand-file-name (concat name "-pkg.el") pkg-dir))
(print-level nil)
(print-quoted t)
@@ -335,19 +333,21 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
(concat (format ";; Generated package description from %s.el\n"
name)
(prin1-to-string
- (nconc
- (list 'define-package
- name
- version
- desc
- (list 'quote
- ;; Turn version lists into string form.
- (mapcar
- (lambda (elt)
- (list (car elt)
- (package-version-join (cadr elt))))
- requires)))
- (archive--alist-to-plist-args extras)))
+ (cl-destructuring-bind (version desc requires extras)
+ (cdr metadata)
+ (nconc
+ (list 'define-package
+ name
+ version
+ desc
+ (list 'quote
+ ;; Turn version lists into string form.
+ (mapcar
+ (lambda (elt)
+ (list (car elt)
+ (package-version-join (cadr elt))))
+ requires)))
+ (archive--alist-to-plist-args extras))))
"\n")
nil
pkg-file)))
- [nongnu] elpa-admin 1ee6e0e 383/439: * elpa-admin.el (elpaa--get-section): Use the whole section, (continued)
- [nongnu] elpa-admin 1ee6e0e 383/439: * elpa-admin.el (elpaa--get-section): Use the whole section, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 68c0d47 414/439: * elpa-admin.el (elpaa--fetch): Don't show the log if branches diverged, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 54ca8ea 415/439: * elpa-admin.el: Don't build release tarballs for pre-release versions, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin fd42057 422/439: Prefer HTTPS to HTTP, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 28b66f7 427/439: * elpa-admin.el (elpaa--get-last-release): Don't return snapshot versions, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 069c128 429/439: Allow testing locally via list-packages, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 6afe3b7 431/439: * elpa-admin.el (elpaa--make-one-tarball): Be a bit more verbose, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 384e805 435/439: * elpa-admin.el (elpaa--sandbox): Default to nil on w32 and macos, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 69118c5 437/439: * elpa-admin.el (elpaa--release-email): Fix thinko, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e71d294 439/439: * GNUmakefile (packages/%.elc): Use `other-packages` if present, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e2b9274 266/439: [admin int] Simplify ‘archive--write-pkg-file’ calling convention.,
Philip Kaludercic <=
- [nongnu] elpa-admin 5250761 270/439: * admin/archive-contents.el: Use `git worktree` for externals, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 19a11bc 278/439: Add explicit instructions for new external packages, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d4f5903 284/439: * README: Clarify the right fix for check_copyrights failure, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a5d74b0 291/439: * packages/yasnippet: Merge version 0.13.0 from upstream., Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 63888f3 292/439: Warn about transfer.fsckObjects, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0a995ba 296/439: * admin/archive-contents.el (archive--insert-repolinks): Fix further, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 02d8431 297/439: * admin/archive-contents.el (archive--insert-repolinks): Fix further yet, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin b5760e3 298/439: * admin/archive-contents.el (archive--insert-repolinks): Getting there, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin a216465 299/439: * admin/archive-contents.el (archive--insert-repolinks): Whoops, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 38e81a8 300/439: * README: Recommend "externals" and add some recommendations, Philip Kaludercic, 2021/10/17