[packages] Log unfamiliar package operations

- unknown operations get a warning
 - "source" will be added from netinstall shortly
This commit is contained in:
Adriaan de Groot 2020-02-18 12:02:16 +01:00
parent 056b0d7548
commit 7cadfb8ddd
2 changed files with 10 additions and 4 deletions

View File

@ -478,7 +478,10 @@ def run_operations(pkgman, entry):
else:
for package in package_list:
pkgman.install_package(package, from_local=True)
elif key == "source":
libcalamares.utils.debug("Package-list from {!s}".format(entry[key]))
else:
libcalamares.utils.warning("Unknown package-operation key {!s}".format(key))
completed_packages += len(package_list)
libcalamares.job.setprogress(completed_packages * 1.0 / total_packages)
libcalamares.utils.debug(pretty_name())

View File

@ -55,22 +55,25 @@ update_system: false
# that is in this configuration file).
#
# Allowed package operations are:
# - install, try_install: will call the package manager to
# - *install*, *try_install*: will call the package manager to
# install one or more packages. The install target will
# abort the whole installation if package-installation
# fails, while try_install carries on. Packages may be
# listed as (localized) names, or as (localized) package-data.
# See below for the description of the format.
# - localInstall: this is used to call the package manager
# - *localInstall*: this is used to call the package manager
# to install a package from a path-to-a-package. This is
# useful if you have a static package archive on the install media.
# The *pacman* package manager is the only one to specially support
# this operation (all others treat this the same as *install*).
# - remove, try_remove: will call the package manager to
# - *remove*, *try_remove*: will call the package manager to
# remove one or more packages. The remove target will
# abort the whole installation if package-removal fails,
# while try_remove carries on. Packages may be listed as
# (localized) names.
# One additional key is recognized, to help netinstall out:
# - *source*: ignored, does get logged
# Any other key is ignored, and logged as a warning.
#
# There are two formats for naming packages: as a name or as package-data,
# which is an object notation providing package-name, as well as pre- and