Commit Graph

74 Commits

Author SHA1 Message Date
Aaron Griffin 7f5dada885 Big commit this time:
* 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-03 08:13:59 +00:00
Aaron Griffin ca139e9850 * Comment clarification 2007-03-01 07:08:48 +00:00
Aaron Griffin 3ebd125e1a * Switched some functions to alpm_pkg_get_* usage as I came across them
* Added some provision switching hackery.  This could probably use some
  refactoring,.. it solves the following case:

    pkg1 and pkg2 provide 'foo' and are both installed
    pkg3 depends on 'foo' and so lists 'pkg1' in the REQUIREDBY db section
    pkg1 is upgraded and no longer provides 'foo'
    ** This code ensures that the REQUIREDBY of pkg3 is updated to require pkg2
       now instead of pkg1
2007-03-01 07:03:05 +00:00
Dan McGee bd7eb9475c * Added another test as suggested by Nagy on the ML- a package both provides
for and is a dependency of another package. (upgrade057)
* Removed man2html stuff from doc/Makefile.am.
* Patch: improved depends checking in _alpm_checkdeps
  Nagy Gabor <ngaba@petra.hos.u-szeged.hu>
* Slight revisions to pmrule.py to allow for a PKG_PROVIDES test.
* Very quick updates to the pactest README.
* Added rules to some of the newer upgrade tests. Note: upgrade055 now fails
  due to requiredby entries not being written packages that are dependencies
  in a provides role.
2007-02-28 04:00:21 +00:00
Aaron Griffin 8fbdd03cce * Enforce const char* params when using strings
* 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-26 08:38:48 +00:00
Dan McGee a5f630fda6 * Fixed inconsistency of args- _alpm_db_read, _alpm_db_write. 2007-02-21 08:34:36 +00:00
Aaron Griffin f62f37504a * Some cascade removal changes. Mainly code cleanup, but this is an attempt to
track down the great "Codemac Segfault"
* Fixed sortdeps - use the alpm_pkg_get functions to ensure data
2007-02-20 08:44:32 +00:00
Aaron Griffin d35e489499 * Fix version comparisons when one pkgrel doesn't exist (this ony fails on an ==
operation, technically, as 1.1.2-1 >= 1.1.2 is true.
2007-02-18 18:29:28 +00:00
Dan McGee 8e34023bbd * Removed unnecessary #define
* Added comment for something I noticed while looking through code
2007-02-16 22:41:51 +00:00
Aaron Griffin 290b962c48 Switched an int to an enum 2007-01-31 07:14:50 +00:00
Aaron Griffin 670319c2fb Debug logging changes:
* 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-31 06:10:21 +00:00
Aaron Griffin da648bc24c K. Piche <kevin.piche@cgi.com>
* ALPM_LOG_FUNCTION macro and all the great work to add this macro everywhere
2007-01-30 08:14:10 +00:00
Aaron Griffin 195e30e8aa K. Piche <kpiche@rogers.com>
* gcc visiblity changes

Also modified _alpm_versioncmp -> alpm_versioncmp (public function) as per K.
Piche's suggestions
2007-01-30 07:47:19 +00:00
Dan McGee 0bc06918e4 * Remove -fno-strict-aliasing as it is now unnecessary to compile.
* Fix up add.c a bit better than it was in regards to FS #3492.
* Optimized the sqrt call in dependency cycle checking to a single call.
* Removal of an outdated comment.
2007-01-30 05:41:13 +00:00
Dan McGee 1799afc9c1 Discussed on IRC for a bit, this makes the following changes for clarity:
* 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-30 03:46:33 +00:00
Aaron Griffin e22336673a Dan McGee <dpmcgee@gmail.com>
* Lots of code cleanup, and type fixes
* Make 'makeworld' a bit more in-line with the other stuff
* Make -Si and -Qi operations appear the same
2007-01-26 02:13:16 +00:00
Aaron Griffin 1b61cc8c69 This mainly deals with code clarity- removing currently unneeded
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-24 03:02:53 +00:00
Aaron Griffin 6167017264 Preliminary checkin for alpm_list conversion
* 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-19 09:28:44 +00:00
Aaron Griffin 86b136bb59 Dan McGee <dpmcgee@gmail.com>
* 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-18 16:52:57 +00:00
Aaron Griffin 2116ce78fb Corrected -Rsc operation - dependancy info was not being read from the DB 2006-12-05 07:00:22 +00:00
Aaron Griffin 4488058900 * Fixed the bug where -R pkgA pkgB failed when pkgA depended on pkgB 2006-12-01 09:51:54 +00:00
Aaron Griffin 08dca1593f * Cosmetic changes and typo fixes
* IgnorePkg and --ignore work again
* Partial changes to support removal of conflicts for -U and -A (INCOMPLETE)
2006-12-01 09:32:29 +00:00
Aaron Griffin 9918d43ab9 * Fixed some error output for "-Sd" and "-Rsc" dealing with missing/ignored
depends
* Added valgrind suppression file
2006-11-24 07:01:27 +00:00
Aaron Griffin 986409f9bd * Completed getinfo api changes (pmmissing_t, pmtrans_t, etc)
* 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-22 09:03:41 +00:00
Aaron Griffin af2fb3324a Numerous changes:
*   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-31 06:39:59 +00:00
Aaron Griffin 93311212bd Fixes from frugalware: few 'typos' included while patching
Also re-added Judd's dependancy fix in libalpm/deps.c
2006-10-21 20:16:55 +00:00
Aaron Griffin 7131b7ac87 A handful of minor changes:
* 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-20 06:26:55 +00:00
Aaron Griffin d37ad04873 Merged frugalware changes (too many to list). Also added some config file
handling changes (support [sections] to carry over to included files - this
helps with backwards compatibility with existing pacman config files)
2006-10-15 19:31:03 +00:00
Judd Vinet ef7cbbb771 bugfix: when looking at provides, defer to the new, to-be-installed package's provisios instead of the the existing package's 2006-07-04 17:48:15 +00:00
Judd Vinet bb787e26ee first stage of i18n stuff from VMiklos 2006-05-15 02:19:57 +00:00
Aurelien Foret 9a6bb4e826 removed an unexpected log 2006-03-07 20:53:24 +00:00
Aurelien Foret e2faeb46e1 reworked the db object to prepare future integration with different backends 2006-03-02 19:06:52 +00:00
Aurelien Foret 0b4ab2c0a8 added ERROR logs in case of malloc failures (patch from VMiklos <vmiklos@frugalware.org>) 2006-03-01 07:51:00 +00:00
Aurelien Foret be39f49a54 prepend library function names with _alpm (helped with the patch from VMiklos <vmiklos@frugalware.org>)
added log and event callbacks to sync_commit internal transactions
2006-02-17 22:35:26 +00:00
Aurelien Foret f34d895dc5 code cleanup 2006-02-07 18:30:02 +00:00
Aurelien Foret fc8be93314 resolvedeps: return the depmiss info to the frontend in case of failure 2006-01-21 18:28:38 +00:00
Aurelien Foret cf94007aed more code cleanup yet 2006-01-18 22:37:16 +00:00
Aurelien Foret c7bcaeb7e8 fixed detection for duplicate entries in list of deps/conflicts 2006-01-17 22:01:57 +00:00
Aurelien Foret 6dd2ecf4fa pulled out conflict checkings from checkdeps() in its own function: checkconflicts() 2006-01-15 15:55:16 +00:00
Aurelien Foret cb9d23baf8 checkdeps:
- merged missing chunks of code from pacman 2.9.7
- more debug logs
2006-01-14 15:05:59 +00:00
Aurelien Foret fd6ce1f4cb - merged pkg_new and pkg_dummy functions
- renamed _alpm_log_action to _alpm_logaction
2006-01-09 20:16:00 +00:00
Judd Vinet 45a7e57f6c cleanup 2006-01-08 22:07:31 +00:00
Judd Vinet 6866b8ce6f removed old/disable provides-conflict checking code 2006-01-08 22:06:19 +00:00
Judd Vinet 38180d5231 In the database-against-targets conflict checks, scan db packages' provides
fields and look for packages that want to exclusively provide a provisio that
the target package also provides.
2006-01-08 21:58:27 +00:00
Aurelien Foret bde9d69636 added more debug logs in the sync conflict/replace code 2006-01-07 17:59:26 +00:00
Aurelien Foret 5fc2e009dc - started to rename list_XXX calls to _alpm_list_XXX
- fixed 2 compilation warnings
2006-01-05 21:49:42 +00:00
Aurelien Foret 9ad7b1a4a8 fixed a segfault in removdeps
updated removedeps to keep in sync with pacman 2.9.x
2006-01-02 23:13:42 +00:00
Judd Vinet 96de3501ab patch from VMiklos - use PACKAGE_VERSION instead of PACMAN_VERSION 2006-01-02 19:55:35 +00:00
Aurelien Foret a1b005d239 Fixed a typo (spelling) fix (patch from VMiklos <vmiklos@frugalware.org>) 2005-12-28 10:31:23 +00:00
Judd Vinet 6bd15469b1 renamed rpmvercmp to versioncmp, added some fixes from isteve@bofh.cz 2005-12-26 16:48:37 +00:00