Commit Graph

1254 Commits

Author SHA1 Message Date
Duncaen
7b728f5ac0 bin/xbps-remove: fix skipping executing orphans transaction 2019-06-26 22:24:47 +02:00
Juan RP
83aa486f6b
xbps-remove: skip trans if all pkgs were not found.
Restores behaviour with xbps<0.54.
2019-06-25 10:32:02 +02:00
Juan RP
41b2cec356
xbps-*: use xbps_pkgdb_update() correctly.
xbps-{alternatives,pkgdb,reconfigure}: xbps_pkgdb_update()
has been fixed to flush when told so, and we don't need
to update the in-memory copy because we are exiting.
2019-06-22 18:50:40 +02:00
Juan RP
58509996aa
xbps-install: skip trans if all pkgs are installed or uptodate.
Fixes an issue pointed out by @Johnnynator
2019-06-21 19:19:09 +02:00
Juan RP
13172c22fc
xbps-install: only print num of downloaded pkgs with -D. 2019-06-21 16:26:08 +02:00
Juan RP
589a96a50e
xbps-install: with -D there are no pkgs to install/update/configure/remove. 2019-06-21 16:06:42 +02:00
Juan RP
fe943eb7d2
xbps-install(1): added -D, --download-only.
Added `-D, --download-only` flag to allow downloading
packages to the cache without attempting to install them.

Contributed by Toyam Cox via #9

Adapted to master by yours truly.

Close #9
2019-06-21 15:57:25 +02:00
Juan RP
4f717dc597 xbps-install(1): added -I, --ignore-file-conflicts.
If set it will continue with the transaction and will
just print what are the conflicting files without returning
EEXIST.

This is a temporary solution for void where there are still
some packages with conflicting files (qt5-host-tools vs qt5-tools-devel).

With input by @duncaen
2019-06-21 15:31:04 +02:00
Juan RP
288cff37f8
xbps-install: return 0 if pkg is already installed or uptodate.
Before this change xbps-install could return EEXIST
when the package is already installed, or already up-to-date.

Return 0 if such condition happens, and only return EEXIST
if there's a file conflict.

Close #51
2019-06-21 11:06:45 +02:00
Duncaen
9c300a93d1 bin/xbps-checkvers: fix --format long form 2019-06-21 00:32:30 +02:00
Juan RP
2c6e0c28d4
xbps-checkvers.1: tweaks 2019-06-20 15:25:14 +02:00
Juan RP
071db09d3e
xbps-alternatives.1: proper credit. 2019-06-20 12:56:17 +02:00
Juan RP
6390817d7e
xbps-rindex.1: proper credit. 2019-06-20 11:44:45 +02:00
Juan RP
2df0778fcd
xbps-pkgdb.1: proper credit. 2019-06-20 11:42:30 +02:00
Juan RP
b0abcd4997
xbps-checkvers.1: proper credit. 2019-06-20 11:42:09 +02:00
Duncaen
ebb61edb16 bin/xbps-fetch: restore old behaviour for output file 2019-06-20 11:32:12 +02:00
Juan RP
e7738555b2
xbps-uhelper: restore compat.
Add 'digest' and 'fetch' actions again for compatibility,
but don't mention them in usage().

This way previous versions of xbps-src (that don't require xbps-0.54)
still work without changes.
2019-06-20 10:53:30 +02:00
Juan RP
e083440b70
xbps-checkvers: always initialize repourl. 2019-06-19 14:00:54 +02:00
Juan RP
2d1d6245b8
xbps-checkvers.1: update default fmt. 2019-06-19 13:30:57 +02:00
Juan RP
27634afd21
xbps-checkvers: change default output fmt to "%n %r %s %t %R". 2019-06-19 13:27:08 +02:00
Juan RP
0727d9a53a
xbps-checkvers: implement --format %R (repository).
Close #128
2019-06-19 13:07:42 +02:00
Juan RP
b12b72e151
xbps-install/state_cb.c: minor tweaks. 2019-06-18 21:17:44 +02:00
Duncaen
a19c659616 bin/xbps-install: add the transaction_file states 2019-06-18 19:54:22 +02:00
Duncaen
91e428d54d bin/xbps-create: record file size in files.plist 2019-06-18 19:54:22 +02:00
Juan RP
eddd2cd602 xbps-checkvers: stop abusing assert().
assert() must not change program behaviour.

It's unlikely that xbps_dictionary_set_cstring() fails, but even
so proplib will report it, so no need to run it via assert().
2019-06-18 18:49:29 +02:00
Juan RP
286193515c xbps-rindex/repoflush.c: pass correct filename to unlink(). 2019-06-18 18:49:29 +02:00
Juan RP
8018f53e0a xbps-rindex/repoflush.c: stop abusing assert().
assert() must not change the program behaviour.

Make sure fchmod() and rename() succeed properly and
fail gracefully otherwise.
2019-06-18 18:49:29 +02:00
Juan RP
042ab422b2 xbps-dgraph/main.c: simplify logic.
Thanks to clang-analyzer for reporting a dead assignment
that lead me to rework the logic.
2019-06-18 18:49:29 +02:00
Juan RP
5f68687cbb bin/xbps-install/main.c: fix dead assignment.
Found by clang-analyzer.

Bug Summary

File: bin/xbps-install/main.c
Warning: line 246, column 5
Value stored to 'rv' is never read
2019-06-18 18:49:29 +02:00
Juan RP
daf65b0767 bin/xbps-install/main.c: fix dead assignment.
Found by clang-analyzer.

Bug Summary

File: bin/xbps-install/main.c
Warning: line 259, column 5
Value stored to 'rv' is never read
2019-06-18 18:49:29 +02:00
Juan RP
0ee0aaa395 xbps-pkgdb/check_pkg_alternatives.c: dead store.
Reported by clang-analyzer.
2019-06-18 18:49:29 +02:00
Juan RP
b6a13945e0 xbps: restore default repodata compression format (gzip/zlib).
Any compression format from that list is supported without
additional changes: gzip, bzip2, lz4, xz, zstd.

This is for repository data and binary packages.

Close #122
2019-06-18 18:37:19 +02:00
Duncaen
3677986c7e bin/xbps-checkvers: store character returned by fgetc in int
The character has to be checked for EOF (-1), otherwise with
architectures that use unsigned char by default this breaks at
compile and runtime.

https://github.com/void-linux/xbps/issues/123
2019-06-18 15:04:47 +02:00
Juan RP
f5f7f6b5a3
xbps-rindex: fix comment, zstd is set by default. 2019-06-17 08:22:43 +02:00
Juan RP
6c1759862e
xbps-rindex: added --compression option and set zstd by default.
Multiple compression formats are now supported for repodata,
none, gzip, bzip2, xz, lz4 and zstd.
2019-06-17 07:24:05 +02:00
Juan RP
ab9a587d34
xbps-create: added support for lz4 and zstd compression formats. 2019-06-17 07:12:18 +02:00
Duncaen
1037a77000 xbps-checkvers: grow buffer if necessary instead of free/malloc for every file 2019-06-15 23:50:50 +02:00
Duncaen
323ca2f95a xbps-checkvers: cleanup and check strdup errors 2019-06-15 23:50:50 +02:00
Duncaen
49cc70de9a xbps-checkvers: rewrite check_reverts without malloc 2019-06-15 23:50:50 +02:00
Duncaen
e495f84954 xbps-checkvers: set rcv->fname when loading from cache 2019-06-15 23:50:50 +02:00
Duncaen
3805fd5297 xbps-checkvers: use proplib data structures and add cache file 2019-06-15 23:50:50 +02:00
Duncaen
26cc209225 xbps-checkvers: remove magic buffer and use fwrite for %t format 2019-06-15 23:50:50 +02:00
Duncaen
dfa6e80d13 xbps-checkvers: add %t format to get requested template name from path (ie subpackage) 2019-06-15 23:50:50 +02:00
Duncaen
db2eb29cbc xbps-checkvers: add --format 2019-06-15 23:50:50 +02:00
Duncaen
5dfaf5c075 xbps-checkvers: allow files argument to be paths or package name 2019-06-15 23:50:50 +02:00
Duncaen
8018833010 lib/fetch: add FORCE_IPV{4,6} environment variables 2019-06-15 19:19:40 +02:00
Juan RP
a9a889c54d fulldeptree: return a proper error if deps can't be resolved.
xbps_get_pkg_fulldeptree() now returns NULL and sets errno to ENODEV
when there are missing dependencies, rather than assert()ing.

Added another test case to check returned error codes.

Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-15 18:04:20 +02:00
Duncaen
f18cf87e3a xbps-checkvers: fix bug noticed by fixing another bug 2019-06-13 23:32:58 +02:00
Duncaen
684d2a7187 xbps-checkvers: only allocate if $ is in the current line
Before this commit, it would have seen $ from following lines
and thinks it needs to substitute variables.
2019-06-13 23:32:58 +02:00
Duncaen
0691054a59 xbps-checkvers: try to not see something like ${var##foo} as comment 2019-06-13 23:32:58 +02:00