Commit Graph

338 Commits

Author SHA1 Message Date
Duncan Overbruck
3199c3a227
tests: add missing configuration file 2022-02-06 20:05:45 +01:00
Duncan Overbruck
97bb1bd413
tests: add missing newline conf file test 2022-02-06 20:02:00 +01:00
Duncan Overbruck
14c762afeb
tests: xbps-query --list-repo test case with unsynced remote repos 2022-01-25 15:39:13 +01:00
Piotr Wójcik
ce4fd6a63c
xbps-query: list unavailable repositories in -L mode 2022-01-25 15:32:23 +01:00
Duncan Overbruck
f5355e53cd
xbps-query: add repo and pkgdb mode to --cat 2021-12-28 15:45:21 +01:00
Duncan Overbruck
3b28dc75e0
tests: add xbps-remove cache cleaning tests 2021-12-27 18:37:47 +01:00
Duncan Overbruck
a4063763c8
tests: fix test to check for the correct exit status
Previously xbps just ignored hold packages, now it will exit
with an error code in case there is a dependency conflict
with a held dependency since it would previously result
in inconsistent dependency state.
2021-10-23 16:18:27 +02:00
Duncan Overbruck
5eeff164bf
tests: add more hold package tests for #392 2021-10-23 16:14:43 +02:00
Duncan Overbruck
d992fd1617
tests: add some replace tests for transitional packages 2021-10-23 16:09:02 +02:00
Piotr Wójcik
ee2b5fb56f
tests: package with repolock as dependency 2021-09-10 14:40:02 +02:00
Érico Rolim
9e812c2d7e tests/xbps/xbps-digest: create tests. 2021-06-27 23:17:54 +02:00
Duncan Overbruck
62962208fd
lib/transaction_files.c: fix leaving behind obsolete directories
Deleting obsolete directories is different from deleting obsolete files,
files need to be deleted by the first package that might change the file
into a different file type.
Directories need to be deleted by the last package that removes files
out of the directory to avoid ENOTEMPTY if another package has a file in
the given directory which is uninstalled later.

This fixes #282.
2021-06-26 18:58:55 +02:00
Duncan Overbruck
d44aec4ecc
tests: add/enable unpacked/unpack-only tests 2021-06-26 18:47:25 +02:00
Duncan Overbruck
dc0dda15f6
tests: add test for various script actions
Closes: #410 [via git-merge-pr]
2021-06-26 18:41:37 +02:00
Duncan Overbruck
72395cdf80
tests: add test for configuration key/value formatting
Closes: #412 [via git-merge-pr]
2021-06-26 17:02:26 +02:00
Piotr Wójcik
4a5eb8dc87 tests: fix one case not using rootdir 2021-03-12 23:07:11 +01:00
Duncan Overbruck
93410bee7f
Revert "xbps_init: autodetect musl libc variant at compile time."
This reverts commit 7f75fd840a.
2021-02-04 22:41:21 +01:00
Duncan Overbruck
05ff04a0fb
tests: new test case for updating "unpacked" packages 2020-07-17 00:37:44 +02:00
Juan RP
7d8247ae56
Multiple changes to pkgs on hold mode.
- Added transaction stats for pkgs on hold.

- Always add packages on hold to the transaction dictionary,
  its type will be set to XBPS_TRANS_HOLD.

- Changed xbps_transaction_update_pkg() to have a new "force"
  bool argument to force an update with a pkg on hold.

- As discussed in #274 with @Duncaen the only way to update a
  pkg on hold is by using `-f`, i.e `xbps-install -f foo`.

Closes #265
Closes #274
2020-04-23 06:03:56 +02:00
Duncan Overbruck
7a1f5424f6
tests: add test case for explicit updates with repolock
Introduced from discussion in #273.
2020-04-22 12:18:09 +02:00
Juan RP
f906f5a83d xbps_register_pkg: keep stored props in pkgdb on updates.
I noticed that while updating a pkg that is on hold
or in repolock mode, does not keep those properties.

Always set those props in the new pkg dictionary to respect
this behaviour. If there's a pkg on hold and you update it,
you want to keep it in this state unless you tell it to change.

Added new test case to verify.
2020-04-22 12:00:26 +02:00
Juan RP
bd707acfee
repo: fix a double free with invalid repodata.
Fixes #248

Added new test case to verify.
2020-03-31 18:36:04 +02:00
Juan RP
0113b676ba
tests: rename transaction_check_revdeps to make .gitignore effective. 2020-03-31 12:32:31 +02:00
Duncan Overbruck
ffa5bea178
tests: add expected failure test case for cc alternatives removal 2020-03-25 14:37:31 +01:00
Piotr Wójcik
7b933a87a8 Testcase for xbps_transaction_check_revdeps regression #245 2020-03-06 06:58:35 +01:00
Juan RP
0005b3ecc0
tests: new test case for #234.
This checks that automatic-install obj in packages is properly
respected while performing recursive removal.
2020-02-22 08:42:58 +01:00
Juan RP
06c9891ae3 xbps_transaction_*: multiple performance improvements (v2).
This commit implements multiple performance improvements
to the transaction code:

- Don't process xbps_pkg_name() N times each time we access
  its package dictionary (via pkgdb or rpool), just do it once
  at xbps_pkgdb_init() time. At pkgdb init time, it just creates
  a property in pkgdb, "pkgname". At rpool time, each time a
  package is accessed, the "pkgname" string property is added.

- The package transaction dictionary contains the "transaction"
  object to know what's the pkg type. This has been changed to an
  uint8, this simplifies the logic and it's faster than checking
  a string object. See xbps_trans_type_t and xbps_transaction_pkg_type().

- Fixed the issue that was marked with XXX in transaction shlibs
  checking code. This has been fixed and improved and resources are
  now just freed as expected.

- Simplified random code all over the place, avoiding unnecessary
  allocations or operations.

- Rename some transaction files to have a better description.

This is my first rototill to the code in 2020.
2020-02-21 09:37:32 +01:00
Duncan Overbruck
0f61a1a5a2 lib/util_path.c: add some util functions to work with paths 2020-02-14 19:20:54 +01:00
Juan RP
fba65ad9da xbps_transaction_store: ensure no multiple versions.
This change ensures that no multiple versions of the same pkg
are added to the transaction; if a new version of the same
package is being added as a dependency, compare stored
and current and use the greatest one.

This fixes the recent issue seen in the aarch64 builders, where
two versions of the same package were added to the transaction.

Added a new test case.
2020-02-14 08:41:35 +01:00
Andreas Kempe
02c9cb11c4 configuration: add keepconf option
Add configuration option keepconf that stops xbps from overwriting
unchanged configuration files. If keepconf=true, xbps will store the new
configuration as <name>.new-<version> instead of overwriting unchanged
configuration files.
2020-02-08 21:06:04 +01:00
Juan RP
6010a24de6 libxbps: ABI/API break due to xbps_pkg{,pattern}_name changes.
The funcs xbps_pkg_name() and xbps_pkgpattern_name() were
using malloc(3) to return the result, until now.

They now have been changed to not allocate the result
via malloc, the caller is responsible to provide a buffer
at least of XBPS_NAME_SIZE (64).

If for whatever reason the pkgname can't be guessed,
returns false. This should avoid lots of small allocs
around libxbps.

New functions have the following prototype:

bool xbps_pkg_name(char *dst, size_t len, const char *pkg)
bool xbps_pkgpattern_name(char *dst, size_t len, const char *pkg)

as suggested by @duncaen.
2020-02-08 19:49:57 +01:00
Juan RP
397f2b86e1
tests: new alternatives test case by @CameronNemo.
The test case has been provided by @CameronNemo via #185.
This is expected to fail currently.
2020-02-07 09:55:36 +01:00
Juan RP
732a0e6bdf
alternatives: fixed replace_alternative_with_symlink test case.
Only 1 expected failure now!
2020-02-07 09:43:47 +01:00
Juan RP
94b56d7539
alternatives: do not remove symlinks if provider != target pkg.
This fixes the keep_provider_on_update test case, submitted
by @st3r4g via #219.

While checking for obsoletes make sure current provider
also matches the current target pkg.

Fixes #219
2020-02-07 09:16:57 +01:00
Juan RP
86ce5a2084
tests: new test case for alternatives by @st3r4g.
This currently reproduces the tar/bsdtar alternatives
issue that appeared recently in void.

This is expected to fail currently.

From #219
2020-02-07 07:51:01 +01:00
Duncan Overbruck
adebbf71e2
tests: add 3 new test cases for obsolete files with alternatives 2020-02-03 15:33:55 +01:00
Juan RP
749bdabc83
tests/alternatives: set atf_expect_fail for unfixed issue. 2020-02-03 09:58:57 +01:00
Johannes Brechtmann
354d45fca1 add test which replaces an alternative group with a symlink 2020-02-03 09:57:22 +01:00
Juan RP
5b43614e80
libxbps: fixed regression introduced in 0.58.
While looking for dependencies, we need to check
if xbps_rpool_get_pkg() returned a suitable match;
and then validate its result.

This fixes the update_and_install test case that
was reverted via #218.
2020-02-03 09:19:54 +01:00
Duncan Overbruck
8637269b38
lib/transaction_revdeps.c: fix provides/replaces #218
This reverts a change that solved another issue and marks the test case
for the other issue as expected failure.

The other issue is not as important as this, as it blocks updating a lot
of systems.
2020-01-31 16:32:44 +01:00
Duncan Overbruck
8698735939
tests: add testcase for libglnvd replaces/provides from issue #218 2020-01-31 16:28:41 +01:00
Piotr Wójcik
cd0f81d68c bin/xbps-checkvers: list removed templates 2020-01-25 13:21:18 +01:00
Juan RP
26b7864973 tests/hold: update hold_shlibs test case with exp behaviour. 2020-01-25 10:23:06 +01:00
Juan RP
76f8ca595b tests: rename downgrade_hold_test.sh to hold_test.sh.
Added new test case for https://github.com/void-linux/xbps/issues/215

This fails as expected right now because the fix is still
not there.
2020-01-25 10:23:06 +01:00
Duncan Overbruck
6794077efd
Add noextract configuration option
Closes #208
Fixes #165
2020-01-18 15:51:13 +01:00
Juan RP
ef9260a16e
libxbps: fix for vpkg providers in multiple repos.
Added new test case by @st3r4g via #206

Closes #206
2020-01-18 12:50:59 +01:00
Juan RP
5ff3ab5c60
transaction_revdeps: do not skip pkgs that are being updated.
Modified the test case with changes by @duncaen.

Closes #205
2020-01-18 08:58:54 +01:00
Juan RP
7ff9041f2a
tests: improved tests case for #205.
Again, can't reproduce the issue.
2020-01-12 05:03:54 +01:00
Juan RP
cb5b80711c
tests/install_test.sh: new test case by @duncaen via #205.
New test case written by @duncaen, with some tweaks from
myself to verify expected behaviour.

Close #205
2020-01-11 15:25:16 +01:00
Juan RP
4ddb335c8e
Revert "Tests for signing metadata"
This reverts commit d785e7e483.
2020-01-06 14:52:39 +01:00