Skip to content

refactor: Use ShouldCopyPackage in Homebrew generator to skip redundant copies#16

Merged
frostyardyeti[bot] merged 1 commit intomainfrom
yeti/improve-a9b2
Mar 27, 2026
Merged

refactor: Use ShouldCopyPackage in Homebrew generator to skip redundant copies#16
frostyardyeti[bot] merged 1 commit intomainfrom
yeti/improve-a9b2

Conversation

@frostyardyeti
Copy link
Copy Markdown

@frostyardyeti frostyardyeti bot commented Mar 27, 2026

The Homebrew generator in internal/generator/homebrew/generator.go:59-76 always copies bottle files unconditionally using utils.CopyFile(). All other generators (deb, rpm, apk, pacman, sysext) use utils.ShouldCopyPackage() to check whether the file actually needs copying (same path, same size, same checksum). This means Homebrew regeneration always performs redundant I/O even when bottles haven't changed, which is especially wasteful in incremental mode or when the output directory already contains the bottles.


Automated improvement by yeti improvement-identifier

…opies

The Homebrew generator unconditionally copied bottle files even when
the destination already contained identical files. Use the same
ShouldCopyPackage check that all other generators use to avoid
redundant I/O during incremental regeneration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@frostyardyeti frostyardyeti bot merged commit 6e5938f into main Mar 27, 2026
1 check passed
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