Age | Commit message (Collapse) | Author |
|
Existing implementation silently returns when an abstract package (with
no real package to back it) is requested to be installed.
E.g., package 'a' recommends unknown package 'dne' but installing 'dne'
succeeds even though no operation has taken place.
This change makes sure an error is returned during such install
operations. A package is deemed unkonwn if it is absent from repos
'repo_installed', 'repo_available', 'repo_preferred', 'repo_to_install'.
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
This patch adds a missing break in a switch case while parsing a
package's dependencies. This was causing a package's pre-dependency
to be added twice to the solvable, each time with a different marker.
Signed-off-by: Shruthi Ravichandran <shruthi.ravichandran@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Fix parameter list for callback to remove compiler warnings.
Signed-off-by: Bill Pittman <bill.pittman@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
Currently, packages specified with --add-exclude aren't registered at all
with libsolv. Because as far as libsolv is concerned they don't exist, if
an installation requires an excluded package, you get a less-than-ideal
message that "nothing provides" the excluded package.
Instead of pretending that they don't exist, instead utilize libsolv's
recent support for "blacklisted" packages. This changes the error output
to indicate that the excluded package "can only be installed by a direct
request"
Signed-off-by: Brandon Streiff <brandon.streiff@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
|
|
libsolv_solver_transaction_preamble
Currently, if the option for 'download first' is true, opkg will download packages even when noaction is set to false
Changing the function call to pass opkg_config->noaction instead of 0 will fix this behaviour
Signed-off-by: Zavaczki Raul <raul.zavaczki@ni.com>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
If package 'a' recommends package 'b' and 'a' is installed using
--no-install-recommends, any following operation will install 'b', since
the solver will detect that 'a' has a missing recommends.
Fixes bugzilla #13758
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Fixes bugzilla #13759
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Currently, when the solver fails opkg calls solver_problem2str, which
does an educated guess on what the main problem is, from a longer list
of problems. From the libsolv documentation:
* search for a rule that describes the problem to the
* user. Actually a pretty hopeless task that may leave the user
* puzzled. To get all of the needed information use
* solver_findallproblemrules() instead.
Call solver_findallproblemrules and print all problems instead.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
When the Replace/Conflict pattern is used to split a package [1], opkg is
configuring libsolv to return replace operations in two steps. This
works well for a package that is split in 2, but falls apart when a
package is split into more than 2 packages. Insted, instruct libsolv to
treat OBSOLETE operations as upgrades.
[1] https://www.debian.org/doc/debian-policy/ch-relationships.html
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Required to be able to process OBSOLETE operations as upgrades.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Signed-off-by: Yann CARDAILLAC <yann.cardaillac@smile.fr>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Add option to ignore specific recommended packages. On the libsolv
backed, this feature will only work on libsolv version > 0.7.2 [1].
[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_openSUSE_libsolv_issues_254&d=DwIBaQ&c=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA&r=wNcrL2akRn6jfxhHaKavUrJB_C9JAMXtynjLd8ZzgXQ&m=GObNHzFJpWpf_PripIrf-K2RhsktYdAUEieAJexXOKw&s=3G-meChUqClFggFPqsrAxIZBfLnRKIHm62Uuy1X6nQQ&e=
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Currently, the --no-install-recommends case doesn't set the flag
SOLVER_FLAG_INSTALL_ALSO_UPDATES, which causes inconsitent behavior
between installs with/without the flag. To be consistent, always set the
flag.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
If package A depends on B, and B is corrupted, if you install A, opkg
will try to install B, fail and continue installing A. Change logic to
abort the transaction on first failure. This is consistent with the
internal solver behavior.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Debian "Essential" field is being enforced at package removal time,
instead of at solve time. This is problematic, since other packages can
be removed before the Essential package is processed. For each installed
Essential package, add a job that will ensure the package will stay
installed (but upgradable).
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
package
The function pkg_hash_fetch_by_name_version is called to find the pkg
object that corresponds to the solvable returned by libsolv. The
matching is done using name and version, which is incomplete as there
might be several packages with the same name/version, but with different
architecture. Add architecture information to the comparision.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Since malloc.h is an extension to the language and is not available
on all systems (like BSD family), stdlib.h should be used instead,
which defines malloc function family.
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
If a Package index is stale, installations might fail, leaving the
status file with entries for missing packages. Those entries add
solvables that need to match specific versions, which is too
restrictive as newer versions of the same package are likely to satisfy
the dependency tree.
Fixes bugzilla #8351
(test case provided by Julia Cartwright)
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Given a system that have package 'a' installed, where both package 'a'
and 'b' Replaces/Conflicts/Provides 'v'. Installing package 'b' should
remove 'a' first. Currently, that operation is expressed as install b,
remove a, which end up running the maintainer scripts in the wrong
order. Add code to treat the Obsolete operation separetely, as a remove
a, install b.
bugzilla #11362
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Copy&pasted and modified opkg_solver_upgrade() and
libsolv_solver_execute_transaction() in
libopkg/solvers/libsolv/opkg_solver_libsolv.c to only print
the transaction.
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Removed unused include in opkg_cmd.c
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Limit comparison to package names when checking if a satisfied
dependency Provides is already installed. This enable upgrades of
installed packages that Provide virtual packages already installed.
fixes bugzilla 11826
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Use SOLVER_TARGETED libsolv flag on dist-upgrade operations to configure
libsolv to prefer an upgrade of the same package over an upgrade to a
package that replaces the targeted package.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
opkg_message(NOTICE, ....) logs to stdout, while opkg_message(ERROR,
...) logs to stderr. Logging from solver_printsolution is done via
printsolution_callback.
Fixes bugzilla #10407
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Fixes bugzilla #9060
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Previously, only installed providers were searched, which left out
providers that were already set to be installed.
fixes bugzilla #10781
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Will be use in is_provides_installed to check if a provider is installed
or if a provider is already set to be installed.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Currently this function is only checking for packages that provide
pkg_scout->name. However, if pkg_scout->provides_count == 2 (package
provides itself and only one virtual package), the check needs to be
extended to cover the package provided by pkg_scout.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
If package 'a' Provides 'd' and is installed, and 'b' also Provides 'd'
and is available, when:
opkg install 'd'
'd' should be able to be installed. The unnecessary
is_provides_installed check is currently incorrectly succeeding since it
only checks for providers that match the package name, instead of
also checking the Provides field of the package.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Currently, calculate_dependencies_for return values are being ignored
when called from calculate_dependencies_for. If a conflict is detected,
an error is reported, but the operation is allowed to continue.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
If package 'a' Provides X, and package 'b' Provides/Replaces/Conflicts
X, and 'a' is installed, installing 'b' fails, since 'a' is removed
twice.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Since every package provides itself, replacees were added two times to
the list of installed_replacees. Ensure there is no duplication.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
During targeted install/upgrade operations, also upgrade Recommends.
This is consistent with dpkg behavior.
Fixes bugzilla #9939
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Fixes bugzilla #10243
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
In a system that has package 'a' & 'b' installed, where package 'a'
recommends 'b', trying to install package 'c', which depends on 'd'
(which conflicts with 'b'), the expected behavior is for the package
manager to uninstall the recommended package 'b', then proceed to
install 'c' & 'd'. By making autoinstalled packages potentially removable,
libsolv will correctly remove installed recommended packages that
conflict with a to be installed package (or any of it's dependencies).
Fixes bugzilla 10777 (libsolv only)
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
The wildcards accepted for globs are '*', '?' and '[]'. For example:
opkg install 'a*' -> Installs all packages that start with 'a'
opkg install 'a-?' -> Installs all packages that start with 'a-'
and only have 3 characters
opkg install '[ab]*' -> Installs all packages that start with either
'a' or 'b'
Fixes bugzilla #9792
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
libsolv_solver_add_job
To be able to use globing during installs, opkg_solver_install needs to
parse the name & version from the command arguments.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
SS_HALF_INSTALLED state due to a previously failed installation.
Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
When using internalsolv, you can request to install/upgrade a virtual
package; that is, one that only exists as a 'Provides' name from another
package name but does not exist as a named package. This updates libsolv
to behave the same way.
Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Requires libsolv to be built with MULTI_SEMANTICS=ON (otherwise it will
use your system's default version semantics). I don't know if this
completely matches opkg's version comparison semantics, but it's at least
a lot closer than the RPM version that is used by default on many systems.
Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Fixes some consistency issues between libsolv and internalsolv messages
during install/remove/upgrade actions:
* Two (different) removal messages were printed with libsolv
* Add version to removal message shared by both libsolv and internalsolv
* Print the destination name on install/upgrade messages with libsolv
* Don't print install/upgrade messages when --download-only is used with
libsolv (matches internalsolv behavior)
Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Globs are supported on the opkg remove command on the internal solver.
This change adds support for the libsolv backend.
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
The current initializations triggers compiler warnings of the type:
warning: initialization makes integer from pointer without a cast
[-Wint-conversion]
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
The active_list abstraction has a long history in opkg. It's purpose
was to be a richer list type which, given information about a dependency
relationship, can use it to control order of traversal.
However, the "richness" of this data type has never been used. In fact,
as of commit d0c00a26eb ("active_list_add_depend: remove unused
function"), the interface used to specify dependencies was removed.
Get rid of the abstraction entirely by converting users to using the
basic list type.
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|
|
installed dependents
During removal processing, packages are added to the pkg_to_remove
vector even when the package being processed have installed dependents.
Move insertion after the has_installed_dependents check.
Fixes issue 9862
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
|