Skip to content

Conversation

@SorYoshino
Copy link
Contributor

Summary

Restructures uutils-coreutils to use dynamic shim generation instead of a hard-coded bin list, significantly improving maintainability and ensuring all supported utilities are automatically shimmed.

Related issues or pull requests

Changes

  • Remove the extensive, manually maintained list of shims from the bin field.
  • Implement a post_install script that executes coreutils.exe --list to dynamically discover and create shims for all available utilities.
  • Implement an uninstaller script to ensure all dynamically created shims are properly removed during uninstallation.
  • Switch to System.Diagnostics.ProcessStartInfo within the scripts to reliably capture command output in a headless environment.

Notes

  • Synchronization & Cleanliness: This approach solves the "ghost shim" problem. If a future version of uutils adds or removes a utility, the dynamic script will only create shims for what actually exists in the binary.
  • Architecture Aware: Different architectures (x64 vs. ARM64) might support different subsets of tools. By querying the binary at install time, we ensure the shims are accurate for the specific environment.
  • Maintainability: Reduces the manifest size by ~90%, making it significantly easier to audit and maintain.
  • Due to issues in certain logic within Scoop Core, errors may occur when updating or removing [.shim file.

Testing

The test results are as follows:
┏[ ~]
└─> scoop install Unofficial/uutils-coreutils
Installing 'uutils-coreutils' (0.6.0) [64bit] from 'Unofficial' bucket
Loading coreutils-0.6.0-x86_64-pc-windows-msvc.zip from cache.
Checking hash of coreutils-0.6.0-x86_64-pc-windows-msvc.zip... OK.
Extracting coreutils-0.6.0-x86_64-pc-windows-msvc.zip... Done.
Linking D:\Software\Scoop\Local\apps\uutils-coreutils\current => D:\Software\Scoop\Local\apps\uutils-coreutils\0.6.0
Running post_install script... Creating shim for 'coreutils'.
Creating shim for '['.
Creating shim for 'arch'.
Creating shim for 'b2sum'.
Creating shim for 'base32'.
Creating shim for 'base64'.
Creating shim for 'basename'.
Creating shim for 'basenc'.
Creating shim for 'cat'.
Creating shim for 'cksum'.
Creating shim for 'comm'.
Creating shim for 'cp'.
Creating shim for 'csplit'.
Creating shim for 'cut'.
Creating shim for 'date'.
Creating shim for 'dd'.
Creating shim for 'df'.
Creating shim for 'dir'.
Creating shim for 'dircolors'.
Creating shim for 'dirname'.
Creating shim for 'du'.
Creating shim for 'echo'.
Creating shim for 'env'.
Creating shim for 'expand'.
Creating shim for 'expr'.
Creating shim for 'factor'.
Creating shim for 'false'.
Creating shim for 'fmt'.
Creating shim for 'fold'.
Creating shim for 'head'.
Creating shim for 'hostname'.
Creating shim for 'join'.
Creating shim for 'link'.
Creating shim for 'ln'.
Creating shim for 'ls'.
Creating shim for 'md5sum'.
Creating shim for 'mkdir'.
Creating shim for 'mktemp'.
Creating shim for 'more'.
Creating shim for 'mv'.
Creating shim for 'nl'.
Creating shim for 'nproc'.
Creating shim for 'numfmt'.
Creating shim for 'od'.
Creating shim for 'paste'.
Creating shim for 'pr'.
Creating shim for 'printenv'.
Creating shim for 'printf'.
Creating shim for 'ptx'.
Creating shim for 'pwd'.
Creating shim for 'readlink'.
Creating shim for 'realpath'.
Creating shim for 'rm'.
Creating shim for 'rmdir'.
Creating shim for 'seq'.
Creating shim for 'sha1sum'.
Creating shim for 'sha224sum'.
Creating shim for 'sha256sum'.
Creating shim for 'sha384sum'.
Creating shim for 'sha512sum'.
Creating shim for 'shred'.
Creating shim for 'shuf'.
Creating shim for 'sleep'.
Creating shim for 'sort'.
Creating shim for 'split'.
Creating shim for 'sum'.
Creating shim for 'sync'.
Creating shim for 'tac'.
Creating shim for 'tail'.
Creating shim for 'tee'.
Creating shim for 'test'.
Creating shim for 'touch'.
Creating shim for 'tr'.
Creating shim for 'true'.
Creating shim for 'truncate'.
Creating shim for 'tsort'.
Creating shim for 'uname'.
Creating shim for 'unexpand'.
Creating shim for 'uniq'.
Creating shim for 'unlink'.
Creating shim for 'vdir'.
Creating shim for 'wc'.
Creating shim for 'whoami'.
Creating shim for 'yes'.
Done.
'uutils-coreutils' (0.6.0) was installed successfully!
'uutils-coreutils' suggests installing 'extras/vcredist2022'.

┏[ ~]
└─> Get-Command -CommandType All | Where-Object { $_.Name -match '^\[' }

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     [.exe                                              0.0.0.0    D:\Software\Scoop\Local\shims\[.exe

┏[ ~]
└─> arch --version
arch (uutils coreutils) 0.6.0
  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

@SorYoshino SorYoshino marked this pull request as ready for review February 4, 2026 16:30
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

All changes look good.

Wait for review from human collaborators.

uutils-coreutils

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate

Check the full log for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant