Age | Commit message (Collapse) | Author | Files | Lines |
|
All functions that are limited to the local translation unit are
declared static. This exposed that the _pkg_get_deltas declaration
in be_local.c was being satified by the function in packages.c which
when declared static caused linker failures.
Fixes all warnings with -Wmissing-{declarations,prototypes}.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
POSIX does not require PATH_MAX be defined when there is not actual
limit to its value. This affects HURD based systems. Work around
this by defining PATH_MAX to 4096 (as on Linux) when this is not
defined.
Also, clean up inclusions of limits.h and remove autoconf check for
this header as we do not use macro shields for its inclusion anyway.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Sync DB's no longer have an extracted directory, so remove the files check
for those. Local databases no longer have a 'depends' file, so kill that
check as well. Finally, do a little other cleanup and remove the need for
PATH_MAX.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
* Add a bunch of static declarations where possible
* Fix void functions to be proper syntax, e.g. void func(void)
* Consistency fixes (such as argv references)
* Remove dead str_cmp() function from testdb
* Remove unneeded config.h header includes
* vercmp: remove completely unnecessary string copying
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Follow the HACKING guidelines and always use != 0 or == 0 rather
than negation within conditional statements to improve clarity.
Most of these are !strcmp usages which is the example of what not
to do in the HACKING document.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Yes, it was that bad :P
We still have memleaks left because we cannot free the error data returned
by libalpm, but pacman has the same issue.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
http://bbs.archlinux.org/viewtopic.php?id=77396
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
libgen.h was used for basename() in function main() from src/util/testdb.c
string.h was used for strlen() in function output_cb() from src/util/testpkg.c
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
alpm_dep_compute_string
This patch introduces the following function name convention:
_compute_ in function name: the return value must be freed.
_get_ in function name: the return value must not be freed.
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Example usage and output :
> src/util/testdb -h
usage:
testdb [-b <pacman db>] : check the local database
testdb [-b <pacman db>] core extra ... : check the listed sync databases
> src/util/testdb
Checking the integrity of the local database in /var/lib/pacman/
> src/util/testdb core extra testing community
Checking the integrity of the sync databases in /var/lib/pacman/
missing dependency for archboot : bcm43xx-fwcutter>=006-2
missing dependency for xvattr : xfree86
missing dependency for eclipse-ve : eclipse<3.3
missing dependency for flumotion : twisted-web
missing dependency for gg2 : arts
missing dependency for man-pages-cs : groff-utf8
missing dependency for qc-usb : kernel26<2.6.26
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is more consistent with the private functions :
_alpm_db_get_{pkg,grp}cache
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
These two functions now take directly a package list rather than a database.
checkdbconflicts was renamed to checkconflicts.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
|
|
We were using the stat() system call in quite a few places when we didn't
actually need anything the stat struct returned- we were simply checking for
file existence. access() will be more efficient in those cases.
Before (strace pacman -Ss pacman):
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
33.16 0.005987 0 19016 stat64
After:
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
34.85 0.003863 0 12633 1 access
7.95 0.000881 0 6391 7 stat64
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Testdb will now scan the local database to check there are no conflicts.
I'm not sure how it's possible to get this situation. At least pacman
doesn't allow installing a package that conflicts with a local one, without
removing the local one. But maybe in a very weird situation, or because of
a bug, it could be possible. But anyway, this only requires 5 lines of
code.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
During last rebase where the checkdeps prototype changed, I messed up the
arguments order (remove list, then upgrade list). That made testdb totally
useless.
Also remove the newline that was manually added by the log callback.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Update the GPL boilerplate to direct people to the GNU website for a copy of
the license, as well as bump all of Judd's copyrights to 2007.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
checkdeps and resolvedeps now take both a remove list and an install list as
arguments, allowing dependencies to be calculated correctly.
This broke the sync990 pactest, but this pactest used dependencies and
provides in an unusual way, so it has been changed.
Dan: the sync990 pactest was just plain wrong. It didn't satisfy the
dependencies correctly, so should never have succeeded.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
[Dan: some variable renaming, clarification in commit message]
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Run the kernel's cleanfile script on all of our source files.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Instead of using the often-busted REQUIREDBY entries in the pacman database,
compute them each time they are required. This should help many things:
1. Simplify the codebase
2. Prevent future database corruption
3. Ensure when we do use requiredby, it is always correct
4. Shrink the pmpkg_t memory overhead
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
basename() is a rather untrusty function call on a lot of platforms as it
does some weird and different things. To solve this, I added a mbasename
fuction to pacman to take its place, and simply removed its usage in the
utilities (it isn't worth dealing with there).
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
The old code used only the depend.name in messages, which might have not
been informative. The new code uses the whole dependency string in
%DEPENDS% format.
(Dan: slight English clarification in one of the messages)
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We shouldn't use the _alpm prefix (copy-paste issue, no big deal).
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This reverts commit dfc85cb5f516ffbcff557522e9703c5c7d88b047
and b6f3fe6957d0206485eac98fb2120578b75d0058.
This DB check is already in testdb (among others).
Also testdb now uses the db path set at make time by default,
so specifying the db path is optional.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|