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

remove orphaned packages #96

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

jeremyd2019
Copy link
Contributor

@jeremyd2019 jeremyd2019 commented Feb 18, 2025

pacman -Rns $(pacman -Qmq)

automake1.10 (removed)
automake1.6 (removed)
automake1.7 (removed)
automake1.8 (removed)
automake1.9 (removed)
crypt (removed)
libcrypt (removed)

plus, remove unowned files from /usr/bin (apparently added temporarily to work around issues but then never removed again)

automake1.10 (removed)
automake1.6 (removed)
automake1.7 (removed)
automake1.8 (removed)
automake1.9 (removed)
crypt (removed)
libcrypt (removed)

Signed-off-by: Jeremy Drake <[email protected]>
@jeremyd2019 jeremyd2019 force-pushed the remove-orphaned-packages branch from 10b1c64 to 1d474ba Compare February 18, 2025 05:50
@jeremyd2019 jeremyd2019 marked this pull request as ready for review February 18, 2025 05:55
@jeremyd2019 jeremyd2019 force-pushed the remove-orphaned-packages branch from 1d474ba to e076b11 Compare February 18, 2025 05:55
@dscho
Copy link
Member

dscho commented Feb 18, 2025

Just like I did in the sibling PR, I kicked off a git-artifacts run to verify that this can be safely merged.

@dscho
Copy link
Member

dscho commented Feb 18, 2025

Just like I did in the sibling PR, I kicked off a git-artifacts run to verify that this can be safely merged.

This run succeeded! 🎉

@jeremyd2019 I opened a companion PR over in git-sdk-arm64 and used the opportunity to add a commit to remove the unwanted /mingw32/ and /mingw64/ files, too. What do you think? Can we repeat that exercise in this here PR, too?

@jeremyd2019
Copy link
Contributor Author

jeremyd2019 commented Feb 18, 2025

It looks like this might remove a few files that are actually worth keeping here...

        deleted:    mingw32/etc/gitattributes
        deleted:    mingw32/etc/gitconfig
        deleted:    mingw64/etc/gitattributes
        deleted:    mingw64/etc/gitconfig
        deleted:    mingw64/share/man/man3/Git.3pm
        deleted:    mingw64/share/man/man3/Git.I18N.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Editor.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Fetcher.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Memoize.YAML.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Prompt.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Ra.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Utils.3pm

@jeremyd2019
Copy link
Contributor Author

jeremyd2019 commented Feb 18, 2025

Actually libxml2 was removed in #97, so etc/xml/catalog can go. I don't see any font stuff installed either, so the fontconfig cache can probably go too. Just git config files and git perl module man pages?

@jeremyd2019 jeremyd2019 force-pushed the remove-orphaned-packages branch 2 times, most recently from a2b65e7 to 280f001 Compare February 18, 2025 19:34
@dscho
Copy link
Member

dscho commented Feb 18, 2025

It looks like this might remove a few files that are actually worth keeping here...

        deleted:    mingw32/etc/gitattributes
        deleted:    mingw32/etc/gitconfig
        deleted:    mingw64/etc/gitattributes
        deleted:    mingw64/etc/gitconfig

Git for Windows moved it back to /etc/gitconfig (and upstreamed that change as git/git@fb5e337). Therefore, these files are not even used; Their presence is misleading.

        deleted:    mingw64/share/man/man3/Git.3pm
        deleted:    mingw64/share/man/man3/Git.I18N.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Editor.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Fetcher.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Memoize.YAML.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Prompt.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Ra.3pm
        deleted:    mingw64/share/man/man3/Git.SVN.Utils.3pm

If you download https://github.com/git-for-windows/pacman-repo/releases/download/2025-02-13T12-51-22.000Z/mingw-w64-x86_64-git-doc-man-2.48.1.1.2bd190bcd2-1-any.pkg.tar.xz (a regular git-sdk-64 checkout won't have those files, only mingw-w64-git-doc-html is installed, but not mingw-w64-git-doc-man because manual pages are somewhat at odds with a user-friendly experience on Windows, therefore Git for Windows does not ship them, only the HTML versions) you can verify that these files are not meant to be part of Git for Windows:

$ tar tvf mingw-w64-x86_64-git-doc-man-2.48.1.1.2bd190bcd2-1-any.pkg.tar.xz |
   grep Git
-rw-r--r-- root/root      9633 2025-02-13 12:00 mingw64/share/man/man3/Git.3pm.gz

It's not only that the manual pages are unwanted, the non-.gz-ed versions are not even meant to be part of a Pacman package.

So yes, all of those files can go.

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 jeremyd2019 force-pushed the remove-orphaned-packages branch from 280f001 to a2b9d0a Compare February 18, 2025 19:52
@jeremyd2019
Copy link
Contributor Author

It looks like this might remove a few files that are actually worth keeping here...

        deleted:    mingw32/etc/gitattributes
        deleted:    mingw32/etc/gitconfig
        deleted:    mingw64/etc/gitattributes
        deleted:    mingw64/etc/gitconfig

Git for Windows moved it back to /etc/gitconfig (and upstreamed that change as git/git@fb5e337). Therefore, these files are not even used; Their presence is misleading.

Off-topic here, but BTW, why does arm64 git-for-windows seem to want them in clangarm64/etc?

@dscho
Copy link
Member

dscho commented Feb 18, 2025

why does arm64 git-for-windows seem to want them in clangarm64/etc?

That's a bug. I remember you mentioning this elsewhere and I meant to split it out into a separate ticket. Will do so now.

@dscho
Copy link
Member

dscho commented Feb 18, 2025

why does arm64 git-for-windows seem to want them in clangarm64/etc?

That's a bug. I remember you mentioning this elsewhere and I meant to split it out into a separate ticket. Will do so now.

Done: git-for-windows/git#5431

@dscho
Copy link
Member

dscho commented Feb 18, 2025

I've started another git-artifacts run with the latest version of this PR branch; It's getting late over here, I'll probably come back to this PR tomorrow (hopefully being delighted by a simply successful run).

@jeremyd2019
Copy link
Contributor Author

It was in fact successful

@dscho dscho merged commit 798b234 into git-for-windows:main Feb 20, 2025
21 checks passed
@jeremyd2019 jeremyd2019 deleted the remove-orphaned-packages branch February 20, 2025 18:13
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.

2 participants