On Wed, Feb 22, 2012 at 06:33:19PM +1100, Marcus Furlong wrote: > If rpm support would be acceptable, I'd be happy to re-work the above > patch so that it checks for the existence of "dpkg-query" and/or "rpm" > and proceeds accordingly.
I'm open to supporting rpm in checkrestart but to do so it would be best to separate the dpkg and rpm calls into different functions and call one (or the other) based not on the existance of the dpkg-query or rpm binaries themselves (you can install the rpm software in Debian) but on wether you are running in an rpm or deb-based distribution. Since that differentiation might not be easy maybe it's better to just have the "use rpm" option available as a command line switch and have two different code paths: - No command line: go ahead using dpkg-query - Command line option enabled: use rpm instead Either case, it should check if the program it is going to run exists *before* using it (it currently does not do this for dpkg-query) and warn+abort otherwise (maybe with a suggestion to add/remove the option if the *other* package manage is found on the system checkrestart is running). Anyway, feel free to send a new patch to the BTS. I will try to consider it and include it in the next package release. Regards Javier
signature.asc
Description: Digital signature