-
Notifications
You must be signed in to change notification settings - Fork 3
Packages
Error codes across all arguments:
- 1: Success
- 0: Failed
- -1: Wrong number of arguments
- -2: Package not found
- -3: You need to run an updatedb first
root@xbian:~# xbian-config packages
Available arguments for module 'packages' are:
list info installtest install removetest remove progress status updatedb
Shows a list of all the categories of the different packages we offer or a list of the packages under a specific category.
root@xbian:~# xbian-config packages list
devel,1,1
kernel,7,1
net,1,1
utils,2,2
video,1,1
web,2,1
1: Category name
2: Number of packages available in this category
3: Number of packages installed in this category
root@xbian:~# xbian-config packages list web
download,0
webserver,1
1: Package name
2: Installed
Show some information about a certain package
root@xbian:~# xbian-config packages info webserver
name xbian-package-webserver
versionl 1.0
versionr 1.0
sized 806
sizei 1024
desc PHP + Apache webserver.
dep apache2, php5
name: Full package name
versionl: Locally installed package version
versionr: Remote available package version
sized: Download size
sizei: Installed size
desc: Full package description
dep: Full dependency list
The installtest simulates an apt install to pre-check for any errors. The normal install directive actually installs the package.
root@xbian:~# xbian-config packages install webserver
1
1: Package can be installed without problems
2: This package is already installed
3: Package version not found in apt repository
4: Package not found in apt repository
5: A newer version of this package is already installed
6: There is a size mismatch for the remote package
7: The package itself got an internal error
The removetest simulates an apt remove to pre-check for any errors. The normal remove directive actually removes the package.
root@xbian:~# xbian-config packages remove webserver
1
1: Package can be removed without problems
2: This package is not installed
3: This is an essential pacakge and cannot be removed
4: Package not found in apt repository
Checks if apt is still running after an install or remove
root@xbian:~# xbian-config packages install webserver
1
root@xbian:~# xbian-config packages progress
1
1: Apt is still running 0: Apt is not running
Just like the info directive but this only returns if a package is installed or not. This can be used together with progress. For example, we want to install the webserver that is not installed yet. We first let it install, then we check it's progress and also poll if the install status is already changed to installed.
root@xbian:~# xbian-config packages install webserver
1
root@xbian:~# xbian-config packages progress
1
root@xbian:~# xbian-config packages status webserver
0
root@xbian:~# xbian-config packages progress
1
root@xbian:~# xbian-config packages status webserver
0
root@xbian:~# xbian-config packages progress
1
root@xbian:~# xbian-config packages status webserver
1
root@xbian:~# xbian-config packages progress
0
root@xbian:~# xbian-config packages status webserver
1
When both the progress stopped running and the status returns the value you expected, you know a package is done installing/removing
Updates the remove and local apt database.
root@xbian:~# xbian-config packages updatedb
1
1: All necessary updates could where run 0: Not already necessary updates could be done