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.
|
# Cleans a newly installed keg.
|
||||||
# By default:
|
# By default:
|
||||||
# * removes .la files
|
# * removes .la files
|
||||||
|
# * removes perllocal.pod files
|
||||||
|
# * removes .packlist files
|
||||||
# * removes empty directories
|
# * removes empty directories
|
||||||
# * sets permissions on executables
|
# * sets permissions on executables
|
||||||
# * removes unresolved symlinks
|
# * removes unresolved symlinks
|
||||||
@ -89,6 +91,14 @@ class Cleaner
|
|||||||
next
|
next
|
||||||
elsif path.extname == ".la"
|
elsif path.extname == ".la"
|
||||||
path.unlink
|
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
|
else
|
||||||
# Set permissions for executables and non-executables
|
# Set permissions for executables and non-executables
|
||||||
perms = if executable_path?(path)
|
perms = if executable_path?(path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user