Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot update packages #2021

Closed
emptyVoid opened this issue Jun 23, 2020 · 23 comments
Closed

[BUG] Cannot update packages #2021

emptyVoid opened this issue Jun 23, 2020 · 23 comments

Comments

@emptyVoid
Copy link

emptyVoid commented Jun 23, 2020

Describe the bug

MSYS2 base package no longer updates:

MSYS ~
$ pacman -Syu --noconfirm
:: Synchronizing package databases...
 mingw32                  467.1 KiB   439K/s 00:01 [#####################] 100%
 mingw32.sig              119.0   B  0.00B/s 00:00 [#####################] 100%
 mingw64                  469.7 KiB  2.40M/s 00:00 [#####################] 100%
 mingw64.sig              119.0   B  0.00B/s 00:00 [#####################] 100%
 msys                     187.6 KiB  11.5M/s 00:00 [#####################] 100%
 msys.sig                 119.0   B  0.00B/s 00:00 [#####################] 100%
:: Starting core system upgrade...
warning: terminate other MSYS2 programs before proceeding
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing filesystem (2020.02-3) breaks dependency 'msys2-base' required by dash

Steps to Reproduce the Problem

  1. Run msys2.exe
  2. Execute pacman -Syu --noconfirm
  3. Catch the error

Expected behavior: the core system upgrade should complete without errors.

Additional Context: Operating System, Screenshots

  • OS: Windows 10 Pro version 2004 64-bit
  • MSYS2: msys2-base-x86_64-20190524.tar.xz and msys2-base-x86_64-20200602.tar.xz
@emptyVoid emptyVoid added the bug label Jun 23, 2020
@Biswa96
Copy link
Member

Biswa96 commented Jun 23, 2020

Warning: Try this if you don't care about your MSYS2 installation to be nuked :)

  1. Download the .tar.xz file from here https://packages.msys2.org/package/filesystem.
  2. Assume that file is downloaded in C:\MyFiles folder. Run this command pacman -Udd /c/MyFiles/filesystem-2020.02-3-x86_64.pkg.tar.xz.
  3. Kill every msys2 shell/program.
  4. Run pacman -Syu again.

@lissyx
Copy link

lissyx commented Jun 23, 2020

Warning: Try this if you don't care about your MSYS2 installation to be nuked :)

1. Download the .tar.xz file from here https://packages.msys2.org/package/filesystem.

2. Assume that file is downloaded in `C:\MyFiles` folder. Run this command `pacman -Udd /c/MyFiles/filesystem-2020.02-3-x86_64.pkg.tar.xz`.

3. Kill every msys2 shell/program.

4. Run `pacman -Syu` again.

Same repro here, and we start a msys2 from scratch on new VMs (so no pacman -Udd):

    - >-
      "C:\Program Files\7-zip\7z.exe" x -txz -so msys2-base-x86_64.tar.xz |
      "C:\Program Files\7-zip\7z.exe" x -o%USERPROFILE% -ttar -aoa -si
    - >-
      .\msys64\usr\bin\bash.exe --login -cx "export THIS_BASH_PID=$$; ps -ef |
      grep '[?]' | awk '{print $2}' | grep -v $THIS_BASH_PID | xargs -r kill;
      exit 0"
    - .\msys64\usr\bin\bash.exe --login -cx "pacman -Syu --noconfirm"

@lissyx
Copy link

lissyx commented Jun 23, 2020

Warning: Try this if you don't care about your MSYS2 installation to be nuked :)

1. Download the .tar.xz file from here https://packages.msys2.org/package/filesystem.

2. Assume that file is downloaded in `C:\MyFiles` folder. Run this command `pacman -Udd /c/MyFiles/filesystem-2020.02-3-x86_64.pkg.tar.xz`.

3. Kill every msys2 shell/program.

4. Run `pacman -Syu` again.

Same repro here, and we start a msys2 from scratch on new VMs (so no pacman -Udd):

    - >-
      "C:\Program Files\7-zip\7z.exe" x -txz -so msys2-base-x86_64.tar.xz |
      "C:\Program Files\7-zip\7z.exe" x -o%USERPROFILE% -ttar -aoa -si
    - >-
      .\msys64\usr\bin\bash.exe --login -cx "export THIS_BASH_PID=$$; ps -ef |
      grep '[?]' | awk '{print $2}' | grep -v $THIS_BASH_PID | xargs -r kill;
      exit 0"
    - .\msys64\usr\bin\bash.exe --login -cx "pacman -Syu --noconfirm"

Correcting myself, placing the filesystem-2020.02-3 file and running pacman -Udd prior seems to do the trick.

@lazka
Copy link
Member

lazka commented Jun 23, 2020

See #2022

@GitHubAdi
Copy link

GitHubAdi commented Jun 23, 2020

Same problem on my side with a clean install after downloading msys2-base-x86_64-20200602.tar.xz from http://repo.msys2.org/distrib/x86_64/

Pacman -Syuu gives the same filesystem breaks dependency error.

I add previously installed another clean install in the morning, limited to just a couple of "Pacman -Syuu", without downloading any other packages, note even msys2 base-devel, and this one could redo "Pacman -Syuu" and install the filesystem package after the repo update.

@DaveThornton
Copy link

Fixed it for me also!! Thanks

@tomyri
Copy link

tomyri commented Jun 24, 2020

pacman -Sydd filesystem; pacman -Su works also.

@marler8997
Copy link

This broke ziglang's azure pipelines that use MSYS2. Tried @Biswa96 suggestion of downloading the filesystem package archive and installing from that, but it failed because it conflicted with the pre-existing filesystem package. @tomyri suggestion of force upgrading the filesystem pacakge with dependency checking disabled seemed to work.

see ziglang/zig#5688

amolenaar added a commit to gaphor/gaphor that referenced this issue Jun 24, 2020
@Jimmy-Z
Copy link

Jimmy-Z commented Jun 24, 2020

I'd like to re-post here that pacman -S dash before pacman -Syu is a simpler (and safer) workaround instead of force upgrade filesystem, as #2022 (comment).

@RobertBColton
Copy link

@Jimmy-Z that did not seem to work for me.

@Jimmy-Z
Copy link

Jimmy-Z commented Jun 25, 2020

@RobertBColton works on my desktop and my laptop. No idea why it doesn't work for you though. And, you should probably share some details, like which exact step doesn't work, and the output could help too.

@RobertBColton
Copy link

@Jimmy-Z Azure build below, we're checking it out fresh. It may look different because I keep committing different variations of what you guys propose here, nothing's cutting it though.
https://github.com/enigma-dev/RadialGM/pull/134/files#diff-3364e2ba7fdae37fba56fa0d6d765896R63

@jbruchon
Copy link

Manually installing the filesystem tar.xz worked for me.

@RobertBColton
Copy link

Is it necessary to download that tar for the fixes @Jimmy-Z and stuff mentioned?

@emptyVoid
Copy link
Author

@RobertBColton, you could possibly use the same workaround implemented in vcpkg -- remove it before making the core system upgrade (if you don't need dash of course), e.g.:

%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Rc dash
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syu
...

@RobertBColton
Copy link

Hey, that did do the trick! Thanks!

@Jimmy-Z
Copy link

Jimmy-Z commented Jun 25, 2020

@RobertBColton it could be that your system is too far behind that dash needs a newer filesystem, that again brought up the problem, you should be able to install dash afterwards I assume.

@DDoSolitary
Copy link

DDoSolitary commented Jun 25, 2020

I followed @Jimmy-Z's suggestion and the upgrade completed successfully. However, after that I can no longer run any msys executables (including bash, pacman, etc), getting the following error:

      0 [main] pacman (16444) shared_info::initialize: size of shared memory region changed from 51128 to 40888

pacman log:

[2020-06-25T20:08:57+0800] [PACMAN] Running 'pacman -S dash'
[2020-06-25T20:08:59+0800] [ALPM] transaction started
[2020-06-25T20:08:59+0800] [ALPM] upgraded dash (0.5.10.2-1 -> 0.5.11-1)
[2020-06-25T20:08:59+0800] [ALPM] transaction completed
[2020-06-25T20:09:03+0800] [PACMAN] Running 'pacman -Syu'
[2020-06-25T20:09:03+0800] [PACMAN] synchronizing package lists
[2020-06-25T20:09:07+0800] [PACMAN] starting core system upgrade
[2020-06-25T20:09:33+0800] [ALPM] transaction started
[2020-06-25T20:09:33+0800] [ALPM] upgraded filesystem (2020.02-2 -> 2020.02-3)
[2020-06-25T20:09:34+0800] [ALPM] upgraded msys2-runtime (3.0.7-6 -> 3.1.5-3)
[2020-06-25T20:09:34+0800] [ALPM] upgraded mintty (1~3.1.4-1 -> 1~3.2.0-1)
[2020-06-25T20:09:35+0800] [ALPM] upgraded msys2-runtime-devel (3.0.7-6 -> 3.1.5-3)
[2020-06-25T20:09:36+0800] [ALPM] upgraded pacman (5.2.1-6 -> 5.2.1-12)
[2020-06-25T20:09:36+0800] [ALPM] transaction completed

UPDATE

Strangely, after rebooting my computer it works without problems. I guess there's some background processes that I forgot to kill after the upgrade.

@trini
Copy link

trini commented Jun 25, 2020

It looks like the underlying problem has been resolved and you can go back to installing+updating as before. At least, my Azure CI jobs are once again completing and I re-ran the failed ones and they work now.

@emptyVoid
Copy link
Author

@DDoSolitary, have you tried killing gpg-agent and dirmngr with Task Manager, or restarting your PC?
This kind of messages usually appear when some of the MSYS2-spawned processes keeps running preventing the core system upgrade from completing.

@DDoSolitary
Copy link

@emptyVoid Yeah I think that is the problem. I got it working by restarting the computer.

@goyalyashpal
Copy link

is this fixed, can this be closed?

@Jimmy-Z
Copy link

Jimmy-Z commented Aug 24, 2023

I believe this was fixed by pr #2022

@Biswa96 Biswa96 closed this as completed Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests