1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-10-31 15:45:03 -04:00
Commit Graph

272 Commits

Author SHA1 Message Date
Aaron Griffin
119b3ab043 Moved the update_depends function to trans.c, as it depends on a transaction
object
2007-02-18 22:07:11 +00:00
Aaron Griffin
92ad556512 * A whole mess of backup changes
- the code should be clearer, more organized, commented, and have worthwhile
    variable names now
  - proactive backup=()s now work.  That is, adding a file to a backup array
    does what it should on the upgrade to that package, no longer forcing you to
    wait a full upgrade cycle for it to take effect
* ldconfig was being run twice on an upgrade operation - fixed
* fixed another pm_fprintf/printf output corruption with the progress bars
* refactored some duplicate code for adjusting 'requiredby' lists
* Added config.rpath to .cvsignore
2007-02-17 08:55:05 +00:00
Aaron Griffin
a1f36454c2 Added a 'contrib' directory for other stuff that might be a good idea to maintain here.
* moved bash_completion from the "archlinux" script in the official bash_completion package
* moved zsh_completion from the AUR zsh-pacman package
2007-02-16 19:37:00 +00:00
Aaron Griffin
3a2d87d61d * Fixed _alpm_pkg_compare_versions so that it does not output warnings if versions match. (reported by Travis Willard) 2007-02-14 16:15:09 +00:00
Aaron Griffin
103dbb9fd1 * Refactored conflict checking within packages. Profiling from Dan showed an
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-13 08:15:38 +00:00
Aaron Griffin
af48c695eb Removed desc_localized for the time being. We don't have localized
descriptions, nor do we actually build them with the newest makepkg.  The actual
implementation in here seems like it could be done better, and it soaks a large
amount of CPU time according to profilers.
2007-02-13 01:46:33 +00:00
Aaron Griffin
d080809c45 * Package file parsing - fixed size and isize - isize is the "size" variable
from the PKGINFO, and size is the stat() size of the archive
* Removed the useless 'output' param from package.c:parse_descfile
* Installation progress
  - Call progress callback once at 0% for initialization
  - 'needdisp' was useless
  - alpm_list_count is called an excessive amount in these nested loops.  Now we
    only call it once per iteration
  - Use the compressed sizes for PROGRESS calcs as uncompressed (isize) is not
    exact (it is missing metadata sizes), and thus produces > 100% numbers
2007-02-10 23:44:39 +00:00
Dan McGee
73402a1459 * Fix compile errors/warnings.
* Update .cvsignore files a bit.
2007-02-09 21:54:57 +00:00
Aaron Griffin
f8cd4858ca * I made "alpm_versioncmp" public a while back, without noticing this was 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-02-09 21:08:10 +00:00
Aaron Griffin
cbd516a06e Only honor 'force' if versions are NOT identical 2007-02-07 06:12:53 +00:00
Aaron Griffin
6c5066471c Cleanup and more debug info for alpm_pkg_compare_versions 2007-02-07 05:57:28 +00:00
Dan McGee
96a0115630 Cleaning up mistakes. :P 2007-02-06 21:28:29 +00:00
Aaron Griffin
79c277a218 Attempt #2 at -S/-Su unification: verify that the 'force' option has been read before comparing versions 2007-02-06 20:57:17 +00:00
Aaron Griffin
7d63ecfac6 Copy-pasta errors. 8) 2007-02-06 17:41:36 +00:00
Aaron Griffin
67ea493ec2 Attempt to unify the -S and -Su version comparissons for when a package is newer
See FS#5388
2007-02-06 17:39:32 +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
b2da4b4234 * Added archive verification when loading package metadata for -u and -A
operations (now aborts on a corrupt archive)
* Fixed the pm_fprintf newline error that was plaguing us.  It seems a line
  resetting 'neednl' was removed a while back (by me).  This causes all the
  output errors we've been seeing
2007-02-04 03:24:32 +00:00
Aaron Griffin
21e19a7bcf Loading package data from a file was ALWAYS generating the filelist, instead of
using the in-package one. This is now fixed, and an autogenerated one is used as
a last resort.

This fixes the bug where /.CHANGELOG showed up in -Ql.
2007-02-01 03:00:34 +00:00
Aaron Griffin
4cd65c0a31 * !strcmp reads funny (as "not string compare" - switch those to == 0, which has
a positive connotation.
* Added a nice TODO
2007-02-01 01:51:12 +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
Aaron Griffin
170d63190a * Shuffled some of the alpm_list free funtions - still not perfect, but better
* Added alpm_list_remove_node for single list node removal
* Proper error checking/output for failed db_read/db_write (missing files)
* Invalid packages (missing files) are now removed from the package cache
* -Qs and -Ss output now look the same
* config.rpath causes errors on one machine I had, so I added it to CVS
* Fixed a "clobbered memory" issue when installing groups - only the outer list
  should be free'd, not the contained data
2007-01-24 08:51:50 +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
000256cbc5 * Added a check for .FILELIST for package validity in addition to .PKGINFO 2007-01-22 16:16:51 +00:00
Aaron Griffin
35a9f3e7d0 Moved some decls to make the "pkg_invalid" patch compile again. 2007-01-19 23:44:50 +00:00
Aaron Griffin
77f6bcfa3d Whoops. There's a 0 where there should be a 1. 2007-01-19 18:06:37 +00:00
Aaron Griffin
d27e5efec9 Johannes Weiner <hannes@saeurebad.de>
* package cleanup (pkg_invalid) refactoring
2007-01-19 18:05:19 +00:00
Aaron Griffin
e310209296 Johannes Weiner <hannes@saeurebad.de>
* use calloc to zero-out new packages (far more ideal)
* use memcpy to copy primatives when copying package structures
2007-01-19 18:01:02 +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
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
7d6161ccc3 * has_archname changes
* makepkg attempt at multiple file integrity checks
* honor "force" option on -S packages (not just -Su)
2006-11-14 17:26:19 +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
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
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
cf6da173f6 removed libtar support in favour of libarchive 2006-09-28 20:51:33 +00:00
Judd Vinet
bb787e26ee first stage of i18n stuff from VMiklos 2006-05-15 02:19:57 +00:00
Aurelien Foret
d6eeae2716 code cleanup 2006-03-08 18:21:17 +00:00
Aurelien Foret
4f42a0accb all _alpm_XXX_cmp functions are now public 2006-03-08 18:07:58 +00:00
Aurelien Foret
f0151aa587 code cleanup 2006-03-07 20:52:45 +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
16ff7cfa8e improved _alpm_list_free handling 2006-02-22 20:49:33 +00:00
Aurelien Foret
590f610d6b dropped the MALLOC macro 2006-02-20 20:41:40 +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
58a7e85534 - db_write: add support to write both local and sync entries
- code cleanup
2006-02-16 21:02:39 +00:00
Aurelien Foret
cf94007aed more code cleanup yet 2006-01-18 22:37:16 +00:00
Aurelien Foret
668e58626d added ALLDEPS transaction flag mainly to handle "makepkg -s" 2006-01-10 18:19:06 +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
96de3501ab patch from VMiklos - use PACKAGE_VERSION instead of PACMAN_VERSION 2006-01-02 19:55:35 +00:00
Aurelien Foret
b062a21d2e Fixed some memory leaks (patch from Essien Ita Essien <essiene@datavibe.net>) 2005-12-28 10:15:55 +00:00
Aurelien Foret
04424f5e89 fixed a file descriptor leak 2005-11-09 21:50:47 +00:00
Aurelien Foret
bf865c2da5 cleanup 2005-11-07 13:01:10 +00:00
Aurelien Foret
6a2230dce1 added more pm_errnos 2005-11-07 09:43:25 +00:00
Judd Vinet
a36ded25eb added conversation callback support for transactions 2005-10-09 06:09:57 +00:00
Aurelien Foret
d7e781a54b Added a PKG_FULLNAME_LEN macro 2005-10-05 20:49:32 +00:00
Aurelien Foret
dacf0eccac changed license package field to a list 2005-08-20 05:54:45 +00:00
Judd Vinet
a2192570fb changed license package field to a list 2005-07-22 01:59:11 +00:00
Aurelien Foret
220c084770 moved pkg_cmp() to cache.c 2005-05-03 17:19:19 +00:00
Aurelien Foret
a9540e2c76 fixed potential memory leaks 2005-04-24 21:36:18 +00:00
Aurelien Foret
e2b474b130 rework the cache handling to avoid as much as possible calls to db_scan() 2005-04-23 17:18:31 +00:00
Aurelien Foret
9b64e31286 more sanity checks for pkg_load() 2005-04-17 10:00:49 +00:00
Aurelien Foret
7775afa59b added function pkg_splitname (not used for now) 2005-04-08 20:43:13 +00:00
Aurelien Foret
4091aa1165 package 'reason' field should default to 0 2005-04-06 18:30:50 +00:00
Aurelien Foret
6063424c82 Replaced snprintf calls by the SNPRINTF macro to avoid buffer overflows when copying strings 2005-03-29 17:18:59 +00:00
Aurelien Foret
56917dc304 improved logs (use _alpm_log instead of fprintf) 2005-03-28 08:21:17 +00:00
Aurelien Foret
4ad99832b5 renamed temp files from pacman_XXXXXX to alpm_XXXXXX 2005-03-27 07:42:21 +00:00
Aurelien Foret
d109550656 Renamed PM_RET_ERR to RET_ERR (no need for a PM_ prefix for internal
defines).
2005-03-16 22:10:05 +00:00
Aurelien Foret
2ad431515b Removed a leftover debug printf 2005-03-16 19:54:55 +00:00
Judd Vinet
d04baabafa Initial revision 2005-03-15 01:51:43 +00:00