fingerprint icon indicating copy to clipboard operation
fingerprint copied to clipboard

should ignore device files

Open josephholsten opened this issue 6 years ago • 4 comments

I guess no one has actually attempted to take a fingerprint of a full system! But we'll want to ignore unusual file types like those in /dev:

/usr/local/Cellar/ruby/2.4.1_2/lib/ruby/2.4.0/find.rb:51:in `lstat': Bad file descriptor @ rb_file_s_lstat - /dev/fd/8 (Errno::EBADF)

And since there's no documented way to exclude files or file trees, I don't have a simple workaround either.

josephholsten avatar Oct 08 '17 20:10 josephholsten

What would make the most sense?

ioquatix avatar Oct 08 '17 20:10 ioquatix

I've always only taken a fingerprint of specific directories, e.g. /etc or /srv or specific directories that are being backed up - so you are right no one has tried to fingerprint / :D

ioquatix avatar Oct 08 '17 20:10 ioquatix

Yeah, I have been fighting a really strange issue that feels like an operating system bug. It doesn't present immediately after a clean wipe and re-install, nor immediately after I run my normal install scripts. But it remains when I remove all the things my install scripts are supposed in put in place. Crucially, it definitely isn't in any places a Reasonable Person would fingerprint: $HOME, /usr/local, /opt. So I'm literally trying to debug this issue by comparing the entire file system! It's the least pleasant debugging effort I've attempted in my 20 years of stupid *nix tricks.

I think an "exclude directory" setting is probably the least obnoxious thing to maintain, especially across platforms. I'm hoping that looks like just exposing Build::Files::Path#rm.

josephholsten avatar Oct 16 '17 05:10 josephholsten

Fingerprint was never designed to handle exclusion directories unfortunately, simply because it was always designed to fingerprint a specific directory completely. If you don't when you analyse it, it will mention that there are files which appear to be added.

Probably what makes the most sense is for fingerprint to actually handle device files correctly.

I'm not sure exactly what this should look like, but it probably wouldn't be too complicated.

ioquatix avatar Oct 16 '17 07:10 ioquatix