PackageManager: Converted cmdline interface to C