summaryrefslogtreecommitdiffstats
path: root/src/pacman/package.c
AgeCommit message (Collapse)AuthorFilesLines
2008-02-23A few more wide character output fixesDan McGee1-3/+12
Fix up the indentprint and list printing functions so they work properly. This output can be seen in places such as -Ss, -Si, -Qs, and -Qi. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-11Update GNU GPL boilerplate and copyright datesDan McGee1-4/+2
Update the GPL boilerplate to direct people to the GNU website for a copy of the license, as well as bump all of Judd's copyrights to 2007. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-09Improve changelog handling through addition of open/read/close functionsDan McGee1-17/+21
Thanks to Allan for inspiring all this work on what was one little TODO item in the codebase. :) Change changelog handling so we can now dump a changelog from both installed packages and package files (fixes FS#7371). We do this by moving all of the machinery to the backend where it should have been in the first place. The changelog reading is now done through a open/read/close interface similar to the fopen/fread/fclose functions (can you guess how it is done?). It is buffered by the frontend, so programs using the library can read as much or as little as they want at a time. Unfortunately, I could not implement a changelog_feof function due to some shortcomings of libarchive. However, I left the stub code in there, commented out, in case it becomes possible later or anyone wants to take a stab at it. Original-work-by: Allan McRae <mcrae_allan@hotmail.com> Improved-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-01Unify dump_pkg_full in pacman [-Si, -Qip, -Qi and -Qii]Nagy Gabor1-59/+47
dump_pkg_sync is now a trivial wrapper for dump_pkg_full Some smaller changes: * string_display function added to util.c [prints None in case of empty string] * Filename field added to -Qip * rename License to Licenses * 'Compressed Size' used instead of 'Download Size' for -Qip Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: fix whitespace errors, spacing issues, const modifiers] Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-29Move requiredby computation before any display startsDan McGee1-2/+6
This should reduce the chances of people thinking pacman hung during the middle of something. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-18Don't filter package files output based on dir/file statusDan McGee1-11/+1
This caused more problems than it solved, especially with -Qlp output and files that are new to the new package. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-17War on whitespaceDan McGee1-7/+7
Run the kernel's cleanfile script on all of our source files. Signed-off-by: Dan McGee <dan@archlinux.org>
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