summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* dload.c : change the way to check for mtimesXavier Chantry2009-08-18
| | | | | | | | | | | | libfetch supports checking mtime so we do not need to do it manually. when the databases are already up-to-date, initiating a connection with fetchXGet and closing it right after with fetchIO_close took a very long time (up to 10min!) on some network. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit d7675e393ff3cecb5408c243898ebaae80c5988d)
* Make fetch timeout actually 10 secondsDan McGee2009-08-13
| | | | | | | | | We had 10000 as our timeout value, assuming it was expressed in ms. This is false after looking at the current code, so reset it back to 10 seconds. Addresses FS#15369. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add a missing newline.Xavier Chantry2009-08-03
| | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Use full path to ldconfigMarc - A. Dahlhaus2009-08-03
| | | | | | | | | | If /sbin is not in the PATH and sudo is used, ldconfig cannot be found. So use /sbin/ldconfig instead. The code checked for the existence of /sbin/ldconfig anyway.. Signed-off-by: Marc - A. Dahlhaus <mad@wol.de> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* fix warning when internal download is not usedXavier Chantry2009-08-02
| | | | | | | | | After commit 30c4d53ce5c16cbbb17a88fe1ad14faf53d91999, get_destfile and get_tempfile are only used for internal download, so move these two functions inside the ifdef Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Brazilian Portuguese translationArmando M. Baratti2009-08-01
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* French translation reformatDan McGee2009-08-01
| | | | | | | | 'make distcheck' had issues with this one and reformatted it. In addition, it found a fuzzy message which is now fixed due to an inadvertent msgid edit. Signed-off-by: Dan McGee <dan@archlinux.org>
* update english british translationJeff Bailes2009-07-31
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update hungarian translationNagy Gabor2009-07-30
| | | | | | | Thanks to Avramucz Peter <muczyjoe@gmail.com> for having translated all the scripts ! Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update simplified chinese translationLu Gan2009-07-30
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update russian translationSergey Tereschenko2009-07-30
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update ukrainian translationRoman Kyrylych (Роман Кирилич)2009-07-30
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update german translationMatthias Gorissen2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update Kazakh translationBaurzhan Muftakhidinov2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update romanian translationVolodia Macovei2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update polish translationMateusz Herych2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update turkish translationSamed Beyribey2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update czech translationVojtech Gondzala2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update spanish translationJuan Pablo Gonzalez Tognarelli2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* update italian translationGiovanni Scafora2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update French translationXavier Chantry2009-07-29
| | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update PO files in prep for 3.3 releaseDan McGee2009-07-27
|
* Update POT filesDan McGee2009-07-27
|
* Update copyrights in gettext filesDan McGee2009-07-27
|
* Add a fetch callback to allow front-end download supportSebastian Nowicki2009-07-22
| | | | | | | | | | | This allows a frontend to define its own download algorithm so that the libfetch dependency can be omitted without using an external process. The callback will be used when if it is defined, otherwise the old behavior applies. Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> [Dan: minor cleanups] Signed-off-by: Dan McGee <dan@archlinux.org>
* Introduce -SuuNagy Gabor2009-07-22
| | | | | | | | | | | | | | | If the user switches from unstable repo to a stable one, it is quite hard to sync its system with the new repo (the user will see many "Local is newer than stable" messages, nothing more). That's why I introduced -Suu, which treats a sync package like an upgrade, iff the package version doesn't match with the local one's. I added a new pactest (sync104.py) to test this, and I updated the documentation of -Su. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: slight doc reword] Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix a minor memleakNagy Gabor2009-07-21
| | | | | Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update Italian TranslationGiovanni Scafora2009-07-21
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix one bug with .paccheck leftover fileXavier Chantry2009-07-20
| | | | | | | | | | | | | This happens for example if you install a new package, and one of its backup config file is already on the file system. If the local file was different, it was saved to .pacorig which is fine. However if the local file and pkg file were the same, the pkg file (temporarily extracted as .paccheck) was left on the system. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix 2 minor memleaksXavier Chantry2009-07-20
| | | | | Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Do not create .pacsave with -R, if the file is unchangedXavier Chantry2009-07-20
| | | | | | | | | | This fixes FS#15546 Also fix the interface of unlink_file which was really stupid.. (alpm_list_t used with only one element) Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix klibc conflict case.Xavier Chantry2009-07-20
| | | | | | | A package can now replace symdir->dir by dir without fileconflicts. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix fileconflict004Xavier Chantry2009-07-20
| | | | | | | | | | | | When one package wants to replace a directory by a file, we check that all files in that directory were owned by that package. Additionally pacman can be more verbose when the extraction of the symlink (or file) fails. The patch to add.c looks more complex than it is, I just moved and reindented code to handle cases 10 and 11 together. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Run ldconfig inside chroot.Xavier Chantry2009-07-16
| | | | | | | | | This fixes FS#15294. The code to run a command inside a chroot was refactored from the _alpm_runscriptlet function to _alpm_run_chroot. Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
* Update copyright headers and messagesDan McGee2009-07-01
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Allow remove to accept 'local/' prefixDan McGee2009-07-01
| | | | | | | See FS#14642- this allows -Qs output to be fed back into pacman without problems or having to strip off the 'local/' prefix manually. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add new Romanian translationVolodia Macovei2009-06-30
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix compile warning fail on older versions of GCCDan McGee2009-06-30
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Search package groups when searching a DBDan McGee2009-06-23
| | | | | | | See FS#13099. This makes sense especially for the pacman frontend, as we show groups in the search output. Signed-off-by: Dan McGee <dan@archlinux.org>
* Enable remove progressbar with -S (conflict resolving)Nagy Gabor2009-06-13
| | | | | | | | | | | | | | | | | | | | | | $ sudo pacman -S mc Old output: *********** :: mc conflicts with mc-mp. Remove mc-mp? [Y/n] y ... (1/1) checking for file conflicts [################] 100% (1/1) installing mc [################] 100% New output: *********** :: mc conflicts with mc-mp. Remove mc-mp? [Y/n] y ... (1/1) checking for file conflicts [################] 100% (1/1) removing mc-mp [################] 100% (1/1) installing mc [################] 100% Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Give sensible feedback when a repo has no configured serversDan McGee2009-06-08
| | | | | | | | | | | | | | This fixes FS#14899. When running an -Sp operation without servers configured for a repository, we would segfault, so add an assert to the backend method returning the first server preventing a null pointer dereference. In addition, add a new error code to libalpm that indicates we have no servers configured for a repository. This makes -Sy and -S <package> operations fail gracefully and helpfully when a repo is set up with no servers, as the default mirrorlist in Arch is provided this way. Signed-off-by: Dan McGee <dan@archlinux.org>
* Introduce _alpm_pkg_free_trans()Nagy Gabor2009-06-07
| | | | | | | | | The main purpose of this function to make our code more readable. It frees transaction specific fields of pmpkg_t. (It is used when a package is removed from the target list.) Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* xdelta : only handle gz compression specificallyXavier Chantry2009-06-06
| | | | | | | | | | | | | | There is apparently no need to handle the re-compression manually when applying a xdelta patch in case of bzip2 or xz. Only gzip needs to be handled specifically for disabling timestamp with the -n option. After this patch, if xdelta is enhanced with xz support (1-line patch), it will be transparent from pacman side. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Introduce PM_TRANS_FLAG_NOLOCKNagy Gabor2009-06-01
| | | | | | | | | | | | This flag indicates that the front-end will not call alpm_trans_commit(), so the database needn't be locked. This is the first step toward fixing FS#8905. If this flag is set, alpm_trans_commit() does nothing and returns with an error (that has new code: PM_ERR_TRANS_NOT_LOCKED). Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove unused error codes and handle PM_ERR_RETRIEVE by alpm_strerror()Nagy Gabor2009-05-18
| | | | | Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove find_replacements()Nagy Gabor2009-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Foo replaces bar" simply means that "foo is a new version of bar". So this patch refactors the code to use this "rule". _alpm_sync_sysupgrade now does the following for each local package [bar] (pseudo-code): for db in syncdbs { if(db contains bar) {check if db/bar is an upgrade; break;} replacers = find(bar replacers in db); if(replacers!=NULL) {ask_user; break;} } Note: 1. Replacers are grouped per repo. If more than one package replace bar in a repo, all of them are considered ("package set of bar replacers"). 2. If repo1/foo1 and repo2/foo2 both replaces bar, only repo1/foo1 is considered (if repo1 stands before repo2 in pacman.conf). FS#11737 is fixed. 3. It can happen that pacman doesn't consider any replacer, if it found a literal "earlier", so sync132.py modified accordingly (btw, that situation should not appear irl). The new sysupgrade code doesn't use sync_newversion(), so I removed the "local is newer than repo" message, which was annoying with -Qu and SyncFirst. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix non-C style comments in libalpmGerardo Exequiel Pozzi2009-05-11
| | | | | Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Dan McGee <dan@archlinux.org>
* Look in target-list first to resolve dependenciesBryan Ischo2009-04-11
| | | | | | | | | | | | | | | This fixes a bug introduced by my previous changes which changes the behavior of IgnorePkg/IgnoreGroup to allow the user to remove unresolvable packages from the transaction. The bug is that the target-list was no longer being consulted first to resolve dependencies, which means that if two packages in the sync database satisfied a dependency, and the user explicitly requested one of those two packages in the sync, the other package was still being pulled in. A new test was added, sync993.py, to verify the desired behavior. Signed-off-by: Bryan Ischo <bji-keyword-pacman.3644cb@www.ischo.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove duplicates from the unresolvable list before prompting userBryan Ischo2009-04-11
| | | | | Signed-off-by: Bryan Ischo <bji-keyword-pacman.3644cb@www.ischo.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* const-ify endswith()Dan McGee2009-04-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>