summaryrefslogtreecommitdiff
path: root/lib/libalpm
Commit message (Collapse)AuthorAge
* Ensure requiredby entries are removed during an upgradeDan McGee2007-07-14
| | | | | | | | | | | This fixes the failure of the requiredby004 pactest in a not so pretty way, but it gets the job done. I purposely used the extremely long name of PM_TRANS_TYPE_REMOVEUPGRADE to be both clear and in the hope that someone else will figure out a better solution. Original idea from Nagy Gabor, patch updated and cleaned for current code. Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm/sync.c : ldconfig is run twice.Nagy Gabor2007-07-14
| | | | | | | | | | | | remove _alpm_ldconfig call from _alpm_sync_commit, since sync operation causes an upgrade transaction, where ldconfig is already run. Reference: http://www.archlinux.org/pipermail/pacman-dev/2007-April/008132.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm/remove.c : revert part of commit to fix remove044 pactestChantry Xavier2007-07-13
| | | | | | | | | | | In 1c9f30b9fab998e2d89dd307a90122618d746cb6 This change should be done AFTER the TODO in recursedeps is implemented. Then we'll be able to first sort the list, then call recursedeps which keeps it sorted. For now, the sorting should still be done as the last step. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update hungarian translationNagy Gabor2007-07-13
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm/deps.c : fix for remove044 pactest.Chantry Xavier2007-07-13
| | | | | | | | | | | | | | Patch from Nagy that makes removedeps use alpm_depcmp. I also renamed removedeps to recursedeps, as it can have a more general usage, and added an include_explicit argument, so we can control if packages explictly installed are added or not. Note: Small changes made by me (Dan) as well- mostly some English grammar correction and a few other cleanups. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove conflict message for non-existent files (reworked)Chantry Xavier2007-07-13
| | | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm/remove.c : Rsd combination.Chantry Xavier2007-07-13
| | | | | | | | | | Currently the d (nodeps) option skips the s (recursive) part, rendering the Rsd combination totally useless. This patch makes a recursive removal still possible using the nodeps option, as Romashka asked there : http://bugs.archlinux.org/task/6057#comment17784 Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Some doxygen comments.Andrew Fyfe2007-07-12
| | | | Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
* Remove some more conditional include stuffDan McGee2007-07-12
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove versioncmp.{c,h}, clean up selective #ifdefsDan McGee2007-07-12
| | | | | | | | | 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>
* Remove 'buildtype' from libalpm and pacmanDan McGee2007-07-11
| | | | | | | | 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>
* conflict.c: start cleaning conflict check functionsChantry Xavier2007-07-11
| | | | | | | | | | | | | | | | | | | 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>
* Update translation files on libalpm side after gettext changeDan McGee2007-07-11
| | | | | | | | | 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>
* Fix issue with <dbpath>/db.lck being truncatedDan McGee2007-07-10
| | | | | | | snprintf takes a length including the '\0' character, this wasn't accounted for originally. Fix it. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove gettext calls from all PM_LOG_DEBUG messagesDan McGee2007-07-10
| | | | | | | 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>
* Remove conflict message for no-existent files.Andrew Fyfe2007-07-10
| | | | Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
* Cleanup of pacman_deptest()Andrew Fyfe2007-07-10
| | | | | | | | 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>
* libalpm/trans.c : exit the forked process correctly in case of errors.Chantry Xavier2007-07-09
| | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Clean up the alpm handleDan McGee2007-07-09
| | | | | | | 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>
* Remove gettext from any alpm_logaction callsDan McGee2007-07-09
| | | | | | | 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>
* Add top level hidden file code to package.cDan McGee2007-07-08
| | | | | | | 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>
* First step of moving translations from src/pacman/po to po/Dan McGee2007-07-06
| | | | | | | | | 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>
* Various small fixes as suggested by some static code checkersDan McGee2007-07-06
| | | | | | | 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>
* libalpm/add.c : fix for FS #7484Chantry Xavier2007-07-01
| | | | | | | | | | | | | 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>
* libalpm/add.c,util.c : log ARCHIVE_WARN warning to debug output.Chantry Xavier2007-07-01
| | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Remove unnecessary and extra includesDan McGee2007-07-01
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Move Doxygen manpage generation to doc/ directoryDan McGee2007-07-01
| | | | | | | 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>
* libalpm/add.c : ignore libarchive warning.Chantry Xavier2007-06-28
| | | | | | | | | 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>
* libalpm/util.c : stat returns 0 on successChantry Xavier2007-06-28
| | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Remove lockfile configuration from frontend, make it job of libalpmDan McGee2007-06-27
| | | | | | | | | | | | 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>
* Remove scriptlet START and DONE commands that we don't useDan McGee2007-06-27
| | | | | | | | 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>
* Fix wrong permissions on pacnew extractionDan McGee2007-06-27
| | | | | | | | | | | 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>
* libalpm/remove.c : file variable used before being initialized.Chantry Xavier2007-06-28
| | | | Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
* Make alpm_splitdep immutableNagy Gabor2007-06-26
| | | | | | | | 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>
* Remove unnecessary trans parameter from _alpm_checkdepsNagy Gabor2007-06-26
| | | | | | | 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>
* Don't extract any top-level files in a package that start with '.'Dan McGee2007-06-26
| | | | | | | | | | 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>
* libalpm/util.c: remove unnecessary includeDan McGee2007-06-20
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Revert "Fix libarchive permission extraction"Dan McGee2007-06-20
| | | | | | | | 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.
* Update Doxyfile and add a few missing parts of documentationDan McGee2007-06-17
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove some more diskspace checking holdover stuffDan McGee2007-06-13
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Attempt to clean up _alpm_sync_prepareDan McGee2007-06-10
| | | | | | | | | | 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>
* Implement simple topological sort algorithm for sortbydepsNagy Gabor2007-06-10
| | | | | | | | | | | | | | | | 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>
* Ensure correct and consistent usage of depmissChantry Xavier2007-06-10
| | | | | | | | | 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>
* Fix for removing a package that is no longer neededChantry Xavier2007-06-10
| | | | | | | | | | | | 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>
* Small speed-tuning to upgrade-checkdepNagy Gabor2007-06-10
| | | | | | | Posted on the ML here: http://archlinux.org/pipermail/pacman-dev/2007-April/008131.html Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix issue when upgrading two packages that would break depsNagy Gabor2007-06-10
| | | | | | | 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>
* Fix breakage in checkdeps when upgrading a multiple-dependNagy Gabor2007-06-10
| | | | | | | | 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>
* be_files.c: Fix compilation bug since I removed unnecessary LOG_STR_LENDan McGee2007-06-09
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Allow multiple CacheDirs to be specifiedDan McGee2007-06-09
| | | | | | | | | 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>
* Add a alpm_db_test() function to the backend for checking DB consistencyVMiklos2007-06-09
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>