Commit Graph

864 Commits

Author SHA1 Message Date
João Felipe Santos f374ead66a Portuguese Brazilian translation update for pacman 3.1.1
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-01-19 00:00:50 +01:00
Matthias Gorissen 8343121f87 Corrections of German translation
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-01-18 00:16:09 +01:00
Juan Pablo Gonzalez 6f181c22d2 Spanish translation update for pacman 3.1.1
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-01-16 23:54:34 +01:00
Vojtěch Gondžala de5e49f4be Czech translation update for pacman 3.1.1
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-01-16 17:19:50 +01:00
Jeff Bailes 601f6a8a29 English (British) translation update for pacman 3.1.1
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-01-16 17:14:50 +01:00
Nagy Gabor d9a9ffd77d Hungarian translation update for pacman 3.1.1
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
2008-01-16 17:11:44 +01:00
Dan McGee db557e0563 Update message files for 3.1.1 release
We are in string freeze for the 3.1.1 release. This commit updates all the
message files to the latest code, and all translation updates should be
based off of these po-files. Please attempt to keep the line number changes
to a minimum- there should be no reason to update these po files with just
new line numbers. That way we can more easily see exactly which translations
were updated.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-14 23:16:16 -06:00
Chantry Xavier 0c5b68877b Change the versioned provision format.
Change the 'provname provver' format to 'provname=provver'.
In .PKGINFO, the provisions are copied from the PKGBUILD without quotes. So
the provision version was actually handled as a different provision...

See FS#9171.

Dan: Unfortunately we have to change our original specification for
versioned provisions with this patch, but it ends up being the simpler and
cleaner solution in the long run, and if there is any time to change it the
time is now before many packages have been built. Keeping the ' ' based
format would have required us to do special parsing in repo-add, as well as
being susceptible to users not using quotes in their provides array.

Hopefully this will resolve the issues we had with our initial plan. Sorry
for the confusion.

Acked-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-14 22:03:03 -06:00
Jaroslaw Swierczynski 801a268056 FS#9183 : force correct permissions on tmp/.
[Xav: removed unneeded makepath_internal function, and fixed the permission
value : 1777 -> 01777]
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-13 18:42:26 -06:00
Chantry Xavier 8186dc11a9 Ensure correct dir permissions in the database.
Fix for FS#9176.
A previous commit (6e8daa553b) already forced all database files to 644.
Now the directories are also forced to 755.

Additionally, repo-add now sets the umask to 022, just like makepkg does, to
fix the problem at its root.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-13 12:51:37 -06:00
Chantry Xavier ab506f77c0 util.c : fix segfault when the cachedir isn't usable.
For example, if the cachedir is a broken symlink or a non writable
directory, pacman fallbacks to /tmp/. Just before doing that, it freed the
handle->cachedirs list twice !
once in _alpm_filecache_setup, and once in alpm_option_set_cachedirs. So the
first one was removed.

Fixes FS#9186.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-01-13 12:21:21 -06:00
Nagy Gabor 633dbeac88 small checkdeps speed-up
In the old code 'alpm_list_diff(_alpm_db_get_pkgcache(db), dblist,
_alpm_pkg_cmp);' was slow.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>

[Xav: In my opinion, computing both dblist and modified in one for loop also makes
the code clearer, besides being more efficient.
Also renamed joined to targets since I also find that clearer.]

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-01-12 11:05:52 -06:00
Chantry Xavier e654236db6 don't send CHECKDEPS_DONE event when NODEPS is set.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-12 10:45:45 -06:00
Allan McRae 8372a9e8c7 Only notify of dependency check in removal if performed
Moves "checking dependencies..." notification into code block where
dependency checking is performed to stop spurious notification.
Reference: http://archlinux.org/pipermail/pacman-dev/2008-January/010714.html

Signed-off-by: Allan McRae <mcrae_allan@hotmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-11 19:29:49 -06:00
Dan McGee f9a7d8cba4 Fix library interface
Two functions defined in alpm.h were not marked with SYMEXPORT, causing
linking errors if they were used.

In addition, remove the incorrect use of the 'alpm_' prefix from an internal
function and replace it with '_alpm_'.

Fixes FS#9155.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-11 08:43:10 -06:00
Chantry Xavier 47761d5aec Move the fallback on providers from backend to frontend.
This reverts commit e28973169d.
This code might fit better in the frontend than in the backend finally.
Ref: http://www.archlinux.org/pipermail/pacman-dev/2007-November/010150.html

I also changed it for fixing FS#8763 :
if there is exactly one provider, pacman will pull it and print a warning.
if there are several providers, pacman will list them and fail. It's up to
the user to pick one. Add sync501 pactest to reflect that.
2008-01-09 18:33:11 -06:00
Dan McGee 9dd016001e Remove upgradedelay and all code associated with it
It wasn't even implemented correctly, and it really doesn't have a use if
packagers just do their job correctly anyway for a distro. Let's not try to
solve a problem with the wrong solution now.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-08 15:49:52 -06:00
Dan McGee a24c323aba Remove unused date element from pmpkg_t struct
We had an unused date element in the pmpkg_t struct (not builddate or
installdate). Kill it off and fix the one function that was using it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-08 13:29:41 -06:00
Chantry Xavier a71f4c4c6a conflict.c : fix for FS#8156, detect conflict between symlink and dir.
The previous fileconflict check (package vs filesystem) skipped the conflict
when the file on the filesystem was a directory or a symlink to a directory,
no matter what the file in the package was.
Now, the conflict will only be skipped if the file in the package is a
directory (so compatible with a dir or a dir symlink on the filesystem).

So in the case of 8156 (new fileconflict003 pactest for this case), instead
of silently ignoring the extraction of the test symlink, pacman will now
fail because of a file conflict between the test symlink in the pkg2 package
and the test directory on the filesystem.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-01-06 10:59:41 +01:00
Dan McGee 1a0aaa20df Don't stat cachedir immediately
By attempting to stat the cachedir when we load the pacman config, pacman
bails out if it is a non-existant directory, even if it will never be
needed. This is unfortunate as it is only used for sync transactions anyway.
Instead, wait until we need it in _alpm_filecache_setup to actually do
anything.

Reported as FS#9096.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-05 17:39:38 -06:00
Dan McGee 5aa873edb6 sync.c: add sanity check so we don't dereference a null pointer
Originally noticed in FS#9024, but was fixed in previous changes anyway.
However, it doesn't hurt to still check it.

Also add a pactest from Chantry Xavier for the original problem to ensure
we can't reproduce it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-05 17:35:43 -06:00
Chantry Xavier 85a8b150ed conflict.c : fix for upgrade042.
Thanks to the proactive backup handling, we don't need to add the moving
file to the skip_add list.
The backup handling will make sure nothing gets overwritten.

Ref: http://www.archlinux.org/pipermail/pacman-dev/2007-December/010610.html

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-05 16:49:09 -06:00
Chantry Xavier 601a85082d add.c : fix upgrade026 pactest.
This was the case of the bash packaging error where a file was removed from
the package but not the backup array.
I just added a sanity check so that only the files from the backup array
that are also in the filelist are used.

I had to edit upgrade026 pactest slightly : it required the file to be
copied to .pacsave instead of moved. But just moving it should be enough, as
we agreed on the ML :
http://www.archlinux.org/pipermail/pacman-dev/2007-December/010440.html

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-05 13:47:49 -06:00
Matthias Gorissen 04472f925a Update of German translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-05 13:47:35 -06:00
Dan McGee c18191ba5b Small code cleanups with indents/spaces
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-01 20:03:24 -06:00
Dan McGee 4abd710ec9 Remove gettext calls from debug-level messages
These used FUNCTION output level and not DEBUG, so I didn't catch them way
back when I removed those gettext calls. Remove them now (which exposed a
nice little memory access error elsewhere in the code). This should have a
slight speedup effect on the code too as we no longer have to make the
gettext call even when these messages aren't printed.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-01 20:03:24 -06:00
Dan McGee 553ce8323c Fix another usage of pkg_new in _alpm_sync_addtarget
Use _alpm_pkg_dup instead.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-01 20:03:24 -06:00
Dan McGee d18686a563 Switch pkg_new -> pkg_dup in find_replacements
Ugh, it was a pain to figure out why the Total Removed Size was showing up
wrong in the output of removed packages, but this was why- we used a stupid
_alpm_pkg_new call instead of just duping the package. Fix this. In the long
run, we really need to figure out better ways to not duplicate all this
package information.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-01 20:03:24 -06:00
Chantry Xavier ac0605b9c2 new upgade042 pactest + bugfix in chk_filedifference.
This adds a pactest for the relocation of a config file between two packages
(case of etc/profile moving from bash to filesystem).
While running this pactest, I found out that chk_filedifference didn't work
correctly with an empty list as second argument. So that's fixed now.

Ref: http://www.archlinux.org/pipermail/pacman-dev/2007-December/010610.html

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-01-01 20:03:18 -06:00
Dan McGee fbd88a8212 Remove .FILELIST generation from makepkg (and elsewhere)
This is something pacman can do on its own straight from the archive, and we
will reduce the chance of problems occurring becuase of inproper FILELIST
generation as we have had in the past with special characters in filenames.

Once we remove it from makepkg. we can remove any usage of it from all of
our other tools, including pacman, pactest, and contrib/ utilities.

Note that removing it from pacman uncovered a few other bugs anyway, so this
was probably a good move.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-29 11:58:23 -06:00
Chantry Xavier 01930400a5 add a new upgrade026 pactest for backup handling.
This is the bash case when the /etc/profile file was removed by error from
the package, but stayed in the backup array.

Ref:
http://www.archlinux.org/pipermail/arch-dev-public/2007-December/003556.html

Also fixed a little typo in add.c, but it's disabled code.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-12-29 11:17:20 -06:00
Chantry Xavier c913c53322 libalpm/add.c: disable buggy backup handling code that didn't do anything.
As I mentioned earlier on the ML :
http://www.archlinux.org/pipermail/pacman-dev/2007-December/010416.html
the first part of commit 843d368ef6 had no effect because of a bug.

So I fixed the bug, but since this would change backup handling behavior,
and possibly require other bigger changes to work right, I decided to just
disable that part temporarily, and left a TODO in the code.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-28 19:57:11 -06:00
Chantry Xavier 630541a72e french translation : one broken message caused a segfault.
pacman segfaulted on sync012 pactest because of one broken translation.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-12-28 19:56:14 -06:00
Chantry Xavier 457692b928 libalpm/remove.c : switch back to lstat usage.
commit b55abdce7a changed every instance of lstat to alpm_stat to remove an
eventual trailing /, but in remove.c, this is not wanted.

Ref: http://www.archlinux.org/pipermail/pacman-dev/2007-December/010451.html

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-28 19:55:38 -06:00
Allan McRae 14d6832ef2 Allow NULL parameter in alpm_trans_commit
Fixes FS#7380: alpm crashes on passing NULL to alpm_trans_commit in
a sync operation.  Adds check that data parameter is not NULL in
several functions.

Signed-off-by: Allan McRae <mcrae_allan@hotmail.com>
[Dan: fix whitespace]
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-28 19:46:21 -06:00
Allan McRae cca4ec647e Add remove counterparts to alpm_option_add_* functions
Fixes FS#7428. Added functions to remove cachedir, noupgrade, noextract,
ignorepkg, holdpkg and ignoregrp.

Signed-off-by: Allan McRae <mcrae_allan@hotmail.com>
[Dan: fix whitespace]
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-28 19:43:59 -06:00
Nathan Jones 7fdb2ee48a Check ignored packages in _alpm_sync_addtarget().
This will allow someone to install a group but ignore individual
packages inside the group.

Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-21 11:09:24 -06:00
Nathan Jones b43301428e Fix memory leak in shortest_delta_path.
It is possible for the if statement to never succeed, causing path to
never be freed. It is also possible for the if statement to succeed more
than once per loop, which could have caused a segfault.

Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-21 11:08:05 -06:00
Vojtěch Gondžala 9a6582a8fd Add new Czech translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-21 11:05:44 -06:00
Chantry Xavier 020629a371 Finish french translation.
It's probably far from perfect, but at least I tried to translate
everything.
I noticed a missing newline at libalpm/trans.c , line 573 :
_alpm_log(PM_LOG_ERROR, _("call to popen failed (%s)"),

I don't think it's possible to fix it now (string freeze?), so I didn't.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-12-21 11:05:44 -06:00
Nagy Gabor c0845db8f7 Updated Hungarian translation
1 untranslated message translated and 1 message fixed

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-20 08:05:54 -06:00
Nagy Gabor 13dd2864ca PM_DEP_MOD_LT and PM_DEP_MOD_GT depmods added
You can use foo<2.0 and foo>2.0 as depend
add046.py and add047.py pactests were added to check this

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-19 14:48:05 -06:00
Nagy Gabor 47f4c5a480 Updated Hungarian translation
* Updated libalpm translation
* Regenerated hu.po files, because the 'call-for-translators version' was outdated

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-19 13:30:04 -06:00
Giovanni Scafora 16ed9ad19b Updated Italian Translation
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>

	modified:   lib/libalpm/po/it.po
	modified:   po/it.po
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-18 18:27:23 -06:00
Giovanni Scafora a11b2065af Updated Italian Translation for pacman 3.1
Signed-off-by: Giovanni Scafora <linuxmania@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-17 20:43:12 -06:00
Dan McGee ce424a356f Check for errors on descfile extraction
If /tmp was full during the early stages of package extraction, we were
unable to extract the package description file with the call to
archive_read_data_into_fd(archive, fd) becuase we never checked the return
code. Add a check to ensure the extraction was successful and print and
return an error if it was not instead of falling through to a possibly
untrue error message.

This should fix FS #8885.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-16 22:45:57 -06:00
Aaron Griffin 9558639d80 popen does NOT require /bin/sh in a subchroot
I appears that when chrooted, the /bin/sh used by popen is that of the parent
process. This is true until the process forks once chrooted, which we do not
want to do.

As such, this actually makes things nicer. We don't need a /bin/sh in a chroot
to run install scriptlets, and don't need to check for it in the root directory

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10 23:03:16 -06:00
Aaron Griffin 565d2eeed5 Correct scriptlet usage pattern
The new pattern is as follows:
    . /path/to/scriptlet
    post_upgrade X Y

This requires less frameworking in the install scripts (the three lines that
shift and eval a function are nasty)

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10 23:02:07 -06:00
Dan McGee 9781d0d637 Update GNU GPL boilerplate and copyright dates
Update the GPL boilerplate to direct people to the GNU website for a copy of
the license, as well as bump all of Judd's copyrights to 2007.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10 22:55:39 -06:00
Dan McGee 7249c08bdf Improve changelog handling through addition of open/read/close functions
Thanks to Allan for inspiring all this work on what was one little TODO item
in the codebase. :)

Change changelog handling so we can now dump a changelog from both installed
packages and package files (fixes FS#7371). We do this by moving all of the
machinery to the backend where it should have been in the first place.

The changelog reading is now done through a open/read/close interface
similar to the fopen/fread/fclose functions (can you guess how it is done?).
It is buffered by the frontend, so programs using the library can read as
much or as little as they want at a time.

Unfortunately, I could not implement a changelog_feof function due to some
shortcomings of libarchive. However, I left the stub code in there,
commented out, in case it becomes possible later or anyone wants to take a
stab at it.

Original-work-by: Allan McRae <mcrae_allan@hotmail.com>
Improved-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-09 11:33:08 -06:00