mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
cleaner: kill unnecessary perl elements
We shouldn't be packaging either `perllocal.pod` or `.packlist` files. Both are only really useful outside of package management. They get automatically generated whenever you install a Perl module. Debian, Arch, MacPorts & others remove them and we should have been as well really; keeping them causes completely unnecessary conflicts between formulae.
This commit is contained in:
parent
1244aa6ece
commit
202f793d8a
@ -1,6 +1,8 @@
|
||||
# Cleans a newly installed keg.
|
||||
# By default:
|
||||
# * removes .la files
|
||||
# * removes perllocal.pod files
|
||||
# * removes .packlist files
|
||||
# * removes empty directories
|
||||
# * sets permissions on executables
|
||||
# * removes unresolved symlinks
|
||||
@ -89,6 +91,14 @@ class Cleaner
|
||||
next
|
||||
elsif path.extname == ".la"
|
||||
path.unlink
|
||||
elsif path.basename.to_s == "perllocal.pod"
|
||||
# Both this file & the .packlist one below are completely unnecessary
|
||||
# to package & causes pointless conflict with other formulae. They are
|
||||
# removed by Debian, Arch & MacPorts amongst other packagers as well.
|
||||
# The files are created as part of installing any Perl module.
|
||||
path.unlink
|
||||
elsif path.basename.to_s == ".packlist" # Hidden file, not file extension!
|
||||
path.unlink
|
||||
else
|
||||
# Set permissions for executables and non-executables
|
||||
perms = if executable_path?(path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user