Duncaen
247463e359
tests: add two new tests for transaction_files
2019-06-18 19:54:22 +02:00
Duncaen
6877d28139
lib/package_find_obsoletes.c: remove in favor of transaction file checks
2019-06-18 19:54:22 +02:00
Duncaen
888289786b
tests: move file type change tests to obsolete files
2019-06-18 19:54:22 +02:00
Duncaen
bf4740040f
tests: Update package to meta moving files to dependency and replaces
...
https://github.com/void-linux/xbps/issues/12
2019-06-18 19:54:22 +02:00
Duncaen
c8ef119f4b
tests: enable debug flag in directory to symlink test
2019-06-18 19:54:22 +02:00
Duncaen
0efb59a979
lib/transaction_files.c: fix undefined behaviour
2019-06-18 19:54:22 +02:00
Duncaen
f45c6798c9
lib/transaction_files.c: update package archive compressions
2019-06-18 19:54:22 +02:00
Duncaen
f5e6d33c6e
tests: update test issue31
2019-06-18 19:54:22 +02:00
Duncaen
69e64e6c21
tests: enable test 'replace directory with symlink'
2019-06-18 19:54:22 +02:00
Johannes Brechtmann
514dca27ef
tests: update replaces file with directory
2019-06-18 19:54:22 +02:00
Duncaen
8a81f6ce86
lib/package_unpack.c: use transaction obsolete detection
2019-06-18 19:54:22 +02:00
Duncaen
658f87b9c5
lib/transaction_files.c: rework to remove obsoletes before unpacking
2019-06-18 19:54:22 +02:00
Duncaen
66e5b721ae
tests: obsoletefiles_test:reinstall_obsoletes add debug flag and different rv
2019-06-18 19:54:22 +02:00
Duncaen
2a9029b736
tests: fix tests; transaction detect if multiple packages install the same file
2019-06-18 19:54:22 +02:00
Duncaen
a19c659616
bin/xbps-install: add the transaction_file states
2019-06-18 19:54:22 +02:00
Duncaen
29f1433afd
lib/transaction_files.c: collect file installs/removals to correctly find obsoletes
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
Duncaen
c533f1bd52
tests: change the obsoletefiles tests to have the same mtime
...
This is required because the of reproducibility changes.
2019-06-18 19:54:22 +02:00
Juan RP
00d552424d
lib/repo.c: fix dead assignment.
...
Found by clang-analyzer.
Bug Summary
File: lib/repo.c
Warning: line 162, column 3
Value stored to 'rv' is never read
2019-06-18 18:49:29 +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
ab44f4ef80
lib/portableproplib/rb.c: fix dead initialization.
...
Found by clang analyzer.
Bug Summary
File: lib/portableproplib/rb.c
Warning: line 363, column 19
Value stored to 'grandpa' during its initialization is never read
2019-06-18 18:49:29 +02:00
Juan RP
6b84d75dc1
lib/transaction_dictionary.c: fix dead assignment.
...
Found by clang-analyzer.
Bug Summary
File: lib/transaction_dictionary.c
Warning: line 68, column 2
Value stored to 'rootdir_free_size' is never read
2019-06-18 18:49:29 +02:00
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
363f5a93de
lib/Makefile: disable pkgdb_conversion.c.
...
It was made many years ago to update the pkgdb format, but
it's innecessary to build it by default because is dead code.
Anyway keep it just in case pkgdb format changes.
2019-06-18 18:49:29 +02:00
Juan RP
fd88298755
lib/fetch/common.c: fix memleak in happy_eyeballs_connect.
...
Found by clang-analyzer.
Bug Summary
File: lib/fetch/common.c
Warning: line 587, column 4
Potential leak of memory pointed to by 'pfd'
2019-06-18 18:49:29 +02:00
Juan RP
d16a2fc987
xbps_init: fix a logic error.
...
Initialize rv to avoid a logic error.
Found by clang-analyzer.
Bug Summary
File: lib/initend.c
Warning: line 101, column 10
The left operand of '<' is a garbage value
2019-06-18 18:49:29 +02:00
Juan RP
87f7766c5f
xbps_symlink_target: fix two memleaks found by clang-analyzer.
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
d36d37fc6a
lib/external/fexec.c: fix potential insecure usage in vfork().
...
Reported by clang-analyzer.
After reading the linux man-pages vfork(2) manpage I came to the
conclusion that it's better to change the behaviour of the
original source (NetBSD) and change this to use fork(2).
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
7f141ca5d7
README.md: new section "Building and testing for dummies"
2019-06-17 22:28:01 +02:00
Duncaen
9a2a85d231
NEWS: fixup to add myself where I forgot
2019-06-17 20:34:31 +02:00
Duncaen
b677615565
NEWS: add my merged changes
2019-06-17 20:32:20 +02:00
Juan RP
53a672db54
README.md: proper order for compfmts.
2019-06-17 14:03:59 +02:00
Juan RP
1237e6eef7
README.md: mention test suite, proper credit, etc.
2019-06-17 13:58:49 +02:00
Juan RP
1fcb3c3f51
README.md: mention new 0.54 features.
2019-06-17 13:50:21 +02:00
Juan RP
c4c387484a
data/xbps.conf: fix typo.
...
Close #24
2019-06-17 13:32:49 +02:00
Juan RP
2f1d3d4013
NEWS: tyop xstd -> zstd
2019-06-17 13:08:46 +02:00
Juan RP
51d7e4cb27
NEWS: mention that xbps-rindex(1) defaults to zstd.
2019-06-17 13:07:16 +02:00
Juan RP
34c811faaa
NEWS: mention briefly all my changes for 0.54.
2019-06-17 13:05:11 +02:00
Juan RP
c7293f62bc
NEWS: mention my recent changes.
2019-06-17 12:28: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
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