Bug#836950: pokerth-server: fails to purge: rm: cannot remove '/var/games/pokerth-server': No such file or directory
Andreas Beckmann
anbe at debian.org
Wed Sep 7 15:41:17 UTC 2016
On 2016-09-07 16:21, Markus Koschany wrote:
> I'm just wondering at the moment why ufoai-server is not affected by the
> same issue. Both packages, ufoai-server and pokerth-server, are very
> similar and both create their respective directories in /var/games in
> postinst for the first time.
Well, pokerth-server ships some hierarchy in the package (and creates
some bits of it in the postinst)...
> Why does postrm fail for pokerth but not
> for ufoai in your piuparts environment?
...Therefore dpkg removes the bits it knows about (including empty
directories) during package removal. The postrm purge comes later and
does not find the things it wants to clean up.
Your postrm (both packages) uses rm/rmdir in an unsafe way, requiring
some things to be present to succeed.
# rm -r /does/not/exist ; echo $?
rm: cannot remove '/does/not/exist': No such file or directory
1
# rm -rf /does/not/exist ; echo $?
0
# rmdir --ignore-fail-on-non-empty /nonexistant ; echo $?
rmdir: failed to remove '/nonexistant': No such file or directory
1
> Could you elaborate a little on Policy 7.2 and on what specific
> dependency pokerth-server should not rely?
A common error during postrm purge is to (unconditionally) call commands
that are not available (since packages were removed already). That
sentence from the bug template is irrelevant in your case.
Andreas
More information about the Pkg-games-devel
mailing list