summaryrefslogtreecommitdiff
path: root/lib/libalpm/handle.c
Commit message (Collapse)AuthorAge
* Remove unnecessary casts on malloc and elsewhereDan McGee2007-05-14
| | | | | | | | | We had many unnecessary casts, most of them dealing with malloc and other memory allocations. The variable type should take care of it; no need to do it explicitly. In addition, I caught a const error while removing the casts. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove FREEHANDLE macro and correctly type _alpm_handle_freeDan McGee2007-04-28
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove FREETRANS macro and correctly type _alpm_trans_freeDan McGee2007-04-27
| | | | | | Remove an unnecessary macro, and get rid of the void pointer. Signed-off-by: Dan McGee <dan@archlinux.org>
* Clean up gettext on the libalpm sideDan McGee2007-04-26
| | | | | | | Remove inclusion of libintl.h from all files, because we can do it once in util.c where the _() macro is defined. Signed-off-by: Dan McGee <dan@archlinux.org>
* * Fix group comparison issue and associated compilation warnings by usingDan McGee2007-03-11
| | | | | | | the alpm strcmp operation which takes void* references. * We had this great visibility patch, but never actually took advantage of it. Added the right compile flag to make it work and added some more SYMEXPORTs where necessary to have a successful compile.
* This commit looks much more monumental than it is. Almost all just #includeDan McGee2007-03-05
| | | | | | | | 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.
* * Fixed the handle realroot stuffAaron Griffin2007-03-04
| | | | * Added some {}
* * Fixed a whole mess of extra '/' pathing issues when a different root isAaron Griffin2007-03-04
| | | | | | | | | | | | | | specified * Use db->path when appropriate * Commented out the FAKEROOT checks in libalpm. This should never ever be done. TODO test this quite a bit, as this will never cause the transactions to fail if RW operations are requested... right now it is totally up to the front end to decide when to fail * Use realpath() to canonicalize the root path when specified, so _alpm_makepath() doesn't freak out * Fixed some output/indent of MDFile and SHAFile algorithms * More efficient sprintf() usage in MDFile/SHAFile * Added real error output to _alpm_makepath
* * handle changes: callbacks should check handle first, as there's a fewAaron Griffin2007-03-04
| | | | | | | | | 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
* * Re-added a compare function for syncpkg's - it was removed without thinkingAaron Griffin2007-02-21
| | | | | | | | | | | | | | | properly * Error when re-reading the DB for replacements, wrong info level * Removed an duplicate debug message "checking for package replacements" * Check ignorepkg for REAL upgrades... * Properly check the NOSAVE flag * some unlink_file (remove.c) cleanup * fix indent level on handle.c * Force libalpm paths to end with a '/' char * Fixed 'target' looping in conflict.c (pmsyncpkg_t, not pmpkg_t) * Added some debug output to cache and db scanning ** All pactest tests succeed again, yay **
* * Updated the README fileAaron Griffin2007-02-12
| | | | | * Removed the handle->needles param. It's not needed not that alpm_list_t is public
* Debug logging changes:Aaron Griffin2007-01-31
| | | | | | | | | | | | | | | | * The --debug params were goofy. New setup allows --debug without params, --debug=<level> where level 1=debug output, 2=debug and download output, 3=debug, download, and function tracing output. This seems more sane to me. * Removed PM_LOG_FLOW1 and PM_LOG_FLOW2. They were just confusing. When adding new functions, it is near impossible to determin if your output should be "flow1" or "flow2" without tracking all the way up the call chain. Rarely would one ever say "ok, lets just show "flow2" output. These have both been replaced with PM_LOG_DEBUG * Removed the need for the root parameter on alpm_initialize. it is now defaulted to PM_ROOT just like dbpath and cachedir. This allows alpm to be initialized BEFORE option parsing in the front end, saving us some duplicate variables in the frontend. * Cleaned up front end variables due to early alpm_initialize call.
* K. Piche <kevin.piche@cgi.com>Aaron Griffin2007-01-30
| | | | * ALPM_LOG_FUNCTION macro and all the great work to add this macro everywhere
* K. Piche <kpiche@rogers.com>Aaron Griffin2007-01-30
| | | | | | | * gcc visiblity changes Also modified _alpm_versioncmp -> alpm_versioncmp (public function) as per K. Piche's suggestions
* This mainly deals with code clarity- removing currently unneededAaron Griffin2007-01-24
| | | | | | | | | | optimizations in order to make the code much more readable and type-checkable. Every enum in the library now has it's own type that should be used instead of the generic 'unsigned char'. In addition, several #define statements dealing with constants were converted to enums. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* Preliminary checkin for alpm_list conversionAaron Griffin2007-01-19
| | | | | | | | | * renamed pmlist_t -> alpm_list_t * made alpm_list_t a public type (alpm_list.h header) * removed additional storage for registered DBs in pacman source * some code cleanup * removed duplicate (pm)list_display functions from pacman source * misc code cleanup
* Dan McGee <dpmcgee@gmail.com>Aaron Griffin2007-01-18
| | | | | | | | | | | | | | * Removed some unnecessary headers and library links * Made things static if possible * Cleaned up makefiles a bit * Fixed some old comments in the code * Fixed some errors the static code checker splint pointed out * Backwards arguments in a memset call in _alpm_db_read (could have been worse) * Other various small fixes Other: * Default to 80 columns when getcols cannot determine display width * Removal of ._install as a valid install file in packages
* Corrected -Rsc operation - dependancy info was not being read from the DBAaron Griffin2006-12-05
|
* * repo-add script - to add entries to a db file directly from package data ↵Aaron Griffin2006-11-20
| | | | | | | | | | (no PKGBUILD) * libalpm api changes - move from a _getinfo(p, WHAT_WE_WANT) scheme to a typesafe _get_what_we_want(p) scheme [not 100% complete yet] * some const correctness changes * removal of PM_* types in alpm.h in favor of the pm*_t types used throughout libalpm
* Numerous changes:Aaron Griffin2006-10-31
| | | | | | | | | | | | * Furthered the "lazy caching" to force the pkgcache to read nothing (INFRQ_NONE) by default. Anything requiring package data should now check the infolevel of each package and attempt to update it. This could be ironed out a bit more later (by using the front-end get_info function * Switched to libfetch. Drastic changes to the download code and the callback progress bar functions. Also fixed the return value of _alpm_downloadfiles_forreal. Downloading now supports http, ftp, https, and files urls, along with 'mtime's and numerous other fancy features from libfetch.
* More extern moving - keep extern decls in the headers makes for easier/betterAaron Griffin2006-10-21
| | | | reuse.
* Merged frugalware changes (too many to list). Also added some config fileAaron Griffin2006-10-15
| | | | | handling changes (support [sections] to carry over to included files - this helps with backwards compatibility with existing pacman config files)
* first stage of i18n stuff from VMiklosJudd Vinet2006-05-15
|
* added a debug logAurelien Foret2006-03-02
|
* the library must provide default values for main optionsAurelien Foret2006-02-20
|
* prepend library function names with _alpm (helped with the patch from ↵Aurelien Foret2006-02-17
| | | | | | VMiklos <vmiklos@frugalware.org>) added log and event callbacks to sync_commit internal transactions
* added a FAKEROOT define allowing to use pacman in a fakeroot enivronment ↵Aurelien Foret2006-01-21
| | | | (for tests purpose)
* removed handle/uid checks (CYGWIN)Aurelien Foret2006-01-07
|
* patch from VMiklos - use PACKAGE_VERSION instead of PACMAN_VERSIONJudd Vinet2006-01-02
|
* Fixed some memory leaks (patch from Essien Ita Essien <essiene@datavibe.net>)Aurelien Foret2005-12-28
|
* added PM_OPT_CACHEDIR library optionAurelien Foret2005-10-10
|
* Merging in recent fixes/additions from 2.9.7Judd Vinet2005-10-07
|
* Applied reworked patch from VMiklos (vmiklos@frugalware.org)Aurelien Foret2005-10-05
| | | | Close the lock file descriptor upon handle release
* reworked handle structure initializationAurelien Foret2005-04-16
|
* reworked dbpath handling to make it possible to use databases stored at ↵Aurelien Foret2005-03-28
| | | | different locations at the same time
* Fixed some typo...Aurelien Foret2005-03-18
|
* Removed unuseful getuid() callsAurelien Foret2005-03-18
|
* Renamed PM_RET_ERR to RET_ERR (no need for a PM_ prefix for internalAurelien Foret2005-03-16
| | | | defines).
* New ORE tagAurelien Foret2005-03-16
|
* Removed the "__" prefix from __pm_logcb and __pm_logmaskAurelien Foret2005-03-16
| | | | Not needed for library internal data
* Renamed PACXXX defines to PM_XXXAurelien Foret2005-03-16
|
* Initial revisionJudd Vinet2005-03-15