Commit Graph

1338 Commits

Author SHA1 Message Date
Dan McGee 4828d9ef7c libalpm: clean up lock function
We were doing a lot of manual work; leverage the standard library a bit to
do more for us.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11 14:42:04 -05:00
Dan McGee 6e312220ec Reduce calls to list_count() in removing package
We don't need to count the number of packages left once per file when
removing; we only need to do it once per package. Also move a variable into
the correct scope.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11 14:42:04 -05:00
Dan McGee 3bc8c28ce3 Add missing get_usedelta() method
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11 14:42:04 -05:00
Dan McGee 145103aacc typing: a few more fixes for special int types
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11 14:41:59 -05:00
Dan McGee 35dc9b0314 int typing: s/unsigned short/int/ in libalpm
After our recent screwup with size_t and ssize_t in the download code, I
found the `-Wsign-conversion` flag to GCC to see if we were doing anything
else boneheaded. I didn't find anything quite as bad, but we did have some
goofups- most of our public unsigned methods would return -1 on error, which
is a bit odd in an unsigned context.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11 13:51:47 -05:00
Dan McGee cf0d619670 Merge branch 'maint' 2009-10-11 12:57:57 -05:00
Xavier Chantry 5e03941ee5 alpm_list : fix a bug in alpm_list_remove
A NULL list element triggered an infinite loop. Not cool :)

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11 12:55:55 -05:00
甘露(Lu.Gan) aea22ac2fd Update Chinese translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-11 12:55:17 -05:00
Christian Larsson 9282a4a909 Update Swedish translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-07 18:12:26 -05:00
甘露(Lu.Gan) f77d73af4b Update chinese translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-07 18:12:26 -05:00
Xavier Chantry ba14bd7728 New Greek translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-07 18:12:26 -05:00
Xavier Chantry 8db120c260 Update translations
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-07 18:12:26 -05:00
Xavier Chantry a0acf8b509 Update all pot and po files for 3.3.2 release
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-10-07 18:12:26 -05:00
Dan McGee 8e7652f1af Merge branch 'maint'
Conflicts:
	lib/libalpm/dload.c
2009-09-29 21:08:06 -05:00
Xavier Chantry 20392c0a02 dload : fix infinite download (big type mistake)
fetchIO_read returns -1 in case of error, and the return type is
ssize_t, not size_t ! So we converted -1 to an unsigned, which led to
huge file write.

The rest is just changing the error return a bit.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-29 20:52:56 -05:00
Dan McGee 86d4b8a3aa Merge branch 'maint' 2009-09-22 21:38:16 -05:00
Dan McGee e76b3374d8 Clean up translation file headers
Get them a bit more standardized across the board, as they were quite a
mess. Also note the two new translations we received for 3.3.1.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-22 18:28:42 -05:00
Laszlo Papp 802b1a6f2f Add Swedish translation
This is for 3.3.0, not for 3.3.1. But since there are only like 10 messages
missing, it seems worth including now.

Signed-off-by: Christian Larsson <congacx@gmail.com>
Signed-off-by: Laszlo Papp <djszapi2@archlinux.us>
[Dan: fix some busted translation strings]
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-22 18:09:55 -05:00
Ondrej Kucera cfb86fed7c Update Czech translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-09-23 00:22:41 +02:00
Rodrigo Flores 38ac020f51 Update Brazilian translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-09-22 21:48:40 +02:00
Laszlo Papp 9c13a6c364 Add Norwegian translation
Signed-off-by: Hans-Kristian Arntzen <maister@archlinux.us>
Signed-off-by: Laszlo Papp <djszapi@archlinux.us>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-21 22:43:55 -05:00
Mateusz Herych c07aef0d6e Update Polish translation
Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
2009-09-20 16:31:10 -05:00
Dan McGee 72883e3bcb Fully implement database lazy loading
Commit 34e1413d75 attempted to implement lazy loading of package databases.
Although it took care of my main complaint (creating the database directory
if it didn't exist), it didn't allow sync repos to be registered before
alpm_option_set_dbpath() had been called.

With this patch, we no longer compute the individual repository DB paths
until necessary, allowing full lazy loading to work as intended, and
allowing us to drop the extra setlibpath() calls from the frontend. This
allows the changes introduced in a2cd48960 (but later reverted) to be added
back in again.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-20 12:19:57 -05:00
Dan McGee 6bfca2fd14 Merge branch 'maint'
Message updates made this one a bit messy, but nothing too bad.

Conflicts:
	lib/libalpm/add.c
	lib/libalpm/remove.c
2009-09-20 12:09:10 -05:00
Xavier Chantry 481014e944 delta : simple code refactoring
This will make the code re-usable for other purpose.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-20 11:57:12 -05:00
Xavier Chantry f4809dcc9c sync.c : duplicate the target before modifying it
It was probably a bad idea to modify the target directly in case of
repo/pkg syntax.

Duplicating it also allows us to keep the original target string, which
is more informative when printing errors.

Also remove a duplicated error message from libalpm, and improve the
message already returned to the frontend.

$ pacman -S foo/bar

before
error: repository 'foo' not found
error: 'bar': no such repository

after
error: 'foo/bar': could not find repository for target

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-20 11:56:46 -05:00
Giovanni Scafora 6cd8d6bd05 Update Italian translation
Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
2009-09-18 22:01:07 +02:00
Roman Kyrylych 90a06b1cf0 Update Ukrainian translation
Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
2009-09-18 22:00:19 +02:00
Samed Beyribey ccf7c31f52 Update Turkish translation
Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
2009-09-18 22:00:19 +02:00
Juan Pablo González Tognarelli 419c4a2afa Update Spanish translation
Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
2009-09-18 22:00:19 +02:00
Sergey Tereschenko 65e7682638 Update Russian translation
Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
2009-09-18 22:00:19 +02:00
Volodia Macovei 259cb3aad4 Update Romanian translation
Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
2009-09-18 22:00:19 +02:00
Baurzhan Muftakhidinov 9516d5afe6 Update Kazakh translation
Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
2009-09-18 22:00:19 +02:00
Nagy Gabor 5d0734861f Update Hungarian translation
Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
2009-09-18 14:34:05 +02:00
Matthias Gorissen 9424197b42 Update German translation
Signed-off-by: Giovanni Scafora <giovanni@archlinux.org>
2009-09-18 14:34:05 +02:00
Dan McGee 922448a9bf Update en_GB translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-16 19:44:01 -05:00
Xavier Chantry 9d4448dc7f Update french translation
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-16 19:37:04 -05:00
Xavier Chantry 9505c594fd Update all pot and po files for 3.3.1 release
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-16 19:36:59 -05:00
Xavier Chantry 1df3b91931 String improvements
Add more untranslated strings, improve consistency, etc.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-16 19:36:49 -05:00
Nagy Gabor 08ee4059b5 Catch an untranslated warning in lib/remove.c
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-15 07:09:16 -05:00
Dan McGee 95cb4b6874 Merge branch 'maint' 2009-09-14 22:10:20 -05:00
Nagy Gabor d0d6c58c05 Add makepkgopt to be_package.c
After commit 774c252 the --debug output shows 5-6 "syntax error..." lines
for each package. After this patch pacman recognizes makepkgopt as a valid
key, but doesn't do anything.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-14 22:09:05 -05:00
Xavier Chantry b4317a740a Change the interface for target loading
-int alpm_trans_sysupgrade(int enable_downgrade);
-int alpm_trans_sync(char *target);
-int alpm_trans_add(char *target);
-int alpm_trans_remove(char *target);
+int alpm_sync_sysupgrade(int enable_downgrade);
+int alpm_sync_target(char *target);
+int alpm_sync_dbtarget(char *db, char *target);
+int alpm_add_target(char *target);
+int alpm_remove_target(char *target);

* functions renaming
* add new sync_dbtarget which allows to specify the db
* repo/ syntax handling is moved to frontend
( should implement FS#15141)
* group handling is moved to backend
( see http://www.archlinux.org/pipermail/pacman-dev/2009-June/008847.html )
2009-09-12 13:06:43 +02:00
Xavier Chantry 8ff3b87066 Remove transaction type
This basically started with this change :

 /* Transaction */
 struct __pmtrans_t {
-       pmtranstype_t type;
        pmtransflag_t flags;
        pmtransstate_t state;
-       alpm_list_t *packages;      /* list of (pmpkg_t *) */
+       alpm_list_t *add;      /* list of (pmpkg_t *) */
+       alpm_list_t *remove;      /* list of (pmpkg_t *) */

And then I have to modify all the code accordingly.
2009-09-08 22:17:41 -05:00
Nagy Gabor 0da96abc90 Use sync.c for upgrade transaction prepare and commit
This patch utilizes the power of sync.c to fix FS#3492 and FS#5798.
Now an upgrade transaction is just a sync transaction internally (in alpm),
so all sync features are available with -U as well:
* conflict resolving
* sync dependencies from sync repos
* remove unresolvable targets

See http://www.archlinux.org/pipermail/pacman-dev/2009-June/008725.html
for the concept.

We use "mixed" target list, where PKG_FROM_FILE origin indicates local
package file, PKG_FROM_CACHE indicates sync package. The front-end can add
only one type of packages (depending on transaction type) atm, but if alpm
resolves dependencies for -U, we may get a real mixed trans->packages list.

_alpm_pkg_free_trans() was modified so that it can handle both target types
_alpm_add_prepare() was removed, we use _alpm_sync_prepare() instead
_alpm_add_commit() was renamed to _alpm_upgrade_targets()

sync.c (and deps.c) was modified slightly to handle mixed target lists,
the modifications are straightforward. There is one notable change here: We
don't create new upgrade trans in sync.c, we replace the pkgcache entries
with the loaded package files in the target list (this is a bit hackish) and
call _alpm_upgrade_targets(). This implies a TODO (pkg->origin_data.db is
not accessible anymore), but it doesn't hurt anything with pacman front-end,
so it will be fixed later (otherwise this patch would be huge).

I updated the documentation of -U and I added a new pactest, upgrade090.py,
to test the syncdeps feature of -U.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-09-08 22:04:14 -05:00
Nagy Gabor 12b55958d8 Add a new reason field to pmconflict_t struct
Sometimes "foo conflicts with bar" information is not enough, see this
thread: http://bbs.archlinux.org/viewtopic.php?id=77647. That's why I added
a new reason field to our pmconflict_t struct that stores the packager-
defined conflict that induced the fact that package1 conflicts with
package2.

I modified the front-end (in callback.c, sync.c, upgrade.c) to print this
new information as well.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
2009-09-08 21:58:52 -05:00
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
Xavier Chantry 13b281d743 xdelta : only handle gz compression specifically
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-06 11:16:45 -05:00
Nagy Gabor c520d38451 Introduce PM_TRANS_FLAG_NOLOCK
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-06-01 22:00:57 -05:00
Nagy Gabor 0bf340f73c Remove unused error codes and handle PM_ERR_RETRIEVE by alpm_strerror()
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-05-18 23:11:43 -05:00
Nagy Gabor 882bff36ac Remove find_replacements()
"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-18 23:11:05 -05:00
Gerardo Exequiel Pozzi ed848b1c54 Fix non-C style comments in libalpm
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-05-11 20:26:49 -05:00
Bryan Ischo db3e166503 Look in target-list first to resolve dependencies
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-11 14:39:24 -05:00
Bryan Ischo d70465decc Remove duplicates from the unresolvable list before prompting user
Signed-off-by: Bryan Ischo <bji-keyword-pacman.3644cb@www.ischo.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 14:24:52 -05:00
Dan McGee 4b78852f7e const-ify endswith()
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 14:13:03 -05:00
Nagy Gabor aefb4e0fa5 Remove pmsyncpkg_t
pmsyncpkg_t data sructure was removed:
1. pmpkg_t.reason is used instead of pmsyncpkg_t.newreason. (The target
packages come from sync repos, so we can use this field without any
problems. Upgrade transaction also uses this field to store this info.)
2. pmsyncpkg_t.removes was moved to pmpkg_t.removes.
This step requires careful programming, because we don't duplicate packages
when we add them to trans->packages. So we modify sync pkgcache when we
add this transaction-only info to our package. Hence it is important to
free this list when we remove any package from the target list
(remove_unresolvable, remove_conflicts, trans_free), otherwise this could
confuse the new sync transactions (with non-pacman GUI).

Overall, our code became ~100 line shorter, and we can call our helper
functions directly on trans->packages in sync.c, we don't need to maintain
parallel package lists.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 14:05:13 -05:00
Nagy Gabor 391952600d Fix for trans001.py (FS#9088)
From now on _alpm_db_find_fileconflicts() works with upgrade and remove
target lists (like checkdeps), which makes it transaction independent
(we still need a trans param because of the progressbar). This is a small
step towards the universal transaction. So we call this function directly
from sync.c before commiting the remove transaction. This is much safer,
but we can get false fileconflict error alarms in some tricky cases
("symlinks puzzle" etc).

The patch on find_fileconflict looks complex, but it is mainly an
"indent-patch", the new code-part can be found after the
/* check remove list ... */ comment, and I modified something around the
"file has changed hand" case (see comment modifications in the code).

Unfortunately sync.c became more ugly, because we have to create 2 parallel
internal transactions: to avoid duplicated work, upgrade transaction is
used to load package data (filelists). This problem will disappear, when
we finally get rid of internal transactions.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 13:59:55 -05:00
Nagy Gabor 634304feae Free *data list when user removes unresolvable packages
Resolvedeps reports error when it cannot resolve some dependencies, puts
them into the *data list, and set pm_errno. If user removes the
unresolvable packages from the target list, we have no error anymore,
so from now on we free *data list (we eliminate a memleak) and unset
pm_errno.

(Additionally I removed two needless lines from the code, unresolvable list
is always freed in cleanup.)

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 13:55:46 -05:00
Nagy Gabor 56fd24ecf8 Print warning in _alpm_resolvedep() if a satisfier package is ignored without QUESTION
After commit f57f8d3386 pacman *silently*
ignores packages from IgnorePkg/IgnoreGroup during dependency resolving,
if prompt == 0. This behavior is changed to "give warning + ignore".
(Otherwise the user is not informed about the fact that the package
resolving was blocked by ignorepkg.)

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 13:54:50 -05:00
Nagy Gabor 77efd51216 New error type: PM_ERR_PKG_IGNORED
This patch fixes FS#12059.
Now sync_addtarget can return with PM_ERR_PKG_IGNORED, which indicates that
although the requested package was found it is in ignorepkg, so alpm could
not add it to the transaction. So the front-end can decide what to do.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 13:54:25 -05:00
Dan McGee 93ca155b48 Merge branch 'xav/repo-add' 2009-04-11 13:50:56 -05:00
Sebastian Nowicki 63fc93607b Add detail documentation for alpm_db_update()
This adds alpm_db_update() to the alpm_databases Doxygen group. The function
is described in more detail and a code example is given.

Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-11 12:50:37 -05:00
Samed Beyribey 3cb4eaef4f fixed typos and alignment problem in Turkish translation
Signed-off-by: Samed Beyribey <ras0ir@eventualis.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-04-05 21:40:58 -05:00
Xavier Chantry c8beffa790 Fix several issues with xdelta
1) The changes to sync.c look big but there are mostly caused by
the indentation. Fix a bug where download_size == 0 because the packages and
deltas are already in the cache, but we still need to build the deltas list
and apply the deltas to create the final package.

2) Fix the gzip / md5sum issue by switching to xdelta3, disabling external
recompression and using gzip -n in pacman, and disable bsdtar compression
and using gzip -n in makepkg.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-03-15 18:08:36 +01:00
Xavier Chantry 9519d22df7 be_files.c : use %jd instead of %ju for intmax_t
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-03-15 11:41:37 -05:00
Xavier Chantry de97282fbd Revert "popen does NOT require /bin/sh in a subchroot"
This reverts commit 9558639d80.

This change was wrong, popen does require /bin/sh in a subchroot.

1) pacman -S lilo -r root

Notice no error

2) rm root/bin/sh ; pacman -S lilo -r root

Notice an error :
error: scriptlet failed to execute correctly

Actually, we already get an explicit error here, when popen is run, so there
is no need to check for bin/sh explicitely.

Besides this check was problematic in some cases. For example, bash itself
has a scriptlet, but only post_install and post_upgrade, no pre_install and
pre_upgrade. However, since bash has a scriptlet, runscriptlet will also be
called before bash is installed. It won't do anything since the scriptlet
has no pre_install function. But if we keep the check, we will still get
"error : no /bin/sh".

Conflicts:

	lib/libalpm/trans.c

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-03-15 11:41:37 -05:00
Xavier Chantry 36863b968f runscriptlet : Flush open fds before fork() to avoid cloning buffers
This is a bug I noticed 2 years ago :
http://www.nabble.com/Re%3A-logging-output-crazy-to11437357.html#a11479679

I thought I fixed it with 57d77eab32

But the bug was still here. Reading man fork, this part caught my attention:

*  The child inherits copies of the parent's set  of  open  file
descriptors.  Each  file descriptor  in  the  child refers to the same open
file description (see open(2)) as the corresponding file descriptor in the
parent.  This means that the two descriptors  share open  file  status
flags, current file offset, and signal-driven I/O attributes (see the
description of F_SETOWN and F_SETSIG in fcntl(2)).

Since the open file descriptors are inherited, it is probably a good idea to
flush them before forking.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-03-15 11:40:49 -05:00
Dan McGee 4458f71851 Merge branch 'maint' 2009-02-28 15:43:36 -06:00
Xavier Chantry 8c09c19139 libalpm: remove from_md5 and to_md5 from pmdelta_t
The from_md5 and to_md5 fields were a nice extra safety, which would avoid
trying to apply deltas on corrupted package files. However, they are not
strictly necessary, since xdelta should be able to detect that on its own.

The main problem is that it is impossible to compute these informations from
the delta only. So repo-add would not be able to compute the delta entry
based on just the delta file.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-28 15:33:46 -06:00
Baurzhan Muftakhidinov b3c67a195f Add new Kazakh translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-24 08:24:47 -06:00
Bryan Ischo f57f8d3386 Don't prompt the user for unignore of IgnorePkg/IgnoreGroup packages
Don't prompt the user for unignore of IgnorePkg/IgnoreGroup packages,
except for packages explicitly listed for sync by the user.  This
eliminates many unnecessary prompts when IgnorePkg/IgnoreGroup is
used.

Signed-off-by: Bryan Ischo <bryan@ischo.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-23 20:37:14 -06:00
Bryan Ischo 0268550401 Enabled new interactive prompt and updated some tests
Enabled a new prompt to ask the user if they'd like to remove
unresolvable packages from the transaction rather than failing it.

Many pactest tests that used to fail now return success codes, because
pacman now issues a prompt allowing the user to cancel rather than
failing many transactions, and the pactest scripts always choose to
cancel with no error rather than failing.  The only net effect is that
the return status of pacman is now 0 in cases where it used to be
nonzero.

Signed-off-by: Bryan Ischo <bryan@ischo.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-23 20:33:56 -06:00
Bryan Ischo 6c4d702cb1 Reorganize code for one-at-a-time resolving
This change reorganizes the internal code so that packages are
resolved one at a time instead of all at once from a list.  This will
allow a future checkin to prompt the user to see if they'd rather
remove unresolvable packages from the transaction and continue, or
fail the transaction.  This change does not affect the actual behavior
of libalpm and all tests pass without changes.

Signed-off-by: Bryan Ischo <bryan@ischo.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-02-18 20:52:22 -06:00
Xavier Chantry 34e1413d75 Delay the creation of local and sync db dir.
We don't need to create the directories when local or sync dbs are
registered. For example, if a sync db does not exist, we cannot even do
"pacman -Q" as an user.

Instead, we can create the local db if needed during the db_prepare
operation, and sync dbs on db_update.

Also remove some more useless abstractions in db_update and switch to a much
more efficient way to remove a sync db : rm -rf.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-01-20 14:07:15 +01:00
Xavier Chantry 14230869e6 Remove some db abstraction crap.
These db_open and db_close looked quite useless. And they caused the db
directory to be opened on a simple registering of a database. This is
totally unneeded, this opening can be delayed to when we actually need it.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-01-20 14:04:54 +01:00
Xavier Chantry eab9684837 alpm_unpack : change prefix handling to workaround FS#12148.
Instead of appending the prefix to each entry name, we can chdir to the
prefix before extracting, and restoring when it is done.
This seems to work better with the strange and special case of FS#12148
where an archive contained the "./" entry.

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-01-20 14:03:46 +01:00
Dan McGee c794661f1e Merge branch 'maint' 2009-01-18 13:48:48 -06:00
Nagy Gabor 472e51b975 Use archive_entry_set_perm instead of archive_entry_set_mode
This patch fixes FS#12148 ('unstable' regular file).
I also changed the other archive_entry_set_mode usage in add.c to
archive_entry_set_perm.

Since I cannot find any relevant info in libarchive manual, I quote
Tim Kientzle (the author of libarchive) here, and I say thank you for
his help.

*** Tim Kientzle wrote *************************************

This is the problem in libalpm/util.c:

323    if(S_ISREG(st->st_mode)) {
324            archive_entry_set_mode(entry, 0644);
325    } else if(S_ISDIR(st->st_mode)) {
326            archive_entry_set_mode(entry, 0755);
327    }

Your example unstable.db.tar.gz is not empty.  It has
one entry in it, called "./".  That entry is marked
as a directory.  But, when you call archive_entry_set_mode(),
you are changing the file type!  archive_read_extract()
then creates the file /var/unstable as you requested.
(archive_read_extract() will replace an empty directory
with a file.)

You should either set the mode value correctly:

323    if(S_ISREG(st->st_mode)) {
324            archive_entry_set_mode(entry, IFREG | 0644);
325    } else if(S_ISDIR(st->st_mode)) {
326            archive_entry_set_mode(entry, IFDIR | 0755);
327    }

Or use archive_entry_set_perm(), which does not change
the file type:

323    if(S_ISREG(st->st_mode)) {
324            archive_entry_set_perm(entry, 0644);
325    } else if(S_ISDIR(st->st_mode)) {
326            archive_entry_set_perm(entry, 0755);
327    }

************************************************************

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-18 13:35:17 -06:00
Nagy Gabor cb7337eb64 db->pkgcache_loaded and db->grpcache_loaded
Clearly the old code was more elegant (NULL cache indicated "not loaded"),
but it had some drawbacks, so from now on we indicate the state of caches
explicitly.

Old drawbacks:
When we had an empty database (unstable), libalpm called db_populate after
every pkgcache access, because NULL pkgcache indicated "not loaded" state.
This is not a common case, but the same situation can happen with grpcache,
which is more problematic: If the user had a custom repo with no groups,
grpcache was always NULL. (grpcache is also loaded per database.) Thus
every get_grpcache call induced a load_grpcache operation, so the benefits
of grpcache was completely lost.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-12 23:59:37 -06:00
Nagy Gabor 4da70d800a Rename alpm_get_md5sum to alpm_compute_md5sum and alpm_dep_get_string to alpm_dep_compute_string
This patch introduces the following function name convention:
_compute_ in function name: the return value must be freed.
_get_ in function name: the return value must not be freed.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-12 23:59:30 -06:00
Nagy Gabor a888f377a5 HoldPkg rework
The HoldPkg feature is even more important when the packages to be held are
pulled automatically by pacman, in a -Rc and -Rs operation. Before, it only
applied when the packages were explicitly requested by the user to be
removed. This patch extends holdpkg to -Rc and -Rs by doing the HoldPkg
check just before trans_commit.

Additionally, the whole HoldPkg stuff was moved to the front-end.

I changed the default behavior to "don't remove", so I modified remove030.py
pactest as well.

See also: FS#9173.

Original-work-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-12 22:44:00 -06:00
Xavier Chantry 8017b0bb8e Remove libdownload support and fix libfetch one.
Aaron said to consider libdownload a dead project so libdownload support was
removed to more easily fix libfetch one (otherwise many ifdef needed).

There was no direct replacement for ferror to detect an error while
downloading. So instead, I added a check at the end to see if the file was
fully downloaded, which is just a small chunk of code taken from here:
http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/libfetch/files/fetch.c?only_with_tag=MAIN

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-12 22:40:15 -06:00
Dan McGee 0501d340cd Merge branch 'maint' 2009-01-06 20:22:15 -06:00
Vojtěch Gondžala c6bcdf4dc7 Update Czech translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-05 19:06:39 -06:00
Dan McGee 6f9539aefb Merge branch 'maint'
Conflicts:
	po/it.po
2009-01-04 11:12:28 -06:00
Mateusz Herych 997a611fa4 Update Polish translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-03 19:07:44 -06:00
Samed Beyribey a2cbccb8c7 Update Turkish translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-03 09:25:24 -06:00
Sergey Tereschenko c850786e43 Update Russian translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-03 09:24:07 -06:00
Roman Kyrylych 3acc265f9d Update Unkranian translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-03 09:20:41 -06:00
Giovanni Scafora 03a63e01a5 Update Italian translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-03 09:17:50 -06:00
Matthias Gorissen 024012649f Update German translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-03 09:14:35 -06:00
Juan Pablo González Tognarelli 792ee97645 Update Spanish translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-03 00:30:09 -06:00
Dan McGee a30bf868ca Merge branch 'maint' 2009-01-03 00:18:22 -06:00
Allan McRae b55f478042 libalpm: add PID to db.lck
This is the first step in being able to automatically remove phantom
lock files.

Signed-off-by: Allan McRae <allan@archlinux.org>
[Dan: fix compilation warnings]
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-01-03 00:00:19 -06:00
Allan McRae a73ad4f0e3 Separate local db directory creation and db write
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>
2009-01-02 23:52:32 -06:00
Sterling Winter b3169a5687 Log pacsave warnings to pacman.log
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>
2009-01-02 23:40:20 -06:00
Dan McGee f8b689d48e Merge branch 'maint'
Conflicts:
	lib/libalpm/dload.c
	po/it.po
	scripts/makepkg.sh.in
2009-01-02 22:48:52 -06:00
Dan McGee cc7f3b705e Print proxy information when downloading
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>
2008-12-10 19:45:15 -06:00
Dan McGee 61c6552862 Merge branch 'maint'
Conflicts:
	lib/libalpm/dload.c
2008-12-02 22:15:02 -06:00
Dan McGee b99bebc008 Add regex to delta code so we don't segfault when reading line
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>
2008-11-30 17:17:00 -06:00
Dan McGee f7192b5958 Minor code cleanups
Mostly noticed when compiling libalpm/pacman with ICC.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-11-17 21:47:55 -06:00