Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
ES 1.0.2 debian package fails on removing dirs when purged #5770
Purging package doesn't work in any way:
When /var/lib/elasticsearch exists and is a directory, it tries to rmdir /var/lib
When /var/lib/elasticsearch doesn't exist, it tries to remove it and fails:
When /var/lib/elasticsearch is a mounted partition, it tries to remove dir and fails at it:
It also should probably do same stuff *DB packages do: ask if you want to keep your data when purging package
what linux distribution did you try this on. The only call in question in the
It was install->uninstall on debian wheezy/sid (i installed 1.0.2 and realized I need older version so I purged it)
"failed to remove directory '/var/lib'" only occurs when directory above (in my case /var/lib) is also a mount:
but that is basically a bug in rmdir, it should just return silently, instead:
and it's some old bug, as I see same behaviour on old centos 5 systems
It works if directory exists but it will fail if it is a mounted partition.
It will also fail if directory was already removed (like admin first removing mount ,then purging package).
I think just ignoring exit code of rmdir should be fine.