summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/sync.c
AgeCommit message (Collapse)AuthorFilesLines
2007-03-04* Maybe that call to _alpm_trans_update_depends was necessary. Added it backDan McGee1-1/+1
in but did it right by duplicating the package first.
2007-03-03Big commit this time:Aaron Griffin1-125/+130
* Moved entirely to alpm_pkg_get_* accessors, to read data on demand * Mostly removed the INFRQ_ parameters from outside the be_files backend (making the backend more extensible in the long run) * packages created from _alpm_db_scan now have the db and origin set (making accessors actually work for these packages) * removed _alpm_db_ensure_pkgcache * totally revamped the _alpm_checkconflicts function, making it cleaner and easier to read (and thus fix in the long run) - maintainable code ftw NOTE: feel free to rename the functions... I couldn't think of anything better * removed an extra loop in sync.c:find_replacements - no sense in looping over an entire DB while strcmp'ing the name, when we have get_pkgfromcache Other: * package struct "license" -> "licenses" * Created _alpm_sync_find (duplicate code in some places, find_pkginsync * Minor const correctness changes along the way * fixed a couple extra '/' pathing issues (non-issues really) * removed a duplicate pkg_cmp function
2007-03-01* Modified values of INFRQ_* options so we start at 0x01 and not 0x00. ThisDan McGee1-2/+2
allows for the same bit operators to be used across the board on pkg_get operations. * Changed name of INFRQ_NONE -> INFRQ_BASE to more clearly reflect what it does (loads pkg name and version). * Added a few missing things on package functions, such as SYMEXPORT and ALPM_LOG_FUNC. * Slight updates to pmenv to print 'pass' and 'fail' instead of 'passed' and 'failed'. Keeps output a bit more concise. * Fixed a doxygen comment spelling error. :P
2007-02-26* Enforce const char* params when using stringsAaron Griffin1-4/+4
* Unified some functions names "package" -> "pkg" for consistency * Removed the goofy 'faketarget' stuff used for dep testing * Renamed alpm_pkg_isin -> alpm_pkg_find * Renamed alpm_db_readpkg -> alpm_db_get_pkg
2007-02-23* Too much debugging output in the alpm_pkg_compare_versions functionAaron Griffin1-7/+13
* Using the wrong info level for replacements
2007-02-23* Modified the handling and output w.r.t. IgnorePkg entries. -Sy always ignoresAaron Griffin1-21/+23
these packages, but -S explicitly asks for confirmation.
2007-02-21* Re-added a compare function for syncpkg's - it was removed without thinkingAaron Griffin1-20/+23
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 **
2007-02-13* Refactored conflict checking within packages. Profiling from Dan showed anAaron Griffin1-2/+0
unbelievable amount of strcmp() calls (25 million) due to the list searching. This has been reimplemented with a set-intersection scheme, due to the fact that file lists are always ordered. - NEEDS TESTING * Minor clean up, "globalized" the str_cmp helper to match the alpm comparison signature, so we can use it elsewhere.
2007-02-07Cleanup and more debug info for alpm_pkg_compare_versionsAaron Griffin1-2/+1
2007-02-06Attempt to unify the -S and -Su version comparissons for when a package is newerAaron Griffin1-31/+3
See FS#5388
2007-02-04Implemented a crappy version of -Qu (query upgrades). This simply outputs theAaron Griffin1-13/+2
packages to be upgraded in a -Su operation. Much of the code is duplicated from sync.c. TODO: move the implementation to upgrades.c, and reimplement the sync_sysupgrade function in terms of this: trans->packages = alpm_get_upgrades();
2007-02-01* Minor output fix (move colon so it's not part of the URL)Aaron Griffin1-0/+7
* Added ldconfig on --sync operations too
2007-01-31Debug logging changes:Aaron Griffin1-22/+22
* 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.
2007-01-30K. Piche <kevin.piche@cgi.com>Aaron Griffin1-0/+19
* ALPM_LOG_FUNCTION macro and all the great work to add this macro everywhere
2007-01-30K. Piche <kpiche@rogers.com>Aaron Griffin1-5/+5
* gcc visiblity changes Also modified _alpm_versioncmp -> alpm_versioncmp (public function) as per K. Piche's suggestions
2007-01-30Discussed on IRC for a bit, this makes the following changes for clarity:Dan McGee1-7/+7
* alpm_list_is_in --> alpm_list_find * alpm_list_is_strin --> alpm_list_find_str * Flip parameters of both functions to be inline with rest of alpm_list. First commit, woohoo.
2007-01-24This mainly deals with code clarity- removing currently unneededAaron Griffin1-1/+1
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>
2007-01-19Preliminary checkin for alpm_list conversionAaron Griffin1-64/+64
* 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
2007-01-18Dan McGee <dpmcgee@gmail.com>Aaron Griffin1-1/+2
* 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
2007-01-03* bug fix FS#6100 - fix --print-uris outputAaron Griffin1-1/+2
2007-01-02* Missing error label in sync.cAaron Griffin1-0/+1
* Additional debug output for db_write
2006-12-29* Removed latest fix from TODO.autoconfAaron Griffin1-67/+81
* Attempted fix for FS#6100 - "-Spd foo" failure * Beginning of refactoring from Dan McGee <dpmcgee@gmail.com>
2006-12-22Cleanup from Dan McGee <dpmcgee@gmail.com> and Jürgen Hötzel ↵Aaron Griffin1-1/+1
<juergen@hoetzel.info> * configure swig check * misc libalpm cleanup
2006-12-01* Cosmetic changes and typo fixesAaron Griffin1-4/+5
* IgnorePkg and --ignore work again * Partial changes to support removal of conflicts for -U and -A (INCOMPLETE)
2006-11-24* Fixed some error output for "-Sd" and "-Rsc" dealing with missing/ignoredAaron Griffin1-2/+3
depends * Added valgrind suppression file
2006-11-22* Completed getinfo api changes (pmmissing_t, pmtrans_t, etc)Aaron Griffin1-10/+9
* 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-11-20* repo-add script - to add entries to a db file directly from package data ↵Aaron Griffin1-6/+27
(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
2006-11-15* Initial changes to gensync - makepkg changes were not checked in from anotherAaron Griffin1-12/+16
machine - still pending * Addition of _alpm_pkg_makefilename to simplify the with/without -ARCH prefix scheme we're going with for the interim
2006-11-14* has_archname changesAaron Griffin1-1/+1
* makepkg attempt at multiple file integrity checks * honor "force" option on -S packages (not just -Su)
2006-11-14* Numerous mini valgrind fixes.Aaron Griffin1-0/+1
* Addition of hacky architecture check in the _splitname function * Removal of libfetch from the archlinux proper - it has been renamed to libdownload and can be found at http://phraktured.net/libdownload * Merge of _some_ of the Frugalware makepkg change - this may still be incomplete * Removal of libftp from cvs proper * PKGBUILD manpage now says 'PKGBUILD' instead of FrugalBuild (he he)
2006-11-01Fixed pacman -U:Aaron Griffin1-1/+1
* Accidental database read of a file-based package (whoops) * Proper fetching of url-based -U or -A Removed some newlines from _alpm_log calls, to make debug output more concise
2006-10-31Numerous changes:Aaron Griffin1-14/+22
* 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.
2006-10-21Minor changes:Aaron Griffin1-2/+0
* Moved the pmhandle_t extern decl around * Fixed a doxygen complaint
2006-10-20A handful of minor changes:Aaron Griffin1-25/+25
* Removed the PMList typedef, in favor of the same naming scheme other structs use 'pmlist_t' * Added a time stamp on debug output, to make it more informational * Moved alpm_db_register to _alpm_db_register, making the public function not take a callback parameter
2006-10-15Merged frugalware changes (too many to list). Also added some config fileAaron Griffin1-59/+238
handling changes (support [sections] to carry over to included files - this helps with backwards compatibility with existing pacman config files)
2006-09-28removed libtar support in favour of libarchiveJudd Vinet1-15/+13
2006-05-15first stage of i18n stuff from VMiklosJudd Vinet1-50/+51
2006-03-09code cleanupAurelien Foret1-8/+0
2006-03-04added a FLAG_NOCONFLICTAurelien Foret1-35/+51
2006-03-02code cleanupAurelien Foret1-0/+1
2006-03-01added ERROR logs in case of malloc failures (patch from VMiklos ↵Aurelien Foret1-0/+4
<vmiklos@frugalware.org>)
2006-02-22improved _alpm_list_free handlingAurelien Foret1-1/+3
2006-02-22skipped conflict resolution for targets removed from transaction setAurelien Foret1-0/+5
2006-02-17prepend library function names with _alpm (helped with the patch from ↵Aurelien Foret1-73/+73
VMiklos <vmiklos@frugalware.org>) added log and event callbacks to sync_commit internal transactions
2006-02-17code cleanupAurelien Foret1-1/+1
2006-02-16- db_write: add support to write both local and sync entriesAurelien Foret1-7/+14
- code cleanup
2006-02-11- reworked debug messagesAurelien Foret1-24/+66
- synchro with pacman 2.9.8
2006-02-07code factorization: take 2Aurelien Foret1-2/+2
2006-02-07code factorizationAurelien Foret1-7/+7
2006-02-05- sync_prepare: fixed a case where a conflict should be removed from the ↵Aurelien Foret1-15/+32
target list - avoided possible duplicates in target list (patch from VMiklos <vmiklos@frugalware.org>) - added more debug logs