-
Notifications
You must be signed in to change notification settings - Fork 25
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
CI: add a step which uninstalls all potentially left over packages #87
base: main
Are you sure you want to change the base?
Conversation
In case a previous run has been aborted mid-run, there might still be packages installed. Make sure we get back to the minimal state again.
@jeremyd2019 is this useful? |
I do install some extra packages on the arm runner setup too. |
ah, right, now I remember. hm |
Something like this? |
The incantation I usually use to remove left-over packages is |
I tried your script to get the
some of that is expected (since you used -clang instead of -toolchain), but notably the -*-git and -libc++ packages stand out, it appears that script doesn't handle |
hm, I guess I could expand the group in the array if wanted (pactree doesn't do groups which is why I went for clang only) |
MSYS2 Git is not normally needed. GfW is already installed. I'm not sure why I installed zip, but unzip can be avoided since I'm already (ab)using the bsdtar that comes with Windows to extract one zip file, may as well use it for that one too. A potential future reduction of pakages would be to switch from -toolchain to -cc (or -clang). See also msys2/msys2-autobuild#87
For the record, I removed Regardless, what concerns me about this is that when I tested the scriptlet it thought it needed to uninstall |
What has been kicking around in my mind is what |
Indeed, seems like a pactree bug |
# https://github.com/msys2/msys2-autobuild/pull/87#issuecomment-2125614088 | ||
KEEP+=($(pacman -Sgq mingw-w64-clang-aarch64-toolchain) "zip" "unzip" "vim" "etc-update" "psmisc") | ||
pacman -S --noconfirm --needed "${KEEP[@]}" | ||
TO_REMOVE=$(comm -23 <(pacman -Qq | sort) <(for tokeep in "${KEEP[@]}"; do pactree -ul "$tokeep" | sed 's/[<>=].*//'; done | sort -u)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TO_REMOVE=$(comm -23 <(pacman -Qq | sort) <(for tokeep in "${KEEP[@]}"; do pactree -ul "$tokeep" | sed 's/[<>=].*//'; done | sort -u)) | |
TO_REMOVE=$(comm -23 <(pacman -Qq | sort) <(pacman -Qq $(for tokeep in "${KEEP[@]}"; do pactree -ul "$tokeep" | sed 's/[<>=].*//'; done) | sort -u)) |
? pacman -Qq
seems to resolve provides
to the "real" package name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I don't know if sort -u
should be inside the $()
subshell too, or just at the end. I originally had it just inside, and comm was then unhappy that its input was not sorted anymore.
# XXX: this depends on marix.packages just being base+base-devel | ||
KEEP=("base" "base-devel") | ||
# https://github.com/msys2/msys2-autobuild/pull/87#issuecomment-2125614088 | ||
KEEP+=($(pacman -Sgq mingw-w64-clang-aarch64-toolchain) "zip" "unzip" "vim" "etc-update" "psmisc") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
KEEP+=($(pacman -Sgq mingw-w64-clang-aarch64-toolchain) "zip" "unzip" "vim" "etc-update" "psmisc") | |
KEEP+=($(pacman -Sgq mingw-w64-clang-aarch64-toolchain) "vim" "etc-update" "procps-ng" "psmisc") |
In case a previous run has been aborted mid-run, there might still be packages installed. Make sure we get back to the minimal state again.