Commit Graph

1196 Commits

Author SHA1 Message Date
Xavier Chantry 845f21207c libalpm/util.c : remove _alpm_strreplace
This function is unused since commit
358cc5804a.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
[Dan: also kill from util.h]
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06 19:09:45 -05:00
Xavier Chantry 5b27e78ba0 Check package arch before installing
This implements FS#15622

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06 15:51:25 -05:00
Xavier Chantry 594621cbeb Add Architecture and --arch option
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-06 15:50:42 -05:00
Dan McGee 92f0775e76 Merge branch 'maint'
Conflicts:
	lib/libalpm/dload.c
2009-08-18 20:49:25 -05:00
Xavier Chantry 7dae79e7b9 dload.c : various fixes
- fix one memleak if get_filename failed

- cleanup according to Joerg's feedback:

"url_for_string: If fetchParseURL returned successful, you should always
have a scheme set. The logic for anonftp should only be needed for very
broken server -- do you know of any such?

download_internal:
Specifying 'p' is now a nop -- it is tried by default first with
fall-back to active FTP."

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
[Dan: remove from pacman.conf and pacman.conf.5]
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-18 20:47:12 -05:00
Xavier Chantry 6f97842ab2 dload.c : change the way to check for mtimes
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 d7675e393f)
2009-08-18 20:41:47 -05:00
Dan McGee 14a93b2e43 Make fetch timeout actually 10 seconds
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>
2009-08-13 21:01:40 -05:00
Dan McGee 7bb9c4098b Merge branch 'maint' 2009-08-08 11:23:38 -05:00
Xavier Chantry 3cf0ee98c0 dload.c : only call fwrite once
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-08 11:17:24 -05:00
Xavier Chantry d7675e393f dload.c : change the way to check for mtimes
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-08 11:13:33 -05:00
Xavier Chantry 4fa6f262a6 Add a missing newline.
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-03 07:39:05 -05:00
Marc - A. Dahlhaus 8152077f6d Use full path to ldconfig
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-03 07:37:44 -05:00
Xavier Chantry e8db103122 fix warning when internal download is not used
After commit 30c4d53ce5, 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-02 12:16:02 -05:00
Armando M. Baratti 44359218ea Update Brazilian Portuguese translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-08-01 15:51:57 -05:00
Dan McGee bc83ff76c6 French translation reformat
'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-08-01 13:36:07 -05:00
Jeff Bailes 4cadee4f08 update english british translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-31 01:49:07 +02:00
Nagy Gabor fc29d0c990 update hungarian translation
Thanks to Avramucz Peter <muczyjoe@gmail.com>
for having translated all the scripts !

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-30 19:27:37 +02:00
Lu Gan 9a0122982c update simplified chinese translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-30 19:27:37 +02:00
Sergey Tereschenko 433c52bb91 update russian translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-30 19:27:37 +02:00
Roman Kyrylych (Роман Кирилич) 78e92b1d02 update ukrainian translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-30 19:27:36 +02:00
Matthias Gorissen 05533b8b11 update german translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29 19:41:34 +02:00
Baurzhan Muftakhidinov 00c26338de update Kazakh translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29 19:37:53 +02:00
Volodia Macovei 684047a764 update romanian translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29 19:34:27 +02:00
Mateusz Herych e65d82afa1 update polish translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29 19:34:27 +02:00
Samed Beyribey 734aa1ce59 update turkish translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29 19:34:27 +02:00
Vojtech Gondzala 4e643a3dd7 update czech translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29 19:34:26 +02:00
Juan Pablo Gonzalez Tognarelli 08c535e262 update spanish translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29 19:34:26 +02:00
Giovanni Scafora 8fdab1e1f0 update italian translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29 19:34:26 +02:00
Xavier Chantry 04c31828b6 Update French translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-07-29 19:33:30 +02:00
Dan McGee 9b086d8b9e Update PO files in prep for 3.3 release 2009-07-27 21:42:16 -05:00
Dan McGee fb1936bc19 Update POT files 2009-07-27 21:41:58 -05:00
Dan McGee 2f0fc0decb Update copyrights in gettext files 2009-07-27 21:40:43 -05:00
Sebastian Nowicki 30c4d53ce5 Add a fetch callback to allow front-end download support
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-22 21:27:46 -05:00
Nagy Gabor 1d19f0896c Introduce -Suu
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-22 20:16:52 -05:00
Nagy Gabor cf669eda9c Fix a minor memleak
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-21 21:45:07 -05:00
Giovanni Scafora 1c4596b4be Update Italian Translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-21 20:24:06 -05:00
Xavier Chantry 344ced22c3 Fix one bug with .paccheck leftover file
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-20 16:38:15 -05:00
Xavier Chantry 60b6cde637 Fix 2 minor memleaks
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-20 16:37:45 -05:00
Xavier Chantry 5d15bb68f7 Do not create .pacsave with -R, if the file is unchanged
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-20 16:37:37 -05:00
Xavier Chantry 45f90de0eb Fix klibc conflict case.
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-20 10:13:42 -05:00
Xavier Chantry bfd6817112 Fix fileconflict004
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-20 10:13:25 -05:00
Xavier Chantry 2e043aae36 Run ldconfig inside chroot.
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-16 06:12:04 -05:00
Dan McGee c72b4543b6 Update copyright headers and messages
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-07-01 02:08:33 -05:00
Dan McGee be7266155f Allow remove to accept 'local/' prefix
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-07-01 01:42:35 -05:00
Volodia Macovei 6af163dd79 Add new Romanian translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-30 23:34:18 -05:00
Dan McGee a89eae99f6 Fix compile warning fail on older versions of GCC
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-30 23:14:18 -05:00
Dan McGee 8c8fa2d82c Search package groups when searching a DB
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-23 21:51:49 -05:00
Nagy Gabor f250b034b4 Enable remove progressbar with -S (conflict resolving)
$ 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-13 09:57:59 -05:00
Dan McGee aa579b8438 Give sensible feedback when a repo has no configured servers
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-08 20:02:17 -05:00
Nagy Gabor 19b8b63885 Introduce _alpm_pkg_free_trans()
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-07 15:11:16 -05:00