forked from git-for-windows/git-sdk-64
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Remove orphaned packages #35
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pacman -Rns $(pacman -Qmq) checking dependencies... Packages (7) automake1.10-1.10.3-5 automake1.6-1.6.3-4 automake1.7-1.7.9-4 automake1.8-1.8.5-5 automake1.9-1.9.6-4 crypt-1.4-1 libcrypt-2.1-5 Total Removed Size: 5.39 MiB :: Do you want to remove these packages? [Y/n] y :: Running pre-transaction hooks... (1/1) Removing old entries from the info directory file... :: Processing package changes... (1/7) removing crypt [################] 100% (2/7) removing libcrypt [################] 100% (3/7) removing automake1.9 [################] 100% (4/7) removing automake1.8 [################] 100% (5/7) removing automake1.7 [################] 100% (6/7) removing automake1.6 [################] 100% (7/7) removing automake1.10 [################] 100% This commit imitates git-for-windows@327913e2d18c Signed-off-by: Johannes Schindelin <[email protected]>
This trick was performed by: git -C / rm \ $(comm -23 \ <(git -C / ls-files usr/bin/\* | sort) \ <(git -C /var /lib/pacman/local/ grep ^usr/bin/ \*/files | sed -n 's,^.*:\(.*[^/]\)$,\1,p' | sort)) and imitates git-for-windows@e076b11ab107 Signed-off-by: Johannes Schindelin <[email protected]>
In `git-sdk-arm64`, there is little sense keeping these files around: They target a completely different CPU architecture. It looks like those files slipped through the cracks of 5f8de1d (Remove all mingw64 packages through pacman, 2022-12-19) and of c894534 (Remove all mingw32 packages through pacman, 2022-12-19). `pacman -R` would have missed those because: * I specifically retained some obsolete OpenSSL/libidn2 files (to allow an orderly upgrade to a newer versions that produce DLLs with different names, which would have broken git fetch and curl in the CI builds). However, I thought I had dropped these files in git-for-windows/build-extra@27f8403584 (Drop old OpenSSL and LibIDN2 files, 2020-01-09). I guess I should have checked... they're still there, even in `git-sdk-64` and `git-sdk-32`... * The way I had originally installed `asciidoctor` with the extensions that Git still required back then was really hacky: calling `gem install` in the `pre_install` function of the `mingw-w64-asciidoctor-extensions` package (for details, see git-for-windows/MINGW-packages' 728e0fe8d1 (asciidoctor: bundle requirements to build git doc, 2015-04-14)), and of course I had not thought of adding a corresponding `post_remove` function... Since we no longer install those now-obsolete packages, it should be safe to delete them and they shouldn't come back just like that. This trick was performed by: f() { comm -23 \ <(git -C / ls-files $1\* | sort) \ <(git -C /var/lib/pacman/local/ grep ^$1 \*/files | sed -n 's,^.*:\(.*[^/]\)$,\1,p' | sort) } f mingw | xargs -d '\n' -r git -C / rm Signed-off-by: Johannes Schindelin <[email protected]>
Just like in the sibling PR, I started a git-artifacts run manually, to verify that this is all safe and sound to merge. |
jeremyd2019
added a commit
to jeremyd2019/git-sdk-64
that referenced
this pull request
Feb 18, 2025
This repeats the exercise from git-for-windows#35, but excludes a few files that might actually be relevant: This trick was performed by: f() { comm -23 \ <(git -C / ls-files $1\* | sort) \ <(git -C /var/lib/pacman/local/ grep ^$1 \*/files | sed -n 's,^.*:\(.*[^/]\)$,\1,p' | sort) } f mingw | xargs -d '\n' -r git -C / rm git restore --staged mingw32/etc mingw64/etc mingw64/share mingw64/var Signed-off-by: Jeremy Drake <[email protected]>
jeremyd2019
added a commit
to jeremyd2019/git-sdk-64
that referenced
this pull request
Feb 18, 2025
This repeats the exercise from git-for-windows#35, but excludes a few files that might actually be relevant: This trick was performed by: f() { comm -23 \ <(git -C / ls-files $1\* | sort) \ <(git -C /var/lib/pacman/local/ grep ^$1 \*/files | sed -n 's,^.*:\(.*[^/]\)$,\1,p' | sort) } f mingw | xargs -d '\n' -r git -C / rm git restore --staged mingw32/etc mingw64/etc mingw64/share mingw64/var Signed-off-by: Jeremy Drake <[email protected]>
jeremyd2019
added a commit
to jeremyd2019/git-sdk-64
that referenced
this pull request
Feb 18, 2025
This repeats the exercise from git-for-windows#35, but excludes a few files that might actually be relevant: This trick was performed by: f() { comm -23 \ <(git -C / ls-files $1\* | sort) \ <(git -C /var/lib/pacman/local/ grep ^$1 \*/files | sed -n 's,^.*:\(.*[^/]\)$,\1,p' | sort) } f mingw | xargs -d '\n' -r git -C / rm git restore --staged mingw32/etc/git* mingw64/etc/git* mingw64/share Signed-off-by: Jeremy Drake <[email protected]>
jeremyd2019
added a commit
to jeremyd2019/git-sdk-64
that referenced
this pull request
Feb 18, 2025
This repeats the exercise from git-for-windows#35, but excludes a few files that might actually be relevant: This trick was performed by: f() { comm -23 \ <(git -C / ls-files $1\* | sort) \ <(git -C /var/lib/pacman/local/ grep ^$1 \*/files | sed -n 's,^.*:\(.*[^/]\)$,\1,p' | sort) } f mingw | xargs -d '\n' -r git -C / rm git restore --staged mingw32/etc/git* mingw64/etc/git* mingw64/share Signed-off-by: Jeremy Drake <[email protected]>
jeremyd2019
added a commit
to jeremyd2019/git-sdk-64
that referenced
this pull request
Feb 18, 2025
This repeats the exercise from git-for-windows#35 This trick was performed by: f() { comm -23 \ <(git -C / ls-files $1\* | sort) \ <(git -C /var/lib/pacman/local/ grep ^$1 \*/files | sed -n 's,^.*:\(.*[^/]\)$,\1,p' | sort) } f mingw | xargs -d '\n' -r git -C / rm Signed-off-by: Jeremy Drake <[email protected]>
jeremyd2019
added a commit
to git-for-windows/git-sdk-32
that referenced
this pull request
Feb 20, 2025
This repeats the exercise from git-for-windows/git-sdk-arm64#35 This trick was performed by: f() { comm -23 \ <(git -C / ls-files $1\* | sort) \ <(git -C /var/lib/pacman/local/ grep ^$1 \*/files | sed -n 's,^.*:\(.*[^/]\)$,\1,p' | sort) } f usr/bin | xargs -d '\n' -r git -C / rm f mingw | xargs -d '\n' -r git -C / rm Signed-off-by: Jeremy Drake <[email protected]>
This run failed, in the same way, and we're tracking the issue in #36. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are quite a few packages (and files that are not even owned by any package) that should be dropped from git-sdk-arm64. This PR does that. It closely imitates git-for-windows#96.
This closes #27.