mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
opkg_manager: use system-update script if available
opkg has several problems with complex system updates, especially when
having to update itself and with the package ordering during update
To avoid hard coding the workarounds into neutrino, just call a script
named "system-update" (if available) instead of "opkg upgrade".
This script can be tuned to the specific target and its problems.
Origin commit data
------------------
Branch: ni/coolstream
Commit: fd9387a43c
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-01-29 (Sun, 29 Jan 2017)
------------------
This commit was generated by Migit
This commit is contained in:
committed by
vanhofen
parent
e687fe234f
commit
eb1874e7ed
@@ -11,7 +11,7 @@
|
||||
Adaptions:
|
||||
Copyright (C) 2013 martii
|
||||
gitorious.org/neutrino-mp/martiis-neutrino-mp
|
||||
Copyright (C) 2015-2016 Stefan Seyfried
|
||||
Copyright (C) 2015-2017 Stefan Seyfried
|
||||
|
||||
License: GPL
|
||||
|
||||
@@ -71,6 +71,11 @@
|
||||
#define OPKG_BAD_PATTERN_LIST_FILE CONFIGDIR "/bad_package_pattern.list"
|
||||
#define OPKG_CONFIG_FILE "/etc/opkg/opkg.conf"
|
||||
|
||||
/* script to call instead of "opkg upgrade"
|
||||
* opkg fails to gracefully self-upgrade, and additionally has some ordering issues
|
||||
*/
|
||||
#define SYSTEM_UPDATE "system-update"
|
||||
|
||||
using namespace std;
|
||||
|
||||
enum
|
||||
@@ -89,7 +94,7 @@ enum
|
||||
OM_MAX
|
||||
};
|
||||
|
||||
static const string pkg_types[OM_MAX] =
|
||||
static string pkg_types[OM_MAX] =
|
||||
{
|
||||
OPKG_CL " list ",
|
||||
OPKG_CL " list-installed ",
|
||||
@@ -614,6 +619,11 @@ bool COPKGManager::hasOpkgSupport()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (! find_executable(SYSTEM_UPDATE).empty()) {
|
||||
dprintf(DEBUG_NORMAL, "[COPKGManager] [%s - %d] " SYSTEM_UPDATE " script found\n", __func__, __LINE__);
|
||||
pkg_types[OM_UPGRADE] = SYSTEM_UPDATE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* If directory /var/lib/opkg resp. /opt/opkg
|
||||
does not exist, it is created by opkg itself */
|
||||
|
Reference in New Issue
Block a user