Commit Graph

82 Commits

Author SHA1 Message Date
Juan RP
6fe5bbc596 lib/transaction_ops.c: fix a dead assignment.
Found by clang-analyzer.

Bug Summary
File: lib/transaction_ops.c
Warning: line 274, column 4
Value stored to 'rv' is never read
2019-06-18 18:49:29 +02:00
Juan RP
b672e1a7f2
Improved "xbps auto-updating itself" behaviour.
Always check if there's a new xbps package version available
while *installing* or *updating* in any form.

This fixes the following scenario:

- xbps-0.53_10 is currently installed
- xbps-0.54_1 is available in repo
- xbps-install --update netbsd-wtf || xbps-install new-pkg || xbps-install --update

As expected any of the following scenarios in last cmd will use *this*
transaction to autoupdate xbps and its reverse dependencies.

Another transaction will be necessary to install or update the other unrelated
packages.

Added a new test case to verify this case and improve the other test
cases with more extensive checks.
2019-06-17 12:02:02 +02:00
Juan RP
c3b2d7ca53 libxbps: fix xbps autoupdate when its revdeps are up-to-date.
The current code was failing because while checking for updates
on its reverse dependencies, up-to-date versions were treated
as an error.

Added a new test case to verify that it works as expected.

Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-13 14:18:31 +02:00
Juan RP
108a165534 libxbps: try to update revdeps when installing or updating pkgs.
This fixes the cases where a pkg installation or update
could break its revdeps due to not satisfying dependencies.

When performing an install or update, xbps now always checks if
there are updates for its revdeps and get added to the transaction.

See the two new test cases for more information.
2019-05-14 23:34:53 +02:00
Juan RP
291faddf8c xbps now also updates revdeps of itself if there's an update.
Close https://github.com/void-linux/xbps/issues/77

Closes: #78 [via git-merge-pr]
2019-04-19 22:57:42 +02:00
Juan RP
cb857dfc27 Alternatives framework for xbps (2/2).
See xbps-alternatives(1) for more information.

Thanks to all who helped to design this and for fixing grammar in
the manual page.
2015-10-30 12:24:46 +01:00
Juan RP
8081751f86 libxbps: print in verbose mode what pkgs are added to the transaction.
Useful to know why a transaction cannot be completed when there are
unresolved reverse dependencies.

Requested by @chris2.
2015-09-02 18:56:20 +02:00
Juan RP
2216c84eca libxbps: continue updating all pkgs if xbps is uptodate. 2015-03-29 11:06:18 +02:00
Juan RP
83ade39960 xbps now autoupdates itself exclusively if there's an update.
That was added for 0.21, but for some reason that I cannot remember it was
disabled a bit later... looks like it's useful to have.
2015-03-29 09:56:28 +02:00
Juan RP
441f147f05 Fix reinstallation of pkgs in repolock mode.
At the time we've been searching for the pkg in a repo, no repos
were registered resulting in EINVAL. While here, if there's no
declared repos return ENOENT instead.
2015-03-05 21:23:58 +01:00
Juan RP
4922c808f4 Implemented feature #77 (Add package repository locked mode)
Close #77
2015-03-03 12:11:28 +01:00
Juan RP
0fc297a471 lib/transaction_ops.c: minor optimization. 2015-02-16 11:18:58 +01:00
Juan RP
d607655371 libxbps: globally check for unresolved reverse dependencies.
Close #46. See NEWS for more information.
2015-02-03 10:20:13 +01:00
Juan RP
076b3f8c44 libxbps: add pkgs on hold mode to the transaction, but ignore them.
Those are there mostly to be shown by the clients and notify that
there's an update in repos that is being ignored.

Idea by @chneukirchen.
2015-01-28 12:07:47 +01:00
Juan RP
5b522109f7 Replaced config/system {repo,preserve,virtualpkg}.d with a single directory.
See the NEWS file for more information.
2014-11-06 09:58:04 +01:00
Juan RP
627a5afaaf Make sure that automatic/manual installation modes are set as expected. 2014-10-20 07:59:06 +02:00
Juan RP
231582e671 libxbps: make sure to not add dups in transaction for remove. 2014-10-19 11:22:17 +02:00
Juan RP
fb868454b2 libxbps: make sure to not add dups in transaction for install/update. 2014-10-19 11:00:40 +02:00
Juan RP
ff189fd210 Replaced redundant dependency sorting code with a simpler implementation.
This fixes the issue found by "xbps-src bootstrap" when a package
without "provides" was declared as a virtual package.
2014-10-18 12:35:47 +02:00
Enno Boland
42f0152dce trans_find_pkg(): search for reverts match with correct pkgver 2014-09-28 22:22:20 +02:00
Enno Boland
50fb6c1605 rename xbps_pkgver_is_reverted to xbps_pkg_reverts 2014-09-23 13:54:06 +02:00
Enno Boland
cd9a9e78a8 lib/transaction_ops.c: trans_find_pkg will check the revert field too.
- if a package on the repo has a lower version than installed
  libxbps will check if this package reverts the one installed
  and downgrades to it if so.
2014-09-23 13:54:06 +02:00
Juan RP
c9514ad617 libxbps: fixed replaces/replace_vpkg test case. 2014-09-14 12:50:17 +02:00
Juan RP
30ea08e605 lib/transaction_ops.c: detect updates when an exact pkg version is set. 2014-09-11 11:13:20 +02:00
Juan RP
01dbb968dd Welcome pkgdb-0.38. 2014-09-11 00:12:12 +02:00
Juan RP
472f622f6f Finally fixed vpkg02 test (vpkg provider in transaction).
Rather than collecting dependencies for a pkg that has been added to the
transaction dictionary, do this for all pkgs in transaction once all
packages are already there.
2014-09-04 10:13:02 +02:00
Juan RP
7cef93ce07 Added support to replace vpkgs when the real pkgname matches any installed vpkg. 2014-08-22 12:44:18 +02:00
Juan RP
e35d2e9415 Revert "lib/transaction_ops.c: also check conflicts for pkgs without rdeps."
This reverts commit e308097af5.

package conflicts are checked in xbps_transaction_prepare() already.
2014-07-12 16:25:12 +02:00
Juan RP
e308097af5 lib/transaction_ops.c: also check conflicts for pkgs without rdeps. 2014-07-12 09:41:37 +02:00
Juan RP
61a1d33995 xbps-install(8): implemented single pkg updates without -u, --update.
The -u, --update is now only necessary to perform full system updates.

Close #35 (https://github.com/voidlinux/xbps/issues/35)
2014-05-27 11:33:45 +02:00
Juan RP
98a3723902 Respect installation mode also on reinstall (and downgrade). 2014-01-15 16:17:41 +01:00
Juan RP
f09eab62cd Fix #18. An ATF test-case will be imported in a while. 2013-11-01 18:05:11 +01:00
Juan RP
776b94e6bc Remove PackagesOnHold from xbps.conf; use xbps-pkgdb -m hold|unhold instead.
To put a package on hold mode:
	$ xbps-pkgdb -m hold foo

To unhold the package:
	$ xbps-pkgdb -m unhold foo

To list packages on hold mode:
	$ xbps-query -H

This also close #12 from github.
2013-08-12 14:46:54 +02:00
Juan RP
42c0766c00 Get rid of libfetch and proplib external dependencies.
The list of required external deps is now confuse, libarchive and openssl.

libxbps now includes a wrapper for proplib prefixed with xbps_ rather than prop_.
2013-06-20 10:26:12 +02:00
Juan RP
9d80524a34 Minor optimization: no need to check if obj is NULL, prop_object_type() does that already. 2013-06-14 12:22:29 +02:00
Juan RP
db1efb3aa6 Relax memory requirements on 64bit platforms; fix two memleaks. 2013-06-12 10:04:10 +02:00
Juan RP
dbf4bb184e xbps_transaction_remove_pkg: fix uninitialized argument value reported by scan-build. 2013-04-04 09:22:40 +02:00
Juan RP
0845d6cae3 xbps_transaction_remove_pkg: handle correctly target pkg. 2013-03-11 12:13:02 +01:00
Juan RP
50ea03df2a Revert code to update xbps independently; I'll use another way to implement this. 2013-03-08 09:44:57 +01:00
Juan RP
0a1859987a Respect automatic-install mode from pkgdb in transaction updates.
Also simplify register/unregister and remove useless state definitions.
2013-03-07 10:03:59 +01:00
Juan RP
37263d63c9 lib/transaction_ops.c: only call xbps_pkg_name() when it's really necessary. 2013-03-07 09:12:47 +01:00
Juan RP
7c1a0ac3e8 New pkgdb (0.21) and repo index (1.7) format, see NEWS for info. 2013-03-05 04:08:42 +01:00
Juan RP
9489f8a3dc Do not configure pkg if there's an update in transaction.
This fixes the following problem:

 - pkg is installed with state "unpacked".
 - There's an update of pkg in transaction.
 - xbps tries to configure the pkg because its state is "unpacked",
   therefore ignoring the update.
2012-12-20 12:08:55 +01:00
Juan RP
f45352dbf8 Added support for dynamic generation of revdeps for installed packages. 2012-11-30 17:40:52 +01:00
Juan RP
b9136c61c9 Use prop iterators when needed to retain the obj.
This could explain the strange issues seen in buildbot builds that
have been happening since 0.18; this should fix completely this.
2012-11-30 09:49:09 +01:00
Juan RP
63c1883201 Major API/ABI cleanup bringing performance improvements and fixes.
These are the core interfaces in the new API:

rpool - Interface to interact with the repository pool.
rindex - Interface to interact with repository indexes.
pkgdb - Interface to interact with local packages.
transaction - Interface to interact with a transaction.

This also brings new repository index format, making the index file
per architecture and being incompatible with previous versions.

The transaction frequency flush option has been removed, and due to
the nature of package states it was causing more harm than good.

More changes coming soon, but the API shall remain stable from now on.
2012-11-30 07:11:51 +01:00
Juan RP
16e18313da xbps_transaction: return proper errors if pkg is missing from repos. 2012-11-28 17:35:03 +01:00
Juan RP
1b217d1906 transaction_ops: shortest static function name. 2012-11-15 09:25:59 +01:00
Juan RP
58333419a0 Shell wildcard patterns can now be used in the PackagesOnHold option. 2012-11-11 16:11:40 +01:00
Juan RP
df0d5d7330 Get rid of pkg state half-unpacked; not-installed state is good enough. 2012-11-11 09:42:30 +01:00