Commit Graph

72 Commits

Author SHA1 Message Date
Aaron Griffin a94e22d924 Attempt to NOT remove packages on filesystem errors (like a read-only
filesystem). See FS#5887
2007-02-08 08:09:34 +00:00
Aaron Griffin 63000584b6 Implemented a crappy version of -Qu (query upgrades). This simply outputs the
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-04 08:26:52 +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
Dan McGee 44dc48f10f slight line spacing/indent updates 2007-01-31 02:58:12 +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
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 e3aace4a4d Cleanup from Dan McGee <dpmcgee@gmail.com> and Jürgen Hötzel <juergen@hoetzel.info>
* configure swig check
* misc libalpm cleanup
2006-12-22 19:38:55 +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 aa1c0ba9f8 * repo-add script - to add entries to a db file directly from package data (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-20 09:10:23 +00:00
Aaron Griffin 00ce9ea739 * Initial changes to gensync - makepkg changes were not checked in from another
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-15 07:50:37 +00:00
Aaron Griffin 4470e5ce01 * Numerous mini valgrind fixes.
* 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-14 07:58:42 +00:00
Aaron Griffin 3e608e7e85 * Improved mcheck output
* Added minor libalpm const correctness
* Mini-memory fixes
2006-11-08 08:14:29 +00:00
Aaron Griffin 3bf918dc4e Fixed pacman -U:
* 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-11-01 06:30:47 +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 e21f4c8f2e Added PM_DLFNM_LEN define, via VMiklos
http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=pacman;a=commitdiff;h=20061023154138-e2957-de4837230b091cbc2136306e1c55a4b79cc72fc8.gz
2006-10-24 04:33:40 +00:00
Aaron Griffin a719484f1e Reverted the "out of memory" error to 1 to prevent API changes.
This should be changed later, or at least everything fixed up.  Typically a 1
return indicates "an error occured" and some functions still might just return
error on failure.
2006-10-21 21:30:43 +00:00
Aaron Griffin 454cf699a5 More extern moving - keep extern decls in the headers makes for easier/better
reuse.
2006-10-21 01:38:59 +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 ac30eb2c1e Applied Frugalware patch from Christian Hamar alias krix <krics@linuxforum.hu>
for file-conflict progress bar
Also did some CVS cleanup, removing some of the autogenerated files that
shouldn't have been there
2006-10-15 23:54:43 +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 cf6da173f6 removed libtar support in favour of libarchive 2006-09-28 20:51:33 +00:00
Aurelien Foret ddcfaa1f5a removed an uneeded error code (DB_UPTODATE) 2006-03-08 20:57:03 +00:00
Aurelien Foret 27be34c09b added a NOSCRIPLET flag to transactions (patch from VMiklos <vmiklos@frugalware.org>) 2006-03-07 18:17:03 +00:00
Aurelien Foret 1bd8f57a18 - changed flags type from char to int
- downloadonly implies FLAG_NOCONFLICTS
2006-03-04 15:33:44 +00:00
Aurelien Foret 7e9b70a208 added a FLAG_NOCONFLICT 2006-03-04 10:16:36 +00:00
Aurelien Foret dfa1a2a13a removed HoldPkg option (frontend only feature) 2006-03-02 20:12:11 +00:00
Aurelien Foret 6e76fd8af3 - merged db_open and db_create into one single function
- moved the .lastupdate support to the frontend
2006-02-15 22:51:28 +00:00
Aurelien Foret 5aa5142815 error codes cleanup 2006-02-07 22:01:50 +00:00
Aurelien Foret 298c1a8e97 added alpm_pkg_checkmd5sum() to check md5sums for package from the cache 2006-02-05 09:57:29 +00:00
Aurelien Foret 325e3b6b98 added a pmconflict_t structure to handle file conflicts 2006-02-05 09:27:26 +00:00
Aurelien Foret 18986b1805 reworked lock handling (patch from VMiklos <vmiklos@frugalware.fr>) 2006-01-26 22:16:57 +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 d42c6bdc49 removed unuseful error codes 2006-01-13 20:55:39 +00:00
Aurelien Foret 668e58626d added ALLDEPS transaction flag mainly to handle "makepkg -s" 2006-01-10 18:19:06 +00:00
Aurelien Foret 77be3f53e9 removed all code related to PM_SYNC_TYPE_DEPEND 2006-01-07 20:05:10 +00:00
Aurelien Foret 86e5c8bc06 sync_commit can now return conflicting files with a trans_prepare like data structure (patch from VMiklos <vmiklos@frugalware.org>) 2006-01-07 18:42:44 +00:00
Aurelien Foret f3a4197e34 code cleanup (mainly removed line spaces at the beginning of lines by tabulations) 2006-01-07 09:42:48 +00:00
Aurelien Foret 2c22045ba8 - fixed a regression with pacman 2.x (reworked patch from VMiklos <vmiklos@frugalware.org>):
if pacman is desiganted as a target in a sysupgrade operation, it should be able to upgrade itself first upon user request.
- removed uneeded sanity checks in alpm interface calls
- replaced printf by MSG in pacman
2006-01-06 14:00:03 +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 316cd2b573 code cleanup 2006-01-02 16:20:01 +00:00
Aurelien Foret db0df44598 code cleanup 2006-01-02 13:26:30 +00:00
Aurelien Foret 7df7ca1738 Allowed C++ usage (patch from VMiklos <vmiklos@frugalware.org>) 2005-12-28 10:38:12 +00:00
Judd Vinet 58c9d5d663 applied first try at sync conflict handling (VMiklos) plus a couple changes 2005-12-26 06:40:29 +00:00
Aurelien Foret b2df466ffd fixed compilation warnings 2005-11-07 12:57:33 +00:00
Judd Vinet a1526a3e7d added first part of the autoconf stuff - patch from Christian Hamar <krics@linuxforum.hu> 2005-10-17 18:52:43 +00:00
Aurelien Foret 609466fdeb added PM_OPT_CACHEDIR library option 2005-10-10 20:41:35 +00:00
Aurelien Foret 6b7b9787d5 - more sanity checks
- alpm_pkg_free can now return an error code
2005-10-10 15:03:35 +00:00
Judd Vinet a36ded25eb added conversation callback support for transactions 2005-10-09 06:09:57 +00:00
Judd Vinet 6f75de92b5 added more error messages, enabled the db permission check in trans_commit 2005-10-08 23:40:49 +00:00