Commit Graph

66 Commits

Author SHA1 Message Date
44cd938115 Revert "Use shared LICENSE file for all xbps code."
This reverts commit be7d8cfaf1.

This commit missed some previous copyrights mentioned,
in general I think its better to have this per-file to
follow who wrote what and when.
2020-04-29 14:12:10 +02:00
be7d8cfaf1 Use shared LICENSE file for all xbps code. 2020-04-24 11:44:19 +02:00
9b695433a0 bin: sync usage and keep it consistent in all utils. 2020-04-20 21:25:14 +02:00
2d3ed8db19 bin/xbps-checkvers: align help text with spaces 2020-01-25 13:21:18 +01:00
cd0f81d68c bin/xbps-checkvers: list removed templates 2020-01-25 13:21:18 +01:00
34a1ab51d0 xbps-checkvers: version cache file.
We do not want obsolete files from previous versions, so that
we version the filename of that working version.
2019-12-27 18:23:46 +01:00
64aeabf3f6 xbps-checkvers: restore previous behaviour after 7a220b37db.
The '%n' pkgname fmt option still needs to be the sourcepkg
for xbps-src to work with no additional changes.

This restores previous behaviour, and uses binpkg's pkgname
while checking for pkgdb/repo.
2019-12-27 18:04:53 +01:00
7a220b37db xbps-checkvers: use binpkg's pkgname rather than srcpkgs.
Up until now `xbps-checkvers` would only check for the
real sourcepkg, this broke detection of binary packages
that are subpkgs.

Added a new test case.

Close #192
2019-12-27 12:24:16 +01:00
9ebe82fdc3 xbps-checkvers: fix a warning with glibc.
found by @q66

main.c:195:8: error: ignoring return value of 'fread', declared with attribute warn_unused_result [-Werror=unused-result]
2019-10-27 09:13:46 +01:00
1d460bc793 bin/xbps-checkvers: make distdir absolute
Fixes void-linux/xbps#133
2019-08-05 15:36:27 +02:00
9c300a93d1 bin/xbps-checkvers: fix --format long form 2019-06-21 00:32:30 +02:00
e083440b70 xbps-checkvers: always initialize repourl. 2019-06-19 14:00:54 +02:00
27634afd21 xbps-checkvers: change default output fmt to "%n %r %s %t %R". 2019-06-19 13:27:08 +02:00
0727d9a53a xbps-checkvers: implement --format %R (repository).
Close #128
2019-06-19 13:07:42 +02:00
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
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
1037a77000 xbps-checkvers: grow buffer if necessary instead of free/malloc for every file 2019-06-15 23:50:50 +02:00
323ca2f95a xbps-checkvers: cleanup and check strdup errors 2019-06-15 23:50:50 +02:00
49cc70de9a xbps-checkvers: rewrite check_reverts without malloc 2019-06-15 23:50:50 +02:00
e495f84954 xbps-checkvers: set rcv->fname when loading from cache 2019-06-15 23:50:50 +02:00
3805fd5297 xbps-checkvers: use proplib data structures and add cache file 2019-06-15 23:50:50 +02:00
26cc209225 xbps-checkvers: remove magic buffer and use fwrite for %t format 2019-06-15 23:50:50 +02:00
dfa6e80d13 xbps-checkvers: add %t format to get requested template name from path (ie subpackage) 2019-06-15 23:50:50 +02:00
db2eb29cbc xbps-checkvers: add --format 2019-06-15 23:50:50 +02:00
5dfaf5c075 xbps-checkvers: allow files argument to be paths or package name 2019-06-15 23:50:50 +02:00
f18cf87e3a xbps-checkvers: fix bug noticed by fixing another bug 2019-06-13 23:32:58 +02:00
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
0691054a59 xbps-checkvers: try to not see something like ${var##foo} as comment 2019-06-13 23:32:58 +02:00
204b9b630a xbps-checkvers: rewrite shell substitution without buffer guessing 2019-06-13 23:32:58 +02:00
5bed1a775c xbps-checkvers: make usage look more like all tools 2019-06-13 20:12:05 +02:00
597c0119dd xbps-checkvers: simplify print logic 2019-06-13 20:12:05 +02:00
abdd1047eb xbps-checkvers: use xbps_repo_store 2019-06-13 20:12:05 +02:00
a99283bcdb xbps-checkvers: add --manual flag to only process listed templates 2019-06-13 20:12:05 +02:00
79bffac877 xbps-checkvers: implement -s,--show-all.
This replaces -s,--show-missing. This now prints all processed packages
and outputs in the following format:

pkgname repover srcver

if `repover` or `srcver` can't be known, '?' is print.

Will be used in xbps-src soon. Thanks to @duncaen for ideas.

Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-13 20:12:05 +02:00
fc98779ad1 xbps-checkvers: forgot to set correct short opt in long opts. 2019-06-12 20:04:28 +02:00
d53f3243ce xbps-checkvers: added ability to ignore conf repos via -i.
-i,--ignore-conf-repos has been added.
The previous -i,--installed flag has been renamed to -I.

This breaks compat but we'll need to change buildbot anyway.

Signed-off-by: Juan RP <xtraeme@gmail.com>
2019-06-12 20:04:28 +02:00
f20032efa3 bin/xbps-checkvers: replace strncat with one snprintf 2019-03-22 19:14:08 +01:00
52d3077206 bin/xbps-checkvers: avoid infinite loops when checking reverts 2017-07-16 20:08:25 +00:00
a00c7b1c4b xbps-checkvers: add some assertions. 2015-12-21 16:51:24 +01:00
b4ef9954e7 Fix #120 by stripping comments from the end of lines.
The debug printing is also moved after variable substitution.
Now it prints:
  foo/template: _var foo
  foo/template: pkgname foo

It used to print:
  foo/template: _var foo
  foo/template: pkgname ${_var}
2015-10-31 16:49:55 +00:00
7ed6a8940f xbps-checkvers: print real errno returned by opendir(). 2015-08-17 15:51:41 +02:00
0d5385ad2b xbps-checkvers: fixed an endless loop with "reverts" containing extra alphanumeric chars. 2015-07-27 09:44:25 +02:00
fe3cb72a5b xbps-checkvars: add missing assertions after memory allocations 2015-05-10 21:17:39 +03:00
acb00d52e4 xbps-checkvers(8): fix manually added packages as arguments.
Regression introduced in the 0.44 changes.
2015-03-07 09:11:12 +01:00
38e71e8e1c xbps-checkvers: more fixes and new test cases.
- This now checks for vars that have refs to other vars:

	pkgname=${_myvar}

- This now checks for unwanted garbage before assignment:

	. ./source/file
	pkgname=${_myvar}

- Misc tweaks to use my coding style.
2015-02-17 10:20:59 +01:00
7cdba2ed14 xbps-checkvers(8): fixed segfaults with missing vars on templates. 2015-02-16 18:53:45 +01:00
d519ed3d15 xbps-checkvers: misc changes to fix issues I've found.
- Clear completely the rcv struct.
- Remove unapplicable free()a before assignment (wtf)
- Fix usage, -C expects a path to a directory not a filename.
- Remove obsolete xbps.conf handling, this is unnecessary (xbps.d(5)).
- Random tweaks after a quick inspection.
2015-01-22 18:44:39 +01:00
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
8d4a01baa4 bin/xbps-checkvers/main.c: CID 62712 (NULL pointer dereference) 2014-10-07 07:55:54 +02:00
eb0674376f bin/xbps-checkvers/main.c: CID 62711 (NULL pointer dereference) 2014-10-07 07:53:49 +02:00