summaryrefslogtreecommitdiff
path: root/src/util
AgeCommit message (Collapse)Author
2007-11-04Fix basename usage in pacman and utilitiesDan McGee
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>
2007-10-26Dependency error/log messages fixNagy Gabor
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>
2007-10-23One more added include to help compilation elsewhereDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-10util/testdb: fix up function namingDan McGee
We shouldn't use the _alpm prefix (copy-paste issue, no big deal). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-28Add 'full' parameter to alpm_pkg_loadDan McGee
In most cases, we want to fully scan a package when we load it, which serves as a integrity verification check. However, there are times when it is only desired to read the metadata and nothing else, so allow the caller of pkg_load to choose the behavior they need. This pays big dividends in speeding up pacman cache cleaning functionality. Old (729 packages): real 1m43.717s user 1m20.785s sys 0m2.993s New (729 packages): real 0m25.607s user 0m19.389s sys 0m0.543s Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-16Remove the DB consistency check from pacman and libalpm.Chantry Xavier
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>
2007-09-11Add testdb util for finding inconsistencies in the database.Chantry Xavier
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-11make alpm_strerror binding friendlyStefano Esposito
I'm currently working on python bindings for alpm written in pyrex. While working i found that declaring alpm_strerror as char * alpm_strerror (void) instead of char * alpm_strerror (int err) and then using pm_errno in the implementation instead of err, could make it more bindings-friendly. Dan: cleaned up and added void to declaration. Instead of replacing existing function, add a new function called 'alpm_strerrorlast(void)'. Signed-off-by: Stefano Esposito <stefano.esposito87@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-11Make some small changes recommended by splintDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-15src/util: Clean up headers and a few fixesDan McGee
Remove some unnecessary headers in the two utilities as well as fix a possible non-null termination issue in vercmp. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-16Remove unnecessary entries from .gitignore filesDan McGee
.gitignore works recursively, so we don't need Makefile and Makefile.in in all of the subdirectory .gitignore files. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09Remove logmask stuff from backend; switch logging callback to new pm_printfDan McGee
Remove the logmask functionality from the backend as it has been moved to the frontend, and change the logging callback function to use pm_printf. In addition, make much better use of va_list- use the args list instead of a arbitrarily chosen string to print to in the logging functions. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04Autotool clean up.Andrew Fyfe
* Add vim modeline to Makefile.am and configure.ac * Fix white space in Makefile.am and configure.ac * Add contrib/wget-xdelta.sh to EXTRA_DIST in Makefile.am Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Set the correct type on the log callback functionDan McGee
Somehow missed this earlier when changing everything to types. unsigned short -> pmloglevel_t wherever necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Add -pedantic flag to pacman (frontend) CFLAGSDan McGee
Now that we got rid of the ERR and WARN macros, compilation with -pedantic turned on works with only minor changes. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-27Move .cvsignore -> .gitignoreDan McGee
* Move all .cvsignore files to .gitignore for switch in VCS. In addition, delete ones that were unnecessary because they only contained Makefile and Makefile.am. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-12* Removed ${CFLAGS} from Makefile.am(s) as it was causing all CFLAGS to beDan McGee
duplicated. * Updated the util Makefile.am to link with the proper libalpm.la. * Fixed bitmasking issues in be_files.c and db.h. * Rankmirrors updates from James Rosten (with some cleaning up of my own). KeyboardInterrupts are now handled gracefully.
2007-03-05This commit looks much more monumental than it is. Almost all just #includeDan McGee
reordering and adding ones that were forgotten (noticed when trying to compile after reordering). * Updated the HACKING file to include information on #include usage. * print -> vprint in "making dir" function in pactest.
2007-03-04* handle changes: callbacks should check handle first, as there's a fewAaron Griffin
occasions where some alpm stuff could be used without initializing the library (vercmp is one). TODO make these functions (handle accessors) better by returning "library not initialized" instead of failing. * Removed NoUpgrade lines from pacman.conf - we need to test this! * Re-corrected the lib targets for src/util/* * make dist seems to have updated the po files
2007-03-04* libtool fixes for building against the right libsAaron Griffin
2007-02-22* A lot of Makefile.am updates to try to get 'make dist' and 'make distcheck'Dan McGee
to work as expected.
2007-02-12TODO update and .cvsignore additionDan McGee
2007-02-12Added 'testpkg' binary to test for validity of a package:Aaron Griffin
testpkg <package file>, returns 0 on success, 1 on failure failure will also output error messages to stdout
2007-02-09* Fix compile errors/warnings.Dan McGee
* Update .cvsignore files a bit.
2007-02-09* I made "alpm_versioncmp" public a while back, without noticing this was ↵Aaron Griffin
already done (alpm_pkg_vercmp). I dropped this change, making versioncmp "private" again. (alpm_versioncmp -> _alpm_versioncmp, hidden symbol) * Make alpm_get_upgrades use the same version check that -Su and -S use.
2007-01-30K. Piche <kpiche@rogers.com>Aaron Griffin
* gcc visiblity changes Also modified _alpm_versioncmp -> alpm_versioncmp (public function) as per K. Piche's suggestions
2007-01-29* Fix building outside $(srcdir).Jürgen Hötzel
* Removed ./gen-mirrorlist.sh invocation from configure script: Mirror-files are generated by make, not configure.
2006-11-23-std=c99 seems to undefine PATH_MAX in this case. I don't care enough to fix itAaron Griffin
at the moment, so this workaround works.
2006-11-22* Whoops util MakefileAaron Griffin
* Slight modification to depcmp debug output
2006-11-22* Completed getinfo api changes (pmmissing_t, pmtrans_t, etc)Aaron Griffin
* Modified some dependancy checking * Changed "performing local database upgrade" message to be more clear * Change 'usize' to 'isize' in database files * Scriptlet output is now sent to pacman's log file * Limited some debugging output to be more clear
2006-10-15Whoops, actually remove convertdb this timeAaron Griffin
2006-10-15Removed convertdbAaron Griffin
2006-10-15include changes so that this compilesAaron Griffin
2006-03-27added .cvsignore filesAurelien Foret
2006-02-22improved _alpm_list_free handlingAurelien Foret
2006-02-17prepend library function names with _alpm (helped with the patch from ↵Aurelien Foret
VMiklos <vmiklos@frugalware.org>) added log and event callbacks to sync_commit internal transactions
2006-02-07copyright updateAurelien Foret
2006-01-07code cleanup (mainly removed line spaces at the beginning of lines by ↵Aurelien Foret
tabulations)
2006-01-05- started to rename list_XXX calls to _alpm_list_XXXAurelien Foret
- fixed 2 compilation warnings
2005-12-31removed an uneeded call to strtrimAurelien Foret
2005-12-26renamed rpmvercmp to versioncmp, added some fixes from isteve@bofh.czJudd Vinet
2005-11-07removed the declaration of an unused variableAurelien Foret
2005-10-17added first part of the autoconf stuff - patch from Christian Hamar ↵Judd Vinet
<krics@linuxforum.hu>
2005-10-06Applied patch from Christian Hamar (krics@linuxforum.hu)Aurelien Foret
2005-03-15Initial revisionJudd Vinet