From 9fbedd85bb595cb4069d3ab5a982f4e9c2b05f40 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 1 Mar 2016 16:54:26 +0000 Subject: [PATCH] opkg: compare-versions doesn't need any state compare-versions doesn't need lock files created and databases opened, so don't. Signed-off-by: Ross Burton --- libopkg/opkg_cmd.c | 6 ++---- src/opkg-cl.c | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c index c26e2c3..c823df8 100644 --- a/libopkg/opkg_cmd.c +++ b/libopkg/opkg_cmd.c @@ -1289,10 +1289,8 @@ static opkg_cmd_t cmds[] = { {"find", 1, (opkg_cmd_fun_t) opkg_find_cmd, PFM_SOURCE}, {"download", 1, (opkg_cmd_fun_t) opkg_download_cmd, PFM_DESCRIPTION | PFM_SOURCE}, - {"compare_versions", 1, (opkg_cmd_fun_t) opkg_compare_versions_cmd, - PFM_DESCRIPTION | PFM_SOURCE}, - {"compare-versions", 1, (opkg_cmd_fun_t) opkg_compare_versions_cmd, - PFM_DESCRIPTION | PFM_SOURCE}, + {"compare_versions", 1, (opkg_cmd_fun_t) opkg_compare_versions_cmd, 0}, + {"compare-versions", 1, (opkg_cmd_fun_t) opkg_compare_versions_cmd, 0}, {"print-architecture", 0, (opkg_cmd_fun_t) opkg_print_architecture_cmd, PFM_DESCRIPTION | PFM_SOURCE}, {"print_architecture", 0, (opkg_cmd_fun_t) opkg_print_architecture_cmd, diff --git a/src/opkg-cl.c b/src/opkg-cl.c index e73e042..c518bfc 100644 --- a/src/opkg-cl.c +++ b/src/opkg-cl.c @@ -391,7 +391,9 @@ int main(int argc, char *argv[]) !strcmp(cmd_name, "print-architecture") || !strcmp(cmd_name, "print_architecture") || !strcmp(cmd_name, "print-installation-architecture") || - !strcmp(cmd_name, "print_installation_architecture")) + !strcmp(cmd_name, "print_installation_architecture") || + !strcmp(cmd_name, "compare_versions") || + !strcmp(cmd_name, "compare-versions")) nocheckfordirorfile = 1; if (!strcmp(cmd_name, "flag") || @@ -400,8 +402,6 @@ int main(int argc, char *argv[]) !strcmp(cmd_name, "remove") || !strcmp(cmd_name, "files") || !strcmp(cmd_name, "search") || - !strcmp(cmd_name, "compare_versions") || - !strcmp(cmd_name, "compare-versions") || !strcmp(cmd_name, "list_installed") || !strcmp(cmd_name, "list-installed") || !strcmp(cmd_name, "list_changed_conffiles") || -- 2.25.1