News for hackers. Stuff that matters.
Re:Dwarf Fortress starting during apt-get upgrade by pwdisswordfish on Wednesday August 16, 2017 @04:34AM (#15025872)
The real WTF is that APT spawns an external process to check disk usage, instead of invoking statvfs() on its own.

Some cases are less clear-cut, however. For example, the Debian 'nodejs' package installs node.js binary as /usr/bin/nodejs and not /usr/bin/node because it conflicts with another package: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614907#108

And let's not forget rename(1) from util-linux versus the Perl rename(1)...

Re:Dwarf Fortress starting during apt-get upgrade by phaemon on Wednesday August 16, 2017 @05:21AM (#15026064)
It isn't `apt`. See how they mentioned that `mysql` packages were installing? Well, in the `preinst` shell script, in the .deb, there is the line:

`if LC_ALL=C BLOCKSIZE= df --portability $DATADIR/. | tail -n 1 | awk '{ exit ($4>1000) }'; then`

There's `df` being called without the full path and that's what would be spawning Dwarf Fortress.

Re:Dwarf Fortress starting during apt-get upgrade by glandium on Wednesday August 16, 2017 @07:15AM (#15026565)
That doesn't make it much better though. Parsing the output of df (with a useless tail -1) is kind of awful when you can use something like stat -f -c %a.
Re:Dwarf Fortress starting during apt-get upgrade by MichaelBurge on Wednesday August 16, 2017 @08:31AM (#15026932)
That has the same problem, just with a different name. So your solution solves a style complaint, not an actual functional problem.
Re:Dwarf Fortress starting during apt-get upgrade by sslayer on Wednesday August 16, 2017 @11:49AM (#15028428)
I agree with your comment about it being functional. But wouldn't removing tail from the pipe remove complexity and speed up the processing(Arguably, most likely only by a small fraction)
Re:Dwarf Fortress starting during apt-get upgrade by linsomniac on Wednesday August 16, 2017 @09:36AM (#15027311)
How is the "tail -1" useless? The output of that df command is two lines, one contains the column headers and the next contains the data.
Re:Dwarf Fortress starting during apt-get upgrade by glandium on Wednesday August 16, 2017 @09:37AM (#15027315)
because `... | tail -n -1 | awk '{...}'` is the same as `... | awk 'END {...}'`.
Re:Dwarf Fortress starting during apt-get upgrade by lorenzhs on Wednesday August 16, 2017 @08:39AM (#15026976)
On the node thing: that decision has recently been reversed by the technical committee, effective in the next release (it is in unstable now). See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862051 - nodejs will now simply be 'node'.
Re:Dwarf Fortress starting during apt-get upgrade by orf on Wednesday August 16, 2017 @04:54AM (#15025959)
It could be called from a bash script rather than from within apt itself.