* Count .DS_Store disk usage but not file count.
* Count symlink's own disk usage instead of ignoring it.
* Count hardlinks disk usage only once.
* Add testcase.
ClosesHomebrew/homebrew#50563.
ClosesHomebrew/homebrew#50566.
Signed-off-by: Xu Cheng <xucheng@me.com>
* Blocks writing of new files via accidental typos, etc, which the normal open("blah", "a") doesn't.
* Where files don't exist they should ideally be using `(buildpath/"dog").write` instead of open("blah", "a") already.
* It's a bit less cluttered looking if you need several writes to different files in the formula, IMO.
* Avoid parallel assignment.
* Use Pathname#size instead of File#size
* Use Pathname#directory? instead of File#directory?
* Use basename to check `.DS_Store`. Original regex has poor
performance, and may match with incorrect file.
A hyphen is not a valid character in a Ruby symbol, and the bottle
tag should be a valid Ruby symbol for its use in the bottle stanza.
ClosesHomebrew/homebrew#38235.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Change [a-z_]+(32)? to [-a-z0-9_]+
The Linuxbrew bottle tag is x86_64-linux.
ClosesHomebrew/homebrew#32687.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Currently, when called with one argument, dst is set to self, i.e. the
directory into which the source file should be moved.
When called with a second argument (for renames), dst is the full path,
including the basename, to the moved file.
Instead, let's always pass the full path, which means we can remove the
branching logic around computing dst.
As we know, files cannot be moved across filesystems atomically. In that
case, FileUtils.mv will make a copy. But if we create the temp file in
the same directory as the target, we can avoid this and use File.rename
directly.
Additionally, the rename should be the absolute last step, so that the
original file is preserved if altering ownership and permissions fails.
We need to install the helper module not just on `etc` but also on all
subdirectories of it too. Also, handle the case where we install
a subdirectory with etc.install.
ClosesHomebrew/homebrew#26145.