summaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-08-08Merge branch 'maint'Dan McGee1-2/+2
2009-08-08dload.c : only call fwrite onceXavier Chantry1-8/+6
I assume the loop was never iterated more than once, because the write location was not updated at each loop iteration (buffer instead of buffer + nwritten), yet we never had reports of corrupted download. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-08dload.c : change the way to check for mtimesXavier Chantry1-7/+11
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>
2009-08-03Add a missing newline.Xavier Chantry1-1/+1
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-03Use full path to ldconfigMarc - A. Dahlhaus1-1/+1
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>
2009-08-02fix warning when internal download is not usedXavier Chantry1-1/+1
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>
2009-08-01Update Brazilian Portuguese translationArmando M. Baratti1-29/+29
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-01French translation reformatDan McGee1-1/+3
'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>
2009-07-31update english british translationJeff Bailes1-23/+23
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-30update hungarian translationNagy Gabor1-66/+21
Thanks to Avramucz Peter <muczyjoe@gmail.com> for having translated all the scripts ! Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-30update simplified chinese translationLu Gan1-23/+23
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-30update russian translationSergey Tereschenko1-86/+88
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-30update ukrainian translationRoman Kyrylych (Роман Кирилич)1-21/+21
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29update german translationMatthias Gorissen1-68/+23
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29update Kazakh translationBaurzhan Muftakhidinov1-26/+26
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29update romanian translationVolodia Macovei1-73/+27
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29update polish translationMateusz Herych1-23/+23
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29update turkish translationSamed Beyribey1-42/+42
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29update czech translationVojtech Gondzala1-24/+24
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29update spanish translationJuan Pablo Gonzalez Tognarelli1-71/+27
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29update italian translationGiovanni Scafora1-11/+6
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29Update French translationXavier Chantry1-70/+24
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-27Update PO files in prep for 3.3 releaseDan McGee15-1146/+1563
2009-07-27Update POT filesDan McGee1-66/+50
2009-07-27Update copyrights in gettext filesDan McGee1-1/+1
2009-07-22Add a fetch callback to allow front-end download supportSebastian Nowicki4-117/+40
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>
2009-07-22Introduce -SuuNagy Gabor4-7/+19
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>
2009-07-21Fix a minor memleakNagy Gabor1-0/+1
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-21Update Italian TranslationGiovanni Scafora1-79/+65
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-20Fix one bug with .paccheck leftover fileXavier Chantry1-2/+5
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>
2009-07-20Fix 2 minor memleaksXavier Chantry3-1/+3
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-20Do not create .pacsave with -R, if the file is unchangedXavier Chantry1-22/+25
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>
2009-07-20Fix klibc conflict case.Xavier Chantry1-0/+13
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>
2009-07-20Fix fileconflict004Xavier Chantry2-26/+79
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>
2009-07-16Run ldconfig inside chroot.Xavier Chantry5-92/+102
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>
2009-07-01Update copyright headers and messagesDan McGee40-41/+80
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-01Allow remove to accept 'local/' prefixDan McGee1-3/+11
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>
2009-06-30Add new Romanian translationVolodia Macovei2-0/+559
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-30Fix compile warning fail on older versions of GCCDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-23Search package groups when searching a DBDan McGee1-2/+11
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>
2009-06-13Enable remove progressbar with -S (conflict resolving)Nagy Gabor1-0/+1
$ 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>
2009-06-08Give sensible feedback when a repo has no configured serversDan McGee5-1/+9
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>
2009-06-07Introduce _alpm_pkg_free_trans()Nagy Gabor4-14/+18
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>
2009-06-06xdelta : only handle gz compression specificallyXavier Chantry1-7/+4
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>
2009-06-01Introduce PM_TRANS_FLAG_NOLOCKNagy Gabor3-13/+25
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>
2009-05-18Remove unused error codes and handle PM_ERR_RETRIEVE by alpm_strerror()Nagy Gabor2-24/+2
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-05-18Remove find_replacements()Nagy Gabor1-120/+80
"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>
2009-05-11Fix non-C style comments in libalpmGerardo Exequiel Pozzi2-3/+3
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11Look in target-list first to resolve dependenciesBryan Ischo3-10/+18
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>
2009-04-11Remove duplicates from the unresolvable list before prompting userBryan Ischo1-0/+1
Signed-off-by: Bryan Ischo <bji-keyword-pacman.3644cb@www.ischo.com> Signed-off-by: Dan McGee <dan@archlinux.org>