* bug#43359: package-tests leave temporary files behind
@ 2020-09-12 18:02 Glenn Morris
2020-09-13 14:32 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2020-09-12 18:02 UTC (permalink / raw)
To: 43359
Package: emacs
Version: 28.0.50
Severity: minor
cd test
make lisp/emacs-lisp/package-tests
-> two directories "/tmp/pkg-archive-base-*" are left behind on every run.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#43359: package-tests leave temporary files behind
2020-09-12 18:02 bug#43359: package-tests leave temporary files behind Glenn Morris
@ 2020-09-13 14:32 ` Lars Ingebrigtsen
2020-10-23 0:27 ` Stefan Kangas
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-13 14:32 UTC (permalink / raw)
To: Glenn Morris; +Cc: 43359
Glenn Morris <rgm@gnu.org> writes:
> cd test
> make lisp/emacs-lisp/package-tests
>
> -> two directories "/tmp/pkg-archive-base-*" are left behind on every run.
This patch fixes the problem, but since it does a recursive deletion,
it'd be nice if somebody could look at it and see whether it looks
safe...
I think it should be -- when upload-base is set, then
package-test-archive-upload-base should always point to the new
directory in /tmp.
diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el
index cbb2410f95..7797799cf8 100644
--- a/test/lisp/emacs-lisp/package-tests.el
+++ b/test/lisp/emacs-lisp/package-tests.el
@@ -154,6 +154,8 @@ with-package-test
`(insert-file-contents ,file))
,@body)))
+ (when ,upload-base
+ (delete-directory package-test-archive-upload-base t))
(when (file-directory-p package-test-user-dir)
(delete-directory package-test-user-dir t))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#43359: package-tests leave temporary files behind
2020-09-13 14:32 ` Lars Ingebrigtsen
@ 2020-10-23 0:27 ` Stefan Kangas
2020-10-23 10:51 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2020-10-23 0:27 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Glenn Morris, 43359
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Glenn Morris <rgm@gnu.org> writes:
>
>> cd test
>> make lisp/emacs-lisp/package-tests
>>
>> -> two directories "/tmp/pkg-archive-base-*" are left behind on every run.
>
> This patch fixes the problem, but since it does a recursive deletion,
> it'd be nice if somebody could look at it and see whether it looks
> safe...
LGTM.
The alternative, I guess is something like:
diff --git a/test/lisp/emacs-lisp/package-tests.el
b/test/lisp/emacs-lisp/package-tests.el
index 155a8e6fce..23267545f8 100644
--- a/test/lisp/emacs-lisp/package-tests.el
+++ b/test/lisp/emacs-lisp/package-tests.el
@@ -151,6 +151,15 @@ with-package-test
`(insert-file-contents ,file))
,@body)))
+ (when ,upload-base
+ (dolist (f '("archive-contents"
+ "simple-single-1.3.el"
+ "simple-single-1.4.el"
+ "simple-single-readme.txt"))
+ (ignore-errors
+ (delete-file
+ (expand-file-name f package-test-archive-upload-base))))
+ (delete-directory package-test-archive-upload-base))
(when (file-directory-p package-test-user-dir)
(delete-directory package-test-user-dir t))
But I don't think it's worth it...
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#43359: package-tests leave temporary files behind
2020-10-23 0:27 ` Stefan Kangas
@ 2020-10-23 10:51 ` Lars Ingebrigtsen
2020-10-23 11:04 ` Stefan Kangas
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-23 10:51 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Glenn Morris, 43359
Stefan Kangas <stefan@marxist.se> writes:
> The alternative, I guess is something like:
[...]
> + (when ,upload-base
> + (dolist (f '("archive-contents"
> + "simple-single-1.3.el"
> + "simple-single-1.4.el"
> + "simple-single-readme.txt"))
> + (ignore-errors
> + (delete-file
> + (expand-file-name f package-test-archive-upload-base))))
> + (delete-directory package-test-archive-upload-base))
> (when (file-directory-p package-test-user-dir)
> (delete-directory package-test-user-dir t))
>
> But I don't think it's worth it...
If that cleans out all the left-behind files/directories, I'd prefer
that instead of the recursive deletion. So go ahead and push.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#43359: package-tests leave temporary files behind
2020-10-23 10:51 ` Lars Ingebrigtsen
@ 2020-10-23 11:04 ` Stefan Kangas
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Kangas @ 2020-10-23 11:04 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Glenn Morris, 43359
close 43359 28.1
thanks
Lars Ingebrigtsen <larsi@gnus.org> writes:
> If that cleans out all the left-behind files/directories, I'd prefer
> that instead of the recursive deletion. So go ahead and push.
Done.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-23 11:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-12 18:02 bug#43359: package-tests leave temporary files behind Glenn Morris
2020-09-13 14:32 ` Lars Ingebrigtsen
2020-10-23 0:27 ` Stefan Kangas
2020-10-23 10:51 ` Lars Ingebrigtsen
2020-10-23 11:04 ` Stefan Kangas
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.