Commit Graph

82 Commits

Author SHA1 Message Date
Thilo Graf
33135a5bc5 COPKGManager: generate a readable string for installation time 2016-03-03 09:52:18 +01:00
Jacek Jendrzej
7db16952f6 (performance) Prefer prefix ++/-- operators for non-primitive types 2016-02-16 13:02:10 +01:00
Thilo Graf
c9a2b46b3b COPKGManager: add define for feed setup, default disabled at the moment.
Is still not matured. User or Imageproviders should do this manually.
btw. : input window for paths or url's is limited and can't handle long names.
Rework of input window is required.
2016-02-16 09:39:05 +01:00
Stefan Seyfried
70b7f74362 replace __FILE__ with __file__ 2016-01-14 22:29:00 +01:00
Stefan Seyfried
fa05d6a415 fix debug output printf type warnings 2016-01-14 22:28:59 +01:00
Stefan Seyfried
0d6fd4c7d7 opkg_manager: make progress reports on startup more practical
Signed-off-by: Thilo Graf <dbt@novatux.de>
2016-01-05 15:06:18 +01:00
Stefan Seyfried
45707de09e opkg_manager: do not read package list twice on start
checkUpdates() already gets the package list and the list of
upgradables, so it is unnecessary to do this again immediately
afterwards.

Signed-off-by: Thilo Graf <dbt@novatux.de>
2016-01-05 15:06:18 +01:00
Stefan Seyfried
fb5265e0fa opkg_manager: explicitly clear pkg_map in destructor
Signed-off-by: Thilo Graf <dbt@novatux.de>
2016-01-05 15:06:18 +01:00
Stefan Seyfried
8f0e74a3bf opkg_manager: fix invalid match with -foo$ "regex"
Signed-off-by: Thilo Graf <dbt@novatux.de>
2016-01-05 15:06:18 +01:00
Stefan Seyfried
8578218c38 opkg_manager: do not put bad packages into package list
"bad" packages will be ignored later anyway, so to speed things
up and save memory, do not even put them into the package list.

Signed-off-by: Thilo Graf <dbt@novatux.de>
2016-01-05 15:06:18 +01:00
Stefan Seyfried
cb9ec38623 opkg_manager: tone down diagnostics in badpackage()
In case of many packages, it can take a very long time to output the
matches of badpackage() on a serial console, so only print them if the
verbosity is increased and remove unnecessary information.

Signed-off-by: Thilo Graf <dbt@novatux.de>
2016-01-05 15:06:18 +01:00
Stefan Seyfried
dd493eac8a opkg_manager: disarm checkSize() function
Signed-off-by: Thilo Graf <dbt@novatux.de>
You're right but opkg gives not really usable size values and nothing
about dependencies. Solutions are welcome.
2016-01-05 15:06:18 +01:00
Stefan Seyfried
fccb831b05 opkg_manager: disable "key_up" after updating packages
Signed-off-by: Thilo Graf <dbt@novatux.de>
I think too.
2016-01-05 15:06:18 +01:00
Stefan Seyfried
662433c0c3 opkg_manager: remove reboot and restart trigger files
Signed-off-by: Thilo Graf <dbt@novatux.de>
2016-01-05 15:06:18 +01:00
Stefan Seyfried
09d7361f42 opkg_manager: don't use hardcoded path
instead of "/var/tuxbox/config" use CONFIGDIR instead.

Signed-off-by: Thilo Graf <dbt@novatux.de>
2016-01-05 15:06:18 +01:00
Thilo Graf
bea8f5e980 COPKGManager: don't init if no opkg support available
This avoids creating of any basic configuration files or directories on
non opkg supported firmware releases.
2015-12-29 16:55:08 +01:00
M. Liebmann
182e6ae5d1 Fix & sort locale 2015-12-28 16:24:24 +01:00
Thilo Graf
92b579b3c6 opkg_manager.cpp: disable unused variable
avoid compiler error/warning
2015-12-28 14:08:10 +01:00
Thilo Graf
a9c549d0bf opkg_manager.cpp: add statement for local environment
TODO: detect available opkg binary
2015-12-28 14:07:55 +01:00
Thilo Graf
4f9a3df6c4 COPKGManager: lets see user install result in window 2015-12-28 12:13:51 +01:00
Thilo Graf
9345f792a7 COPKGManager: use config file for bad package detection
To detect bad packages, it must be existing a matching pattern list file.
Path is defined in OPKG_BAD_PATTERN_LIST_FILE.
This gives the option to filter some bad entries in the package listing menue.
NOTE: a sample file you should find here as : "/var/tuxbox/config/bad_package_pattern.list.sample".
If required, remove the ".sample" extension and change the entries for your requirements
2015-12-28 12:13:51 +01:00
Thilo Graf
696c70ae13 COPKGManager: show debug lines on founded bad packages
It seems some innocent packages could be filtered but without
plausible reason and this should be indicated.
2015-12-28 12:13:50 +01:00
Thilo Graf
7aafea5f5d COPKGManager: use opkg as binary name only, reduce support check deps
Some deps are currently not really required.
2015-12-28 12:13:50 +01:00
Thilo Graf
e1e8cb0142 CShellWindow/COPKGManager: rework shell shell mode handling
Modes were handled with bool values inside manager and this is not really
enough. Now we use the real parameters for more flexibility.
2015-12-28 12:13:50 +01:00
Thilo Graf
8edbbaddc0 COPKGManager: use strictly shell window object to execute commands 2015-12-28 12:13:50 +01:00
Thilo Graf
79f66537f0 COPKGManager: remove useless err_msg var, replaced by tmp_str 2015-12-28 12:13:49 +01:00
Thilo Graf
9a6aae8f49 COPKGManager: use parameters for errror message and additional text as option 2015-12-28 12:13:49 +01:00
Thilo Graf
f3d7bdda1e COPKGManager: show package info via message box instead shell window 2015-12-28 12:13:48 +01:00
Thilo Graf
ed5bbdc540 CShellWindow/COPKGManager: handle some error from shell output
TODO: add missing handlers
2015-12-28 12:13:48 +01:00
Thilo Graf
ae66014102 COPKGManager: defuse effect of resolve_conffiles errors 2015-12-28 12:13:47 +01:00
Thilo Graf
337cc097c8 COPKGManager: exit check size if package already installed
Old files will be remove during installation, so it should
be enough size.
2015-12-28 12:13:47 +01:00
Thilo Graf
54d3ad261c COPKGManager: use wildcard char for ar command
This fixes unpacking of local and downloaded packages.
2015-12-28 12:13:46 +01:00
Thilo Graf
ce3c4d3b04 COPKGManager: add functions isInstalled() and isUpgradable() 2015-12-28 12:13:46 +01:00
Thilo Graf
cceef62661 COPKGManager: optimize check size
To calculate the required size for installation here we make a quasi-dry run,
it is a bit awkward, but relatively specific, other solutions are welcome.
We create a temporary test directory and fill it with downloaded or user uploaded package file.
Then we unpack the package and change into temporary testing directory.
The required size results from the size of generated folders and subfolders.
TODO: size of dependencies are not really considered
2015-12-28 12:13:46 +01:00
Thilo Graf
0f1a6e7588 COPKGManager: add optional parameter force_configure to installPackage() 2015-12-28 12:13:46 +01:00
Thilo Graf
aad5db705f COPKGManager: add possibility to manage source feeds for packages
Feeds are saved in opkg config file.

NOTE:Existing config file will be overwrite, so must be reconfigured
via gui.
Source names are strictly numbered src 0...10 (maximmal 10 at the moment)

FIXME: input mask in keyboardinput class is too small for some adresses, large
address names are cutted and makes entries useless
2015-12-28 12:13:45 +01:00
Thilo Graf
ee56b75567 COPKGManager: ensure cleanup /tmp/.opkg after closing packet manager 2015-12-28 12:13:45 +01:00
Thilo Graf
14d21fdeec COPKGManager: use installPackage() for install from package list too
installPackage() has also a new parameter for options,
in this case is --force-reinstall in use.
2015-12-28 12:13:45 +01:00
Thilo Graf
55a027efbf COPKGManager: add methodes to get infos and status of packages 2015-12-28 12:13:45 +01:00
Thilo Graf
2ca1648070 COPKGManager: optimize memory check before install 2015-12-28 12:13:44 +01:00
Thilo Graf
28d17802d4 COPKGManager: show message on space error 2015-12-28 12:13:44 +01:00
Thilo Graf
19dc7ead2d COPKGManager: optimize error handling 2015-12-28 12:13:42 +01:00
Thilo Graf
9a4863173a COPKGManager: add more error handlers 2015-12-28 12:13:42 +01:00
Thilo Graf
9ae65d4ec5 COPKGManager: add function to check package size 2015-12-28 12:13:42 +01:00
Thilo Graf
7ada20de64 CFile: add filetypes for install and update packages 2015-12-28 12:13:41 +01:00
Thilo Graf
7520fee2ef COPKGManager: outsource methode for install any package
Required for external usage.
2015-12-28 12:13:41 +01:00
Thilo Graf
10debbbfa0 COPKGManager: optimize handling after installation
Show a success message only if restart/reboot is required and user
should decide what to do or not.
NOTE: marker file should be generated by opkg package itself
(eg. with preinstall scripts), so it's controlled by the package maintainer!
2015-12-28 12:13:41 +01:00
Thilo Graf
7acdf65e65 COPKGManager: defuse error message for duplicate cache option 2015-12-28 12:13:40 +01:00
Thilo Graf
a6f7043ab1 COPKGManager: add possibilty to check required size before install package 2015-12-28 12:13:40 +01:00
Thilo Graf
4909844ad6 COPKGManager: add member to handle line of shell lines
prepared for use as callback in shell window class, currently
it is not possible to get line output from shellwindow object, this
should help soon

also added ne locales
2015-12-28 12:13:40 +01:00