Age | Commit message (Collapse) | Author | Files | Lines |
|
This was discussed and more or less agreed upon on the mailing list. A
huge checkin, but if we just do it and let people adjust the pain will
end soon enough. Rebasing should be relatively straighforward for anyone
that sees conflicts; just be sure you use the new return style if
possible.
The following semantic patch was used to do the change, along with some
hand-massaging in order to preserve parenthesis where appropriate:
The semantic match that finds this problem is as follows, although some
hand-massaging was done in order to keep parenthesis where appropriate:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression a;
@@
- return(a);
+ return a;
// </smpl>
A macros_file was also provided with the following content:
Additional steps taken, mainly for ASSERT() macros:
$ sed -i -e 's#return(NULL)#return NULL#' lib/libalpm/*.c
$ sed -i -e 's#return(-1)#return -1#' lib/libalpm/*.c
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This avoids needless breakage of the public API.
Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Read the package information for sync/local databases into a pmpkghash_t
structure.
Provide a alpm_db_get_pkgcache_list() method that returns the list from
the hash object. Most usages of alpm_db_get_pkgcache are converted to
this at this stage for ease of implementation. Review whether these are
better accessing the hash table directly at a later stage.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Perform the cheap struct and string setup of the local DB at handle
initialization time to match the teardown we do when releasing the handle.
If the local DB is not needed, all real initialization is done lazily after
DB paths and other things have been configured anyway.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
None of these warn at the normal "-Wall -Werror" level, but casts do occur
that we are fine with. Make them explicit to silence some warnings when
using "-Wconversion".
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Always declare a function with (void) rather than () when we expect
no arguements. Fixes all warnings with -Wstrict-prototypes.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This allows to very easily support non-color and linear mode, by just
setting the variables to an empty string, very much like it was done in
the bash script.
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
|
|
The deps walking code simply calls print_start, print, print_end, and
all the printing logic is handled there.
The unresolvable printing is disabled for now because it does not handle
linear mode, and the linear and color output will be re-written.
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
|
|
Use the bash script in contrib as the basis for a C rewrite using
libalpm. The speedup can go from dozens of seconds to less than one
second.
Colorized output is preserved.
The --graph option generates output that graphviz's `dot' utility will
understand to draw us a graph. Output is written to stdout and it is
left up to the user to pipe the data and determine the output
characteristics.
Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
|