summaryrefslogtreecommitdiff
path: root/lib/libalpm
Commit message (Collapse)AuthorAge
* Separate local db directory creation and db writeAllan McRae2009-01-02
| | | | | | | | | | | | | | | Changelogs and install files were getting extracted into the local db folder before it was manually created. This created issues for uses with 0077 umasks and was highlighted with the new sudo handling of umasks (FS#12263). This moves the local db creation to its own function which is called before the start of package archive extraction. Also, added a check that the folder is actually created. Signed-off-by: Allan McRae <allan@archlinux.org> [Dan: rename to _alpm_db_prepare()] Signed-off-by: Dan McGee <dan@archlinux.org>
* Log pacsave warnings to pacman.logSterling Winter2009-01-02
| | | | | | | | | | | Pacman currently logs .pacnew warnings to pacman.log but a similar history of .pacsave warnings isn't kept. The user should be able to search pacman.log to discover when and where all .pac* files were created by pacman. Addresses FS#12531. Signed-off-by: Dan McGee <dan@archlinux.org>
* Print proxy information when downloadingDan McGee2008-12-10
| | | | | | | | May help debug issues we come across with proxy behavior (e.g. those pesky segfaults) as well as be informative to the user when things aren't working quite right. Addresses FS#12396. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add regex to delta code so we don't segfault when reading lineDan McGee2008-11-30
| | | | | | | If the delta line doesn't match our regex, we won't go and process it, possibly walking off the end of the string. Signed-off-by: Dan McGee <dan@archlinux.org>
* Minor code cleanupsDan McGee2008-11-17
| | | | | | Mostly noticed when compiling libalpm/pacman with ICC. Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Chinese translationLyman Li2008-10-28
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Correctly close the pipe used for scriptlet executionDan McGee2008-10-18
| | | | | | | | | | We never had a call to pclose() in here before, leaving our file descriptor in some sort of limbo state. In addition, clean up some of the other logic such as directly calling exit(1) on a popen() failure rather than going to our cleanup block, and handling and respecting the exit status of the subprocess correctly. Signed-off-by: Dan McGee <dan@archlinux.org>
* Minor updates to Russian translationSergey Tereschenko2008-10-12
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove unnecessary unistd.h header inclusionDan McGee2008-10-12
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm: handle syscall interruption correctlyDan McGee2008-10-12
| | | | | | | | | | | | | It is possible to throw EINTR from a system call such as open(), close(), or waitpid() if custom signal handlers are set up and they are not initialized with the SA_RESTART flag. This was noticed by Andreas Radke when ^C (SIGINT) was given during the call to waitpid(), causing it to throw the EINTR error and we could not accommodate it. Simply wrap these calls in a simple loop that allows us to retry the call if interrupted. Signed-off-by: Dan McGee <dan@archlinux.org>
* New Ukrainian translationRoman Kyrylych2008-08-26
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Final updates on all translation for 3.2.1Xavier Chantry2008-08-25
| | | | | | | | | | * Update all .po files because of the last "-q,--quiet" fix. Also for some strange reason, en_GB was missing a few c-format tags. * Finally, delete all unused translations. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Portuguese (Brazil) translationHugo Doria2008-08-25
| | | | Xav : alignment fixes
* Update Turkish translationSamed Beyribey2008-08-25
|
* Update Chinese Simplified translation甘露(Lu.Gan)2008-08-25
|
* Update Czech translationVojtěch Gondžala2008-08-24
|
* Update German translationMatthias Gorissen2008-08-24
|
* Update Russian translationSergey Tereschenko2008-08-24
| | | | [Xav: one minor fix to libalpm po file]
* Update British English translationXavier Chantry2008-08-23
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update French translationXavier Chantry2008-08-23
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update Hungarian translationNagy Gabor2008-08-23
|
* Update Spanish translationJuan Pablo González Tognarelli2008-08-23
| | | | Xav : one minor fix (a missing %s in the downgrading message).
* Update Polish translationMateusz Herych2008-08-23
|
* Update Italian translationGiovanni Scafora2008-08-23
|
* Update translation files for pending 3.2.1 releaseDan McGee2008-08-23
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Cleanup of _alpm_pkg_compare_versions.Xavier Chantry2008-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change the return values to be more informative. It was previously boolean, only indicating if a sync package was newer than a local package. Now it is a simple wrapper to vercmp, handling the force flag. * Remove the verbose output from _alpm_pkg_compare_versions. The "force" message is not so useful. The "package : local (v1) is newer than repo (v2)" message can be moved to -Su operation. For the -S operation, it is better to have something like : "downgrading package from v1 to v2" * Don't display the "up to date -- skipping" and "up to date -- reinstalling" messages, when the local version is newer than the sync one. * Fix the behavior of --needed option to not skip a target when the local version is newer, and clarify its description. * Add a new alpm_pkg_has_force function This allows us to access the pkg->force field like any other package fields. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove an usused variable from alpm/util.c/_alpm_lckmk()Nagy Gabor2008-08-19
| | | | | | | | | | | Probably a tweakable "lockdb-retry" option was planned which is not implemented. (Now it should be implemented in front-end.) So now this variable was unused and caused a small memleak. (FREE(dir) was not reached in case of error.) Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm/add.c : ensure the old pkg was fully loaded.Xavier Chantry2008-08-19
| | | | | | | This fixes FS#11218. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix segfault on x86_64 when using UseSyslogDan McGee2008-08-08
| | | | | | | | | | | | Due to differences in handling va_list between i686 and x86_64, this bug can only be seen on x86_64. va_list usage is not allowed but we had been getting away with it. See http://lists.opensuse.org/opensuse-programming/2008-02/msg00005.html for details and explanation. This fixes FS#11096. Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix variable naming issues in _alpm_db_cmpDan McGee2008-08-08
| | | | | | | | | When this function got a rewrite in commit f43805d875, argument and variable names got a bit mixed up when separating the casts from the strcmp operation. Fix the mixup which also fixes a possible segfault when this function is called. Signed-off-by: Dan McGee <dan@archlinux.org>
* Avoid double slashes in URLs given to libdownload.Xavier Chantry2008-08-05
| | | | | | | | | | | | | | | | If a Server specified in pacman.conf had a trailing slash, libalpm ended up building URLs with double slashes, and this broke libdownload with errors like the following one : error: failed retrieving file 'redland-1.0.8-1-i686.pkg.tar.gz' from 192.168.0.90 : Command okay So the public function alpm_db_set_server will make sure to remove the trailing slash of servers. For the private function _alpm_download_single_file, I only added a comment. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* dload.c : drop the specific handling of file: url.Xavier Chantry2008-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | Before commit fc48dc31, file:/// urls forced the use of the internal downloader (libdownload), because the default XferCommand, wget, does not handle them. We tried to move away from forcing usage of libdownload, so this commit implemented the handling of file:/// urls manually. However, this implementation is way too basic. It does not handle the progress bar, thus nothing at all appears in pacman's output when a file: repo is synchronized, or when a file is downloaded from a sync repo. Also, it is not able to detect when the repo is already up-to-date. When libdownload was used, both were handled. It seems better to just drop this implementation for now. All users who use libdownload will get the much better file:// handling back. For the users of XferCommand, it will be more problematic, but they have several options: 1) Switch to a downloader handling file:// (wget doesn't, but curl does for example). 2) Drop the file:// repo, and set up light http or ftp servers instead. Consider that going that way would make this repo available for the whole local network, which can be useful. 3) Switch back to libdownload, which works perfectly for many users. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Final update of all translations.Xavier Chantry2008-07-30
| | | | | | | | Two recent commits slightly broke the translations, so this fixes all of them. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Small fix to Italian translationGiovanni Scafora2008-07-25
| | | | | Signed-off-by: Giovanni Scafora <linuxmania@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Implement AND based package searching.Xavier Chantry2008-07-24
| | | | | | | | This fixes FS#2334. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> [Dan: add some comments to the code] Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove unused strverscmp substituteDan McGee2008-07-24
| | | | | | | Our internal vercmp function was the only user of this, and it no longer relies on it. Signed-off-by: Dan McGee <dan@archlinux.org>
* libalpm/package.c : fix infolevel bug in pkg_dupXavier Chantry2008-07-24
| | | | | | | | | | The pkg_dup function shouldn't call any alpm_pkg_get_ accessors because this can fill the old package with all INFRQ_DESC fields for example, and this won't necessarily be reproduced in the new package (for all the fields that were copied before). Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix vercmp and add additional testsDan McGee2008-07-24
| | | | | | | | | | | | | | | | | | | | | | This vercmp issue has been a sticking point but this should resolve many of the issues that have come up. Only a few minor code changes were necessary to get the behavior we desired, and this version appears to beat any other vercmp rendition on a few more cases added in this commit. This commit passes all 58 vercmp tests currently out there. Other 'fixes' still fail on a few tests, namely these ones: test: ver1: 1.5.a ver2: 1.5 ret: -1 expected: 1 ==> FAILURE test: ver1: 1.5 ver2: 1.5.a ret: 1 expected: -1 ==> FAILURE test: ver1: 1.5-1 ver2: 1.5.b ret: 1 expected: -1 ==> FAILURE test: ver1: 1.5.b ver2: 1.5-1 ret: -1 expected: 1 ==> FAILURE 4 of 58 tests failed Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Portuguese (Brazil) translationHugo Doria2008-07-22
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update Polish translationMateusz Herych2008-07-22
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update Russian translationSergey Tereschenko2008-07-22
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update Czech translationVojtěch Gondžala2008-07-22
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update British English translationJeff Bailes2008-07-22
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update Turkish translationSamed Beyribey2008-07-22
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update Chinese Simplified translation甘露(Lu.Gan)2008-07-22
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Hungarian translationNagy Gabor2008-07-22
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Spanish translationJuan Pablo González Tognarelli2008-07-22
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Italian translationGiovanni Scafora2008-07-22
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update German translationMatthias Gorissen2008-07-22
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update French translationXavier Chantry2008-07-22
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>