[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa-admin d10026f 419/439: * elpa-admin.el: Preserve release t
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa-admin d10026f 419/439: * elpa-admin.el: Preserve release tarballs at least 2 years |
Date: |
Sun, 17 Oct 2021 15:48:48 -0400 (EDT) |
branch: elpa-admin
commit d10026f4df0f82d7f5aa74f5d8d959cc8f882eae
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* elpa-admin.el: Preserve release tarballs at least 2 years
(elpaa--prune-old-tarballs): Add `minage` arg.
(elpaa--make-one-tarball): Use it.
---
elpa-admin.el | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/elpa-admin.el b/elpa-admin.el
index acb7df1..bb3c8f4 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -431,7 +431,7 @@ Do it without leaving the current branch."
kept))))
kept))))))
-(defun elpaa--prune-old-tarballs (tarball oldtarballs destdir)
+(defun elpaa--prune-old-tarballs (tarball oldtarballs destdir &optional minage)
;; Make sure we don't count ourselves among the "old" tarballs.
(let ((self (rassoc (file-name-nondirectory tarball) oldtarballs)))
(when self
@@ -455,11 +455,23 @@ Do it without leaving the current branch."
filename)
".sig"))
(mvfun (lambda (f)
- (let ((src (expand-file-name f destdir)))
- (if (not (file-exists-p src))
- (message "Not existing/moving: %S" src)
+ (let* ((src (expand-file-name f destdir))
+ (fa (file-attributes src)))
+ (cond
+ ((not fa)
+ (message "Not existing/moving: %S" src))
+ ((and minage
+ (< (float-time
+ (time-subtract
+ (current-time)
+ (file-attribute-modification-time
+ fa)))
+ ;; One year.
+ minage))
+ (message "File too young: %S" src))
+ (t
(rename-file src
- (expand-file-name f olddir)))))))
+ (expand-file-name f olddir))))))))
(make-directory olddir t)
(funcall mvfun filename)
(funcall mvfun sig))))
@@ -558,7 +570,11 @@ Return non-nil if a new tarball was created."
(when (file-symlink-p link) (delete-file link))
(make-symbolic-link (file-name-nondirectory tarball) link))
(setq oldtarballs
- (elpaa--prune-old-tarballs tarball oldtarballs destdir))
+ (elpaa--prune-old-tarballs tarball oldtarballs destdir
+ ;; Keep release versions at
+ ;; least 2 years.
+ (if revision-function
+ (* 60 60 24 365 2))))
(let* ((default-directory (expand-file-name destdir)))
;; Apparently this also creates the <pkg>-readme.txt file.
(elpaa--html-make-pkg pkgdesc pkg-spec
- [nongnu] elpa-admin 6dcc26f 378/439: * elpa-admin.el (elpaa--make): Fix last change, (continued)
- [nongnu] elpa-admin 6dcc26f 378/439: * elpa-admin.el (elpaa--make): Fix last change, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 26d341c 391/439: * elpa-admin.el (elpaa--make): Add support for non-make command, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin fd06277 384/439: * elpa-admin.el (elpaa--core-package-sync): Don't presume shape of plist, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin f3fd8c5 387/439: * GNUmakefile (%.tar): New target, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 221c427 350/439: * admin/archive-contents.el: Improve handling of snapshot version numbers, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c84575d 411/439: * elpa-admin.el (elpaa--get-release-revision): Fix code for :core pkgs, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e3ca730 420/439: Support LibreJS, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 9e01d93 406/439: * elpa-admin.el (elpaa--prune-old-tarballs): Return resulting oldtarballs, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin fae2e2e 412/439: * elpa-admin.el (elpaa--prune-old-tarballs): Fix computation of .sig name, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 0783750 417/439: * elpa-admin.el (elpaa--sandbox-extra-ro-dirs): New var, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d10026f 419/439: * elpa-admin.el: Preserve release tarballs at least 2 years,
Philip Kaludercic <=
- [nongnu] elpa-admin 97ebbd5 405/439: * elpa-admin.el (elpaa--prune-old-tarballs): "(Re)move" the non-kept files, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 8ed7b88 354/439: Rename vars and functions with `elpaa-` prefix, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin d8903b6 358/439: * elpa-admin.el: Add some of the support needed to build Org packages, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 7e5b75b 359/439: * elpa-admin.el: Add support for checking copyright notices, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c26df96 392/439: * elpa-admin.el: Allow `:doc` to specify several doc files, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin 396a74b 421/439: Bump license for package pages to CC BY-ND 4.0, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin c29da22 424/439: * elpa-admin.el: Generate SVG badges, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin fa18a66 413/439: * elpa-admin.el: Improve doc build for the :core packages, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin de2fd22 418/439: * elpa-admin.el (elpaa-read-config): Allow lists of strings, Philip Kaludercic, 2021/10/17
- [nongnu] elpa-admin e3683d9 426/439: elpa-admin.el: Improve the badge generation code, Philip Kaludercic, 2021/10/17