summaryrefslogtreecommitdiffstats
path: root/src/pacman/package.c
AgeCommit message (Collapse)AuthorFilesLines
2007-11-15Ensure -Si and -Qi output show correct dependenciesDan McGee1-2/+22
Because alpm_pkg_get_depends() no longer returns strings as the data, we need to first convert the returned structures to printable strings before we can print the list. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-15Remove REQUIREDBY usage from libalpmDan McGee1-1/+3
Instead of using the often-busted REQUIREDBY entries in the pacman database, compute them each time they are required. This should help many things: 1. Simplify the codebase 2. Prevent future database corruption 3. Ensure when we do use requiredby, it is always correct 4. Shrink the pmpkg_t memory overhead Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-13Fix display of -Qip output when a package file is givenDan McGee1-1/+2
Too many fields were being shown on -Qip output, and sizes were not always correct (-Qi and -Qip output on the same package did not agree). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-09Fix some issues with localized dates/epoch usageDan McGee1-2/+5
Commit 47622eef4dd8fd86a0aa0e3ebdb7b33f7c9d6804 introduced localized times in the metadata by way of storing the UNIX epoch value instead of a hard coded date string. However, it missed a few things: * If we weren't in the C/POSIX/en_US locale, the date parsing would fail as it tried to use the abbreviations of the locale being used. Fix this by switching the LC_TIME value before we parse a date. * We used ctime to print the date value, which is always the C locale string. Instead, use strftime to print a localized date string. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-28Support for localized times in metadataAaron Griffin1-3/+4
Packages and DBs now support using the UNIX epoch (seconds since Jan 1, 1970) for use in builddate and installdate. This will only affect newly built packages. Old existing packages with the text format are still supported, but this is deprecated. In the case of removal of text time support, this code will fail gracefully, returning the start of the epoch for broken packages. Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-09-26Preliminary support for optdependsDan McGee1-0/+1
Add some alpm functions for getting optdepends, have makepkg include them in the PKGINFO file, and have a pacman -Qi operation display the raw string as stored by libalpm. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-16Remove support for SHA1 from pacman.Andrew Fyfe1-17/+4
There's no need for a second hashing algorithm. MD5 serves the purpose of verifying that a package file hasn't been corrupted during download. Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-12Remove 'buildtype' from libalpm and pacmanDan McGee1-3/+1
Remove unused buildtype field from pmpkg_t struct and anything associated with it, as it is unused at the moment. If we need to readd it, it is an easy revert of this commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-02pacman/packages.c : print an error for files that can't be stated.Chantry Xavier1-3/+8
The -Ql operation is supposed to print all files but directories. stat was used for detecting directories. However, when stat failed, (because the file doesn't exist or is not readable), the files were still displayed just like the others. Now, these files are printed on stderr, with the corresponding error message. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-05-14Remove unnecessary casts on malloc and elsewhereDan McGee1-3/+3
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>
2007-04-29Remove 'removes' array from libalpmDan McGee1-2/+0
We don't use this functionality for now, so get rid of it and the functions associated with it. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-27Remove output.c and output.hDan McGee1-1/+0
One function was left in this set of files after the earlier cleansing, so I moved yesno to util.c. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Remove ERR calls from the codeDan McGee1-2/+3
All ERR() calls have been replaced with fprintf(stderr, ...). Still to be done- fix all the newline issues that are sure to pop up. What fun! Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26Move log.c/h -> output.c/h to properly reflect what is containedDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26More pacman side cleanupDan McGee1-5/+5
* Cleaned up more of the header #includes, and got rid of a lot of stuff that was due to trying to make it compile on BSD/Darwin/CYGWIN. We can add it later but lets keep it simple for now and do it in seperate files if possible later. * Removed a lot of #define MACROS. Some were not even used, and others were only used a few times. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-25Remove more unnecessary stuffDan McGee1-1/+0
* Remove libintl.h from most files, as we only need to include it once in util.h where _() is defined. * Remove other unnecessary header inclusions. * Remove a macro that was only used once and replaced it with actual code. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-05Add replaces output to -Qi operationDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-03-10* Updated Italian translationDan McGee1-1/+1
Giovanni Scafora <linuxmania@gmail.com> * long -> float conversion for package size output (which still may be the wrong size, this needs to be looked at)
2007-03-05This commit looks much more monumental than it is. Almost all just #includeDan McGee1-1/+4
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.
2007-03-01* Updated Italian translationDan McGee1-3/+12
Giovanni Scafora <linuxmania@gmail.com> * Fixed FS #6442 - don't list directories in -Ql output.
2007-02-20* Updated conflict checking one last time. You can finally have a file moveDan McGee1-37/+43
from one package to another seemlessly (knock on wood). This is implemented through the use of two skip lists in the trans struct- skip_add and skip_remove, which replace the former trans->skiplist. * Removed an unnecessary function parameter, added a necessary one. * If a package has no backup files, print '(none)' under the heading so it is more obvious. * Updated my TODO list.
2007-02-14* strlen -> mbstowcs (multibyte str to wide char str) conversion where weDan McGee1-2/+2
want the actual number of characters, not the number of bytes. * Added a TODO to take care of later in scriptlet processing.
2007-02-12* Fixed an i18n bug; length of description string was hardcoded previously;Dan McGee1-6/+12
now uses an strlen call. * Updates of the *.pot files.
2007-02-08Fix newlines for real, and add a missing _() gettext wrapper.Dan McGee1-2/+3
2007-02-06* Makepkg updates, and small bugfix on man page compression.Dan McGee1-2/+1
* Change libtool default to makepkg2 behavior. * Other small changes.
2007-02-01-Ql needs the 'root' prepended to each fileAaron Griffin1-1/+2
2007-01-30* Modified info query so it doesn't show more than available when querying aDan McGee1-7/+14
package file.
2007-01-26Dan McGee <dpmcgee@gmail.com>Aaron Griffin1-11/+11
* 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-22* Dan McGee <dpmcgee@gmail.com>Aaron Griffin1-3/+3
Newlines were included in both setting the string variable and in the printf, remove the extra ones.
2007-01-22Removed list.hAaron Griffin1-1/+1
2007-01-19Preliminary checkin for alpm_list conversionAaron Griffin1-17/+17
* 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/+1
* 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-17Dan McGee <dpmcgee@gmail.com>Aaron Griffin1-123/+105
* fix for -Qii regression * package.c cleanup * some refactoring changes Moved split_pkgname as per Dan's suggestion
2006-11-22* Completed getinfo api changes (pmmissing_t, pmtrans_t, etc)Aaron Griffin1-1/+1
* 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-55/+53
(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-1/+1
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 additionsAaron Griffin1-4/+4
* additional newline for search output, as suggested on the forums
2006-11-02* Fixed some alpm_get_option calls (long params were used for C99 compliance,Aaron Griffin1-1/+1
but were used in error) * Cleaned up some output newlines * Added "local database is up to date" when no packages are upgraded
2006-10-31Numerous changes:Aaron Griffin1-1/+3
* Added 'ILoveCandy' support to all progress bars * Changed download callback with regards to libfetch libalpm changes * libfetch error output on failed sync * Misc others I may have forgot to name (check the diff, heh)
2006-10-15Merged frugalware changes. Added a few other minor things too, but there's alotAaron Griffin1-11/+58
to list. The diff should show you 8)
2006-05-15first stage of i18n stuff from VMiklosJudd Vinet1-35/+36
2006-01-02patch from VMiklos - use PACKAGE_VERSION instead of PACMAN_VERSIONJudd Vinet1-1/+1
2005-10-08Fixed an text formatting issueAurelien Foret1-1/+1
2005-08-20changed license package field to a listAurelien Foret1-1/+1
2005-05-04fixed some small memory leaksAurelien Foret1-2/+3
2005-04-24slighlty improved efficiency for dump_pkg_full()Aurelien Foret1-6/+2
2005-04-24outputs cleanupAurelien Foret1-3/+3
2005-03-20added display of backup info in dump_pkg_full()Aurelien Foret1-16/+15
2005-03-18Avoided extern references to pmo_root.Aurelien Foret1-3/+4
Better use PM_OPT_ROOT to know the root.
2005-03-16- added PM_EXT_PKG and PM_EXT_DB defines to alpm.h (taken from pacman 2.9.3)Aurelien Foret1-1/+1
- renamed ALPM_VERSION to PM_VERSION