unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#72781: Emacs 29 for Windows: Uninstall.exe deletes everything in the same folder as it.
@ 2024-08-23 22:06 Sylvan via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-08-24  6:27 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Sylvan via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-08-23 22:06 UTC (permalink / raw)
  To: 72781

[-- Attachment #1: Type: text/plain, Size: 2725 bytes --]

Hello! I've encountered an issue with the uninstaller for Emacs 29 for Windows.

Description:
When using Uninstall.exe, which is provided by the installation wizard, all files/folders in its folder are deleted. I would expect Uninstall.exe to only delete the emacs-29.something folder and itself.
When I encountered the bug with Emacs 29.1_2, Uninstall.exe was in my home directory, and deleted all its contents but not my home directory itself. When I tested Emacs 29.4 to see if the bug was still present, I installed Emacs 29.4 into a test folder (containing a test file). This time, the uninstaller deleted the test folder it was in
There is a reddit thread from January 2023 about this issue, with some comments from March and July this year reporting the same thing: https://reddit.com/r/emacs/comments/10ickog/tried_to_uninstall_emacs_destruction_happened/

Emacs version information:
Emacs 29.1_2 and 29.4 for Windows, as installed with emacs-29.x-installer.exe (I have not tested other versions of Emacs 29.x or installation methods).

System information:
Edition: Windows 11 Home
Version: 22H2
OS build: 22621.4037
System type: 64-bit operating system, x64-based processor

Steps to reproduce (with Emacs 29.4):
1. Create a new folder somewhere within your home directory (I haven't tested outside of it).
2. Within this folder, create a test file and/or folder, which will eventually be deleted by the uninstaller.
3. Download emacs-29.4-installer.exe from https://ftp.gnu.org/gnu/emacs/windows/emacs-29/
4. Go through the setup wizard. When choosing the install location, save it in the folder you made in step 1.
5. Allow Emacs to install. In your step 1 folder, you should now have:
- A folder named emacs-29.4
- Uninstall.exe
- Any test files and folders you added
6. Run Uninstall.exe (just by double-clicking the file and pressing Uninstall)
7. Go up one folder.

Expected behaviour after Step 6:
The emacs-29.4 folder and Uninstall.exe are gone, but any other files or folders remain.
Actual behaviour after Step 6:
All files and folders in your test file are gone.

Expected behaviour after Step 7:
The test folder made in Step 1 still exists.
Actual behaviour after Step 7:
The test folder made in Step 1 has been deleted.
Upon pressing the back button in Windows Explorer, I received an error message saying "C:\Users\redacted\Downloads\testfolder is unavailable. If the location is on this PC, make sure the device or drive is connected or the disc is inserted, and then try again. If the location is on a network, make sure you're connected to the network or Internet, and then try again. If the location still can't be found, it might have been moved or deleted."

Yours faithfully,
Sylvan (they/them)

[-- Attachment #2: Type: text/html, Size: 7415 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#72781: Emacs 29 for Windows: Uninstall.exe deletes everything in the same folder as it.
  2024-08-23 22:06 bug#72781: Emacs 29 for Windows: Uninstall.exe deletes everything in the same folder as it Sylvan via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-08-24  6:27 ` Eli Zaretskii
  2024-08-24 15:06   ` Corwin Brust
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-08-24  6:27 UTC (permalink / raw)
  To: Sylvan, Corwin Brust; +Cc: 72781

> Date: Fri, 23 Aug 2024 22:06:59 +0000
> From:  Sylvan via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Hello! I've encountered an issue with the uninstaller for Emacs 29 for Windows.
> 
> Description:
> When using Uninstall.exe, which is provided by the installation wizard, all files/folders in its folder are deleted.
> I would expect Uninstall.exe to only delete the emacs-29.something folder and itself.
> When I encountered the bug with Emacs 29.1_2, Uninstall.exe was in my home directory, and deleted all its
> contents but not my home directory itself. When I tested Emacs 29.4 to see if the bug was still present, I
> installed Emacs 29.4 into a test folder (containing a test file). This time, the uninstaller deleted the test folder
> it was in 
> There is a reddit thread from January 2023 about this issue, with some comments from March and July this
> year reporting the same thing:
> https://reddit.com/r/emacs/comments/10ickog/tried_to_uninstall_emacs_destruction_happened/
> 
> Emacs version information:
> Emacs 29.1_2 and 29.4 for Windows, as installed with emacs-29.x-installer.exe (I have not tested other
> versions of Emacs 29.x or installation methods).
> 
> System information:
> Edition: Windows 11 Home
> Version: 22H2
> OS build: 22621.4037
> System type: 64-bit operating system, x64-based processor
> 
> Steps to reproduce (with Emacs 29.4):
> 1. Create a new folder somewhere within your home directory (I haven't tested outside of it).
> 2. Within this folder, create a test file and/or folder, which will eventually be deleted by the uninstaller.
> 3. Download emacs-29.4-installer.exe from https://ftp.gnu.org/gnu/emacs/windows/emacs-29/
> 4. Go through the setup wizard. When choosing the install location, save it in the folder you made in step 1.
> 5. Allow Emacs to install. In your step 1 folder, you should now have:
>    - A folder named emacs-29.4
>    - Uninstall.exe
>    - Any test files and folders you added
> 6. Run Uninstall.exe (just by double-clicking the file and pressing Uninstall)
> 7. Go up one folder.
> 
> Expected behaviour after Step 6:
> The emacs-29.4 folder and Uninstall.exe are gone, but any other files or folders remain.
> Actual behaviour after Step 6:
> All files and folders in your test file are gone.
> 
> Expected behaviour after Step 7:
> The test folder made in Step 1 still exists.
> Actual behaviour after Step 7:
> The test folder made in Step 1 has been deleted.
> Upon pressing the back button in Windows Explorer, I received an error message saying
> "C:\Users\redacted\Downloads\testfolder is unavailable. If the location is on this PC, make sure the device or
> drive is connected or the disc is inserted, and then try again. If the location is on a network, make sure you're
> connected to the network or Internet, and then try again. If the location still can't be found, it might have been
> moved or deleted."

Adding Corwin, who provided the Windows installer.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#72781: Emacs 29 for Windows: Uninstall.exe deletes everything in the same folder as it.
  2024-08-24  6:27 ` Eli Zaretskii
@ 2024-08-24 15:06   ` Corwin Brust
  2024-08-24 15:26     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Corwin Brust @ 2024-08-24 15:06 UTC (permalink / raw)
  To: Eli Zaretskii, Sylvan; +Cc: 72781

Tags: 72781
Merge: 68756
thank you

On Sat, Aug 24, 2024 at 1:27 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Date: Fri, 23 Aug 2024 22:06:59 +0000
> > From:  Sylvan via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> >
> >
> > Expected behaviour after Step 6:
> > The emacs-29.4 folder and Uninstall.exe are gone, but any other files or folders remain.
> > Actual behaviour after Step 6:
> > All files and folders in your test file are gone.
> >
> > Expected behaviour after Step 7:
> > The test folder made in Step 1 still exists.
> > Actual behaviour after Step 7:
> > The test folder made in Step 1 has been deleted.
> > Upon pressing the back button in Windows Explorer, I received an error message saying
> > "C:\Users\redacted\Downloads\testfolder is unavailable. If the location is on this PC, make sure the device or
> > drive is connected or the disc is inserted, and then try again. If the location is on a network, make sure you're
> > connected to the network or Internet, and then try again. If the location still can't be found, it might have been
> > moved or deleted."
>
> Adding Corwin, who provided the Windows installer.
>

Sylvan,

I believe this is the same problem as reported in bug#68756, hence I
am merging them.  That bug report contains a patch which was tested
(but not installed) back in Feburary, one of three patch-sets for the
Windows installer/uninstaller that have been awaiting my attention far
too long.   I plan to retest these (starting with this one) this
morning with intent to apply as soon as I can confirm they appear to
resolve the (most important, incorrect file deletion) problem;
apologies I wasn't able to resolve this before you were bitten.
Here's a link to the other report, containing the patch to avoid
uninstaller deleting versions other than that from the corresponding
installer:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68756

Are you able to build Emacs locally to test?

I would normally upload a set of binaries incorporating my patches to
my own website to make it easier for others who are not in a position
to compile Emacs for Windows; however, if you plan to build your own
Emacs to test my fixes in this case, I might skip that in name of
moving a little more quickly.  (I have a Windows machine separate from
my "development environment" where I'm able to test myself however
both of these machines are Windows 10 - I don't have anything running
Windows 11 at my disposal.  It would be lovely to get confirmation the
fix works under Windows 11 (although I see no reason it should not).


Eli,

I would like to install this directly to the release branch.  I
believe we had discussed doing so when the release branch was for
Emacs 29 but please tell me if this must go to the development branch,
instead.   As I suspect you are aware, the change here is specifically
to the NSIS script within admin/nt/dist-build and thus cannot affect
other than the installer for Windows.  Moreover, as this issue
potentially causes Emacs to unexpectedly delete files I think it is
rather serious.  If my changes cause further problems I expect to "fix
and fall forward"; so, while I'm confident -existing patch, previously
tested- it's possible this will not be the "one-and-done" I expect.

Please let me know I must apply to the main branch (for Emacs 31), instead.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#72781: Emacs 29 for Windows: Uninstall.exe deletes everything in the same folder as it.
  2024-08-24 15:06   ` Corwin Brust
@ 2024-08-24 15:26     ` Eli Zaretskii
  2024-08-24 16:06       ` Corwin Brust
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-08-24 15:26 UTC (permalink / raw)
  To: Corwin Brust; +Cc: 72781, sylvannesbitt

> From: Corwin Brust <corwin@bru.st>
> Date: Sat, 24 Aug 2024 10:06:11 -0500
> Cc: 72781@debbugs.gnu.org
> 
> I would like to install this directly to the release branch.  I
> believe we had discussed doing so when the release branch was for
> Emacs 29 but please tell me if this must go to the development branch,
> instead.   As I suspect you are aware, the change here is specifically
> to the NSIS script within admin/nt/dist-build and thus cannot affect
> other than the installer for Windows.  Moreover, as this issue
> potentially causes Emacs to unexpectedly delete files I think it is
> rather serious.  If my changes cause further problems I expect to "fix
> and fall forward"; so, while I'm confident -existing patch, previously
> tested- it's possible this will not be the "one-and-done" I expect.
> 
> Please let me know I must apply to the main branch (for Emacs 31), instead.

It's okay to install this on the emacs-30 release branch, thanks.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#72781: Emacs 29 for Windows: Uninstall.exe deletes everything in the same folder as it.
  2024-08-24 15:26     ` Eli Zaretskii
@ 2024-08-24 16:06       ` Corwin Brust
  2024-08-25  3:08         ` Sylvan via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 6+ messages in thread
From: Corwin Brust @ 2024-08-24 16:06 UTC (permalink / raw)
  To: Eli Zaretskii, sylvannesbitt; +Cc: 72781

On Sat, Aug 24, 2024 at 10:26 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Corwin Brust <corwin@bru.st>
> > Date: Sat, 24 Aug 2024 10:06:11 -0500
> > Cc: 72781@debbugs.gnu.org
> >
> > Please let me know I must apply to the main branch (for Emacs 31), instead.
>
> It's okay to install this on the emacs-30 release branch, thanks.
>

Upon further review, I find the patch in question is applied to/for
emacs-30.  I have updates (via pacman) to make to my system in order
to publish snapshots for emacs-30 to GNU FTP/mirrors (to ensure they
work well with now current version of our dependencies). I'm starting
on that now.  Meanwhile...

Sylvan,

Would you be able (comfortable) testing with this set of binaries
from/for Emacs 30?  I believe the should resolve the "unexpected
delete of other Emacsian when running installer" issue.

https://corwin.bru.st/emacs-30/emacs-30-latest/

Note, my local CI is paused while I do the aforementioned updates, but
here's an invariant link that will exist for at least seventeen days,
JIC:
  https://corwin.bru.st/emacs-30/emacs-30-4211d8





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#72781: Emacs 29 for Windows: Uninstall.exe deletes everything in the same folder as it.
  2024-08-24 16:06       ` Corwin Brust
@ 2024-08-25  3:08         ` Sylvan via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvan via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-08-25  3:08 UTC (permalink / raw)
  To: Corwin Brust; +Cc: Eli Zaretskii, 72781

Corwin,

> I believe this is the same problem as reported in bug#68756, hence I am merging them.

Yes, it sounds like the same problem.

> Are you able to build Emacs locally to test?

I am happy to give it a try! I will need to figure out the setup first, but I know some people who can probably help me if I have trouble with it. Should I use MinGW32 for consistency?

- Sylvan (they/them)





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-25  3:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 22:06 bug#72781: Emacs 29 for Windows: Uninstall.exe deletes everything in the same folder as it Sylvan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-24  6:27 ` Eli Zaretskii
2024-08-24 15:06   ` Corwin Brust
2024-08-24 15:26     ` Eli Zaretskii
2024-08-24 16:06       ` Corwin Brust
2024-08-25  3:08         ` Sylvan via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).