Software command line reference¶
lmi sw is a command for LMI metacommand, which allows to list and manage rpm packages and repositories on a remote host with installed OpenLMI software provider.
Note
Some operations dealing with many packages can be very time consuming. Especially with python implementation of software provider. C implementation [1], using PackageKit as a back-end, is slightly faster. However, the speed is noway near low level tools such as YUM, DNF, pkcon or RPM. Therefore be sure to optimize your queries before issuing them.
For example following commands:
- sw list
- sw list available
may result in several minutes of waiting depending on how many packages are available from enabled repositories. If you are interested in specific repository, the --repoid option will give you significant boost.
The rule of thumb is to shift as much package filtering logic from client side to server side as possible. The proper way to achieve this is with sw search command.
[1] | Available since openlmi-providers 0.6.0+. |
sw¶
System software management.
Usage:
lmi sw search [(–repoid <repository>)] [–allow-duplicates]
[(–installed | –available)] <package>...lmi sw list (–help | <what> [<args>...])
lmi sw show (–help | <what> [<args>...])
lmi sw install [–force] [–repoid <repository>] <package> ...
lmi sw install –uri <uri>
lmi sw update [–force] [–repoid <repository>] <package> ...
lmi sw remove <package> ...
lmi sw verify <package> ...
lmi sw enable <repository> ...
lmi sw disable <repository> ...
Commands:
- search
- Search packages. Produces a list of packages matching given package specifications (see below). All packages with name with given pattern as a substring will match. Allows filtering by repository. By default only newest packages will be printed.
- list
- List various information about packages, repositories or files.
- show
- Show detailed informations about package or repository.
- install
- Install packages on system. See below, how package can be specified. Installation from URI is also supported, it must be prefixed with –uri option.
- update
- Update package.
- remove
- Remove installed package.
- verify
Verify package. Files that did not pass the verification are listed prefixed with a sequence of characters, each representing particular attribute, that failed. Those are:
- S file Size differs
- M Mode differs (includes permissions and file type)
- 5 digest (formerly MD5 sum) differs
- D Device major/minor number mismatch
- L readLink(2) path mismatch
- U User ownership differs
- G Group ownership differs
- T mTime differs
- P caPabilities differ
- enable
- Enable one or more repositories.
- disable
- Disable one or more repositories.
Options:
- –force
- Force installation. This allows to install package already installed – make a reinstallation or to downgrade package to older version.
–repoid <repository>
Select a repository, where the given package will be searched for.
- –uri <uri>
- Operate upon an rpm package available on remote system through http or ftp service.
- –installed
- Limit the query to installed packages only.
- –available
- Limit the query just to not installed packages.
- –help
- Get a detailed help for subcommand.
Specifying <package>:
Package can be given in one of following notations:
- <name>
- <name>.<arch>
- <name>-<version>-<release>.<arch> # nvra
- <name>-<epoch>:<version>-<release>.<arch> # nevra
- <epoch>:<name>-<version>-<release>.<arch> # envra
Bottom most notations allow to precisely identify particular package.
sw list¶
List packages, repositories or files.
Usage:
lmi sw list all [–allow-duplicates]
lmi sw list installed
lmi sw list available [–repoid <repository>] [–allow-duplicates]
lmi sw list repos [–disabled | –all]
lmi sw list files [-t <file_type>] <package>
Commands:
- all
- List installed and available packages. Only nevra strings
will be shown which greatly speeds up the operation.
- installed
- List installed packages.
- available
- List available packages.
- repos
- List repositories. Only enabled ones are listed by default.
- files
- List files belonging to a package.
Options:
- –allow-duplicates
- Print all possible versions of package found. Normally only the newest version is shown.
- –repoid <repository>
- List just packages available in given <repository>.
- –all
- List all repositories.
- –disabled
- List only disabled repositories.
-t –type (file | directory | device | symlink | fifo)
List only particular file type.
sw show¶
Show details of package or repository.
Usage:
lmi sw show pkg [–installed | –repoid <repository>] <package>
lmi sw show repo <repository>
Options:
- –installed
- Do not search available packages. This speeds up the operation when only installed packages shall be queried.
- –repoid <repository>
- Search just this repository.