GNU bug report logs - #43359
package-tests leave temporary files behind

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Sat, 12 Sep 2020 18:03:01 UTC

Severity: minor

Found in version 28.0.50

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43359 in the body.
You can then email your comments to 43359 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#43359; Package emacs. (Sat, 12 Sep 2020 18:03:01 GMT) Full text and rfc822 format available.

Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: submit <at> debbugs.gnu.org
Subject: package-tests leave temporary files behind
Date: Sat, 12 Sep 2020 14:02:06 -0400
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43359; Package emacs. (Sun, 13 Sep 2020 14:33:01 GMT) Full text and rfc822 format available.

Message #6 received at 43359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 43359 <at> debbugs.gnu.org
Subject: Re: bug#43359: package-tests leave temporary files behind
Date: Sun, 13 Sep 2020 16:32:33 +0200
Glenn Morris <rgm <at> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43359; Package emacs. (Fri, 23 Oct 2020 00:28:02 GMT) Full text and rfc822 format available.

Message #9 received at 43359 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 43359 <at> debbugs.gnu.org
Subject: Re: bug#43359: package-tests leave temporary files behind
Date: Thu, 22 Oct 2020 17:27:31 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Glenn Morris <rgm <at> 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...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43359; Package emacs. (Fri, 23 Oct 2020 10:52:02 GMT) Full text and rfc822 format available.

Message #12 received at 43359 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Glenn Morris <rgm <at> gnu.org>, 43359 <at> debbugs.gnu.org
Subject: Re: bug#43359: package-tests leave temporary files behind
Date: Fri, 23 Oct 2020 12:51:41 +0200
Stefan Kangas <stefan <at> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43359; Package emacs. (Fri, 23 Oct 2020 11:05:02 GMT) Full text and rfc822 format available.

Message #15 received at 43359 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 43359 <at> debbugs.gnu.org
Subject: Re: bug#43359: package-tests leave temporary files behind
Date: Fri, 23 Oct 2020 11:04:48 +0000
close 43359 28.1
thanks

Lars Ingebrigtsen <larsi <at> 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.




bug marked as fixed in version 28.1, send any further explanations to 43359 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Fri, 23 Oct 2020 11:05:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Nov 2020 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.