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

Error during msys2_update #6

Open
jkburges opened this issue Oct 10, 2017 · 5 comments
Open

Error during msys2_update #6

jkburges opened this issue Oct 10, 2017 · 5 comments

Comments

@jkburges
Copy link
Contributor

I get the following error when running default recipe, with default attributes:

msys2_update("update MSYS2") do
  action [:run]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  declared_type :msys2_update
  cookbook_name :msys2
  recipe_name "default"
  only_if { #code block }
end

<snip>

STDERR: error: failed to commit transaction (conflicting files)
 ---- End output of C:/msys64/usr/bin/bash.exe -l -c 'cd '/' && pacman --sync --sysupgrade --refresh --noconfirm --noprogressbar' ----
 Ran C:/msys64/usr/bin/bash.exe -l -c 'cd '/' && pacman --sync --sysupgrade --refresh --noconfirm --noprogressbar' returned 1

I believe the root cause is the same as mentioned in msys2/MSYS2-packages#1024, but after reading that issue, I'm none the wiser as to what a "fix", or workaround, could be.

Any ideas?

@brholtkamp
Copy link
Contributor

brholtkamp commented Oct 12, 2017

Did you already have the recipe deployed on the machine that's attempting to update? Or is this occurring on the initial run?

Edit: Looked a little more into it. I guess your machine is in some sort of invalid state from Pacman's perspective. You can just run a force update (pacman -Syu --force), but if this keeps cropping up as a repeat issue, then we'll need to figure out the cause of it.

@wbowling
Copy link

Did you already have the recipe deployed on the machine that's attempting to update? Or is this occurring on the initial run?

It's running from scratch on a fresh machine each time and started failing around a week ago:

amazon-ebs: checking keyring...
amazon-ebs: checking package integrity...
amazon-ebs: loading package files...
amazon-ebs: checking for file conflicts...
amazon-ebs: coreutils: /usr/lib/coreutils/libstdbuf.so exists in filesystem
amazon-ebs: Errors occurred, no packages were upgraded.
amazon-ebs: STDERR: error: failed to commit transaction (conflicting files)
amazon-ebs: ---- End output of C:/msys64/usr/bin/bash.exe -l -c 'cd '/' && pacman --sync --sysupgrade --refresh --noconfirm --noprogressbar' ----

We disabled auto_update and ran the update with --force which completed successfully:

msys2_execute "update MSYS2 with force" do
   command ["pacman ", "-Syyuu", "--noconfirm", "--noprogressbar", "--force"]
end

Not sure why it suddenly started failing as I'm pretty sure there were no changes on our end

@brholtkamp
Copy link
Contributor

Yeah, I'm guessing it's a broken package on the MSYS2 end of things. I've personally had to fix a package upgrade myself with MSYS2, so it unfortunately isn't terribly shocking.

How long have y'all been running this cookbook before the error cropped up?

@jkburges
Copy link
Contributor Author

This is still happening FWIW. Changing https://github.com/brholtkamp/msys2-cookbook/blob/master/resources/update.rb#L11 to something like we're doing in our own recipe, e.g.

  msys2_execute 'update MSYS2' do
    command ["pacman ", "-Syyuu", "--noconfirm", "--noprogressbar", "--force", "--ask 20"]
  end

would probably fix it, but I'm not sure what the implications of those different options are, especially the --force one.

@brholtkamp
Copy link
Contributor

I honestly have no clue if --ask 20 is redundant with --noconfirm, but I don't think we'd want to have --force as a default as per the description on the man pages: https://www.archlinux.org/pacman/pacman.8.html. We could however, make it an option for the cookbook that y'all could add to the role so it won't require manual alteration and deployment of the cookbook on y'alls end.

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

3 participants