summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2007-07-12Remove some more conditional include stuffDan McGee4-11/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-12Remove versioncmp.{c,h}, clean up selective #ifdefsDan McGee12-366/+247
Remove versioncmp.c by moving all functions to locations that make sense. Move replacement functions (for building without glibc) into util.c where they belong, and do proper checks for them instead of using __sun__, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-12Remove 'buildtype' from libalpm and pacmanDan McGee3-26/+0
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-11conflict.c: start cleaning conflict check functionsChantry Xavier1-17/+7
The three chk_ functions overlap for packages both in targets and in the database. This caused the same conflict to be found in both direction (A conflicts with B, and B conflicts with A). This patch avoids this duplication. which shouldn't be needed, but other changes might be required for that to work correctly. This also has the unexpected side effect to hide the failure of sync022 pactest, for FS #7415. That's maybe not a good thing though.. Note from Dan: sync022 does succeed, but a sync023 pactest added to check regressions also seems to pass. This may be a valid fix to this 'problem' sync022 was meant to find. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-11Update translation files on libalpm side after gettext changeDan McGee10-10895/+1806
Because of this commit: ea1fef69add040b9e5b1de6e9238eda4576ccd3f we lost a lot of gettext-ized messages on the libalpm side. Remove them in order to clean out these files a bit. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-10Fix issue with <dbpath>/db.lck being truncatedDan McGee1-2/+2
snprintf takes a length including the '\0' character, this wasn't accounted for originally. Fix it. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-10Remove gettext calls from all PM_LOG_DEBUG messagesDan McGee18-193/+223
There is no real reason to burden our translators with these messages, as anyone helping to debug these will probably want them in English. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-10Remove conflict message for no-existent files.Andrew Fyfe1-1/+2
Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
2007-07-10Cleanup of pacman_deptest()Andrew Fyfe2-0/+13
Clean up some left over code from http://projects.archlinux.org/git/gitweb.cgi?p=pacman.git;a=commitdiff;h=7653bb93997f52848b54ab80868cd6da52808a75 Signed-off-by: Andrew Fyfe <andrew@neptune-one.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-09libalpm/trans.c : exit the forked process correctly in case of errors.Chantry Xavier1-2/+2
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-09Clean up the alpm handleDan McGee4-66/+36
Add some comments in handle.h, and remove the pmaccess_t part that we don't even use. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-09Remove gettext from any alpm_logaction callsDan McGee3-18/+26
We shouldn't translate log messages to pacman.log so it is consistant and can be parsed by other tools. Remove all gettext _() around these strings. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-09Add top level hidden file code to package.cDan McGee1-0/+3
This was already taken care of in add.c by commit 2ae043866045bbeef129a4b503ee1f5486545821, but was missed in package.c. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-06First step of moving translations from src/pacman/po to po/Dan McGee1-0/+1
Move the translations from src/pacman/po to just po/ so we can include the scripts gettext translations in the same message catalog as that of the pacman frontend. The libalpm message catalog, for now, will remain a separate existence. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-06Various small fixes as suggested by some static code checkersDan McGee4-14/+7
I ran flawfinder and sparse over the pacman source code and found a few things that were worth fixing (and were quick fixes). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-02libalpm/add.c : fix for FS #7484Chantry Xavier1-1/+9
Adds the ARCHIVE_EXTRACT_NO_OVERWRITE libarchive flags for extracting files and directories. This will prevent symlinks for being overwritten by directories. All other files that need to be extracted should already have been deleted previously by pacman. This flag is not used for extracting files in backup array to /tmp/alpm_XXXX, because this file is created by mkstemp first, and so needs to be overwritten by the file from the archive. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-02libalpm/add.c,util.c : log ARCHIVE_WARN warning to debug output.Chantry Xavier2-6/+23
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-07-02Remove unnecessary and extra includesDan McGee4-17/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-07-02Move Doxygen manpage generation to doc/ directoryDan McGee2-264/+0
Instead of doing the doxygen work in the libalpm/ dir, do it with the rest of the docs in the doc/ dir. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-28libalpm/add.c : ignore libarchive warning.Chantry Xavier1-6/+11
With libarchive 2.2.3 (previously 1.3.1), archive_read_extract now returns ARCHIVE_WARN when a package is extracted as user, because for example, UID=0 or SUID bit can't be set. This patch makes pacman not treating these warnings as errors anymore, but simply ignoring them. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-06-28libalpm/util.c : stat returns 0 on successChantry Xavier1-1/+1
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-06-28Remove lockfile configuration from frontend, make it job of libalpmDan McGee4-22/+11
I previously introduced some patches to make just about every path in pacman/libalpm configurable; doing this with the lockfile seemed a bit too far and we really should just place the lockfile where it belongs- with the DB that needs locking. More details in this thread: http://archlinux.org/pipermail/pacman-dev/2007-June/008499.html Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-28Remove scriptlet START and DONE commands that we don't useDan McGee3-39/+1
The scriptlet calling had some unneeded complexity for the time being which we aren't using here. Let's get rid of it until we find a good way to implement it correctly. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-28Fix wrong permissions on pacnew extractionDan McGee1-0/+15
First reported here: http://bbs.archlinux.org/viewtopic.php?pid=261861 Newly created files were done with the standard umask, so those that are extracted seperately and copied to a .pacnew extension will have the wrong permissions. This should hopefully fix this. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-28libalpm/remove.c : file variable used before being initialized.Chantry Xavier1-1/+2
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-06-26Make alpm_splitdep immutableNagy Gabor1-5/+9
The alpm_splitdep function formerly overwrote the input string, causing a few issues. Fix this. Signed-off-by: Nagy Gabor <ngaba@petra.hos.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-26Remove unnecessary trans parameter from _alpm_checkdepsNagy Gabor5-9/+8
The trans parameter was never used, so remove it. Signed-off-by: Nagy Gabor <ngaba@petra.hos.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-26Don't extract any top-level files in a package that start with '.'Dan McGee1-1/+8
For future possibilities, don't extract any files that start with '.'. This will allow us to add features such as the ChangeLog viewing without having to wait to include these files in packages, because older versions of pacman will be forward compatable with 'hidden' files at the root level of the package. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-20libalpm/util.c: remove unnecessary includeDan McGee1-1/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-20Revert "Fix libarchive permission extraction"Dan McGee1-2/+0
This was a bad way to fix a problem upstream. Doing this resulted in symlink permissions being applied to files installed on the system, leaving some binaries with 77 permission, etc. This reverts commit 4e6b7c1cde4c0ac1d035b51f9af19510a7c9135e.
2007-06-17Update Doxyfile and add a few missing parts of documentationDan McGee2-1/+26
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-13Remove some more diskspace checking holdover stuffDan McGee2-3/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-11Attempt to clean up _alpm_sync_prepareDan McGee1-64/+56
This function is an absolute disaster, so we'll take it one step at a time here. This was a quick once-over of the whole thing, trying to straighten out some of the spaghetti code and fix some mistakes that others found. We are now down to two failing pactests again: sync300 and upgrade051. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-11Implement simple topological sort algorithm for sortbydepsNagy Gabor4-57/+93
Based on the "depth first search" algorithm, for more infos visit: http://en.wikipedia.org/wiki/Topological_sorting The previous algorithm used by sortbydeps was too slow, and to work around it the number of steps needed to get correct result was reduced greatly. So it produced wrong results in several cases : 1) smoke001.py 2) http://bugs.archlinux.org/task/7229 More here: http://archlinux.org/pipermail/pacman-dev/2007-April/008057.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-11Ensure correct and consistent usage of depmissChantry Xavier3-55/+19
See comment from Nagy here : http://www.archlinux.org/pipermail/pacman-dev/2007-April/008134.html This also makes easier correct usage of checkdeps in sync.c, which fixes sync901 pactest (and so bug 6057). Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-11Fix for removing a package that is no longer neededChantry Xavier1-36/+42
Fix for remove041 pactest. You could not remove a package before that was provided by something else already installed on the system. This fixes this problem. Reference: http://archlinux.org/pipermail/pacman-dev/2007-April/008131.html http://archlinux.org/pipermail/pacman-dev/2007-April/008134.html Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10Small speed-tuning to upgrade-checkdepNagy Gabor1-4/+6
Posted on the ML here: http://archlinux.org/pipermail/pacman-dev/2007-April/008131.html Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10Fix issue when upgrading two packages that would break depsNagy Gabor1-29/+9
Fixes for pactest upgrade060. Posted on the ML here: http://archlinux.org/pipermail/pacman-dev/2007-April/008130.html Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-10Fix breakage in checkdeps when upgrading a multiple-dependNagy Gabor1-6/+3
Fixes pactest upgrade059. Posted on the ML in the following messages: http://archlinux.org/pipermail/pacman-dev/2007-April/008127.html http://archlinux.org/pipermail/pacman-dev/2007-April/008129.html Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09be_files.c: Fix compilation bug since I removed unnecessary LOG_STR_LENDan McGee1-6/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09Allow multiple CacheDirs to be specifiedDan McGee5-46/+113
This should hopefully allow multiple cache dirs to be specified in pacman.conf and/or on the command line, and allow pacman to test each one for the package file. The first one found to be writeable is used as the download cache. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09Add a alpm_db_test() function to the backend for checking DB consistencyVMiklos4-0/+46
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09Fix up things after the last few changesDan McGee1-2/+1
* Readd default logmask of ERROR and WARNING * Remove DOWNLOAD log level as it no longer applies * Add 'no targets' logic back in where it applies * Switch some prints in parseconfig to ERROR Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-09Remove logmask stuff from backend; switch logging callback to new pm_printfDan McGee8-45/+28
Remove the logmask functionality from the backend as it has been moved to the frontend, and change the logging callback function to use pm_printf. In addition, make much better use of va_list- use the args list instead of a arbitrarily chosen string to print to in the logging functions. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-05Const correctness!Dan McGee17-124/+132
Add some 'const' keywords all over the code to make it a bit more strict on what you can and can't do with data. This is especially important when we return pointers to the pacman frontend- ideally this would always be untouchable data. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-05Clean up unnecessary headers and macros from alpm.cDan McGee1-10/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-05Fix compilation with GCC 4.2.0Dan McGee1-1/+1
'inline' keyword in C99 is not correctly recognized, so compilation fails on the warning it spits. This fixes this. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-05Merge branch 'alpm.c_cleanup' into frontend_configDan McGee11-912/+888
Conflicts: lib/libalpm/alpm.c
2007-06-05Fix up outstanding parseconfig issuesDan McGee3-2/+6
The db variable was left unset when calling alpm_db_register, leading to a failure to ever register a sync db. Also added a check to ensure DBPath was set when trying to register a database. Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-05Rip alpm_parse_config out of libalpmDan McGee7-264/+7
Switch over to the new frontend parseconfig. * Fix a few issues in parseconfig * Remove unused callback upon database registration * Remove conf file related errors from error.c/alpm.h Signed-off-by: Dan McGee <dan@archlinux.org>