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

Fix: [Actions] circumvent Windows tar warning about read-only files #8524

Merged
merged 1 commit into from Jan 8, 2021

Conversation

TrueBrain
Copy link
Member

Motivation / Problem

Our CI is almost completely clean of any warnings, except for something that is not in our own code base: "restore-cache" step on Windows for "run-vcpkg". This resolves that issue, by introducing a small hack.

Description

Windows tar returns "Can't unlink already-existing object" when
restoring a git clone with "restore-cache" operations. GNU tar
doesn't have this issue.

Limitations

  • This is clearly a hack, and upstream should fix this. But it has been months now, and no official reply .. so .. yeah ..

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

Because certain files are read-only, the "restore-cache" step
fails, as Windows tar refuses to overwrite those files (even
if they are identical). Instead of hoping upstream fixes
"restore-cache", just remove the read-only flag on these files
instead.
@TrueBrain TrueBrain changed the title Fix: [Actions] remove read-only flag from c:\vcpkg Fix: [Actions] circumvent Windows tar warning about read-only files Jan 8, 2021
@LordAro
Copy link
Member

LordAro commented Jan 8, 2021

I'd suggest raising an issue in lukka/run-vcpkg

@TrueBrain
Copy link
Member Author

I'd suggest raising an issue in lukka/run-vcpkg

See comments in the PR: I did :) He might fix it too, but for now this fixes our problem, I guess.

I did not link it in the PR, as it would cross-link that issue with this issue, and I don't see the value to anyone doing that. I did leave the solution in the thread, for others to find/use :) I just wish you could link another issue on GitHub without creating a cross-link .. it doesn't always add value (as it doesn't in this case).

@TrueBrain TrueBrain merged commit 4059ccf into OpenTTD:master Jan 8, 2021
@TrueBrain TrueBrain deleted the gha_windows_tar branch January 8, 2021 14:20
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

Successfully merging this pull request may close these issues.

None yet

2 participants