From e90c63d0d4557d1a7fa6f3c259440e28901e9e83 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 8 Feb 2015 00:22:33 +0100 Subject: [PATCH] opkg_manager: remove the dependency on opkg-key opkg-key does not work at all in standard installs (without gpg) and is not needed for package management. Slightly change the definition of opkg commands to not initialize with find_executable function at startup which seems bogus. --- src/gui/opkg_manager.cpp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index d4773c456..80f1cb38f 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -11,6 +11,7 @@ Adaptions: Copyright (C) 2013 martii gitorious.org/neutrino-mp/martiis-neutrino-mp + Copyright (C) 2015 Stefan Seyfried License: GPL @@ -51,8 +52,8 @@ #include #include -#define OPKG_CL find_executable("opkg-cl") -#define OPKG_KEY find_executable("opkg-key") +/* later this can be changed to just "opkg" */ +#define OPKG_CL "opkg-cl" enum { @@ -69,14 +70,14 @@ enum static const std::string pkg_types[OM_MAX] = { - OPKG_CL + " list", - OPKG_CL + " list-installed", - OPKG_CL + " list-upgradable", - OPKG_CL + " update", - OPKG_CL + " upgrade ", - OPKG_CL + " remove ", - OPKG_CL + " info ", - OPKG_CL + " install " + OPKG_CL " list", + OPKG_CL " list-installed", + OPKG_CL " list-upgradable", + OPKG_CL " update", + OPKG_CL " upgrade ", + OPKG_CL " remove ", + OPKG_CL " info ", + OPKG_CL " install " }; COPKGManager::COPKGManager() @@ -268,9 +269,13 @@ int COPKGManager::showMenu() bool COPKGManager::hasOpkgSupport() { - string deps[] = {OPKG_CL, OPKG_KEY, "/etc/opkg/opkg.conf", "/var/lib/opkg"}; + string deps[] = {"/etc/opkg/opkg.conf", "/var/lib/opkg", ""}; - for(size_t i=0; i