1
0
forked from mirrors/pacman

Compare commits

..

246 Commits

Author SHA1 Message Date
Dan McGee
43787d0067 Regenerate message catalogs and translations
We've had a bit of churn since the last time this was done.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:36:09 -05:00
Dan McGee
a78e3e3a23 Translation file updates from Transifex
Pick up any updates before I push new source messages out to the
service.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:35:31 -05:00
Dan McGee
1df9b2aa79 pacman-key: add an additional plain text 'foo-trusted' file
This is similar to the 'foo-revoked' file we had. This will be used to
inform the user what keys in the shipped keyring need to be explicitly
trusted by the user.

A distro such as Arch will likely have 3-4 master keys listed in this
trusted file, but an additional 25 developer keys present in the keyring
that the user shouldn't have to directly sign.

We use this list to prompt the user to sign the keys locally. If the key
is already signed locally gpg will print a bit of junk but will continue
without pestering the user.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:15:45 -05:00
Dan McGee
067721cbff pacman-key: factor out validate_with_gpg() method
This was copy-pasted code for the most part once the filename was
factored out.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:15:45 -05:00
Dan McGee
33685b960d pacman-key: remove holdkeys functionality
We're putting the cart ahead of the horse a bit here. Given that our
keyring is not one where everything is implicitly trusted (ala gpgv),
keeping or deleting a key has no bearing on its trusted status, only
whether we can actually verify things signed by said key.

If we need to address this down the road, we can find a solution that
works for the problem at hand rather than trying to solve it now before
signing is even widespread.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:15:45 -05:00
Dan McGee
595e1a437f pacman-key: implement promptless lsigning
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:15:45 -05:00
Dan McGee
7d961c849b pacman-key: disable, don't remove, revoked keys
Unlike our protégé apt-key, removing a key from our keyring is not
sufficient to prevent it from being trusted or used for verification. We
are better off flagging it as disabled and leaving it in the keyring so
it cannot be reimported or fetched at a later date from a keyserver and
continue to be used.

Implement the logic to disable the key instead of delete it, figuring
out --command-fd in the process.

Note that the surefire way to disable a key involves including said key
in the keyring package, such that it is both in foobar.gpg and
foobar-revoked.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:15:39 -05:00
Dan McGee
6767de5380 Add status and check for key being disabled
Because we aren't using gpgv and a dedicated keyring that is known to be
all safe, we should honor this flag being set on a given key in the
keyring to know to not honor it. This prevents a key from being
reimported that a user does not want to be used- instead of deleting,
one should mark it as disabled.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:14:35 -05:00
Dan McGee
213950afa3 pacman-key: simplify import in populate
This finishes the cleanup started in 710e83999b. We can do a straight
import from another keyring rather than all the funky parsing and piping
business we were doing.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:14:35 -05:00
Dan McGee
491b656c54 pacman-key: don't hide --verify details in populate
Otherwise we're hiding extremely relevant bits like this one:
    gpg: WARNING: This key is not certified with a trusted signature!
    gpg:          There is no indication that the signature belongs to the owner.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:14:35 -05:00
Dan McGee
03e1b4caa9 pacman-key: print message in populate if signature is missing
Rather than saying it was invalid, tell the user no signature exists.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:14:35 -05:00
Dan McGee
a7691ba6fd pacman-key: clean up populate output
* Ensure usage message is indented correctly
* Show short filenames for both the gpg keyring and revocation file

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:14:35 -05:00
Dan McGee
4b6a5ae159 pacman-key: ensure array iterations are quoted
When doing something like `pacman-key --edit-key 'Dan McGee'`, one would
expect it to work, and not fail.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:14:34 -05:00
Dan McGee
765178c5ba Implement PGP key search and import
Add two new static methods, key_search() and key_import(), to our
growing list of signing code.

If we come across a key we do not have, attempt to look it up remotely
and ask the user if they wish to import said key. If they do, flag the
validation process as a potential 'retry', meaning it might succeed the
next time it is ran.

These depend on you having a 'keyserver hkp://foo.example.com' line in
your gpg.conf file in your gnupg home directory to function.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:14:31 -05:00
Dan McGee
0ef7129a4a signing: document most undocumented functions
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 11:06:03 -05:00
Dan McGee
4849a4596d Add _alpm_process_siglist() logic to failed package validation
This moves the result processing out of the validation check loop itself
and into a new loop. Errors will be presented to the user one-by-one
after we fully complete the validation loop, so they no longer overlap
the progress bar.

Unlike the database validation, we may have several errors to process in
sequence here, so we use a function-scoped struct to track all the
necessary information between seeing an error and asking the user about
it.

The older prompt_to_delete() callback logic is still kept, but only for
checksum failures. It is debatable whether we should do this at all or
just delegate said actions to the user.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:35:52 -05:00
Dan McGee
0a4a5cea97 Add new import key question enum value and stub frontend function
This is for eventual use by the PGP key import code. Breaking this into
a separate commit now makes the following patches a bit easier to
understand.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:35:52 -05:00
Dan McGee
3e4749fe3e Fix signature printing in package info
pm_asprintf() does not return a length as asprintf() does. Fail. Make
sure it is not -1 as that is the only failure condition.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:34:07 -05:00
Dan McGee
361ed6a600 config parsing: add note if libcurl disabled and no XferCommand
Just a helpful warning for those users in this unenviable position.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:33:48 -05:00
Dan McGee
e4690232d6 config parsing: include file and line number in more errors
Before:
    $ pacman -Si pacman
    error: invalid value for 'SigLevel' : 'FooValue'

After:
    $ ./src/pacman/pacman -Si pacman
    error: config file /etc/pacman.conf, line 88: invalid value for 'SigLevel' : 'FooValue'

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:33:43 -05:00
Dan McGee
ca58e326dc Pull option names out of messages in config parsing
This allows some message reuse, as well as making it clear to
translators what *not* to translate.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:33:39 -05:00
Dan McGee
69694edd2c Check capabilities in SigLevel option parsing
Only allow turning it on if the backend library has support for it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:32:39 -05:00
Dan McGee
d36d70d294 Add alpm_capabilities() method and enumeration
This allows a frontend program to query, at runtime, what the library
supports. This can be useful for sanity checking during config-
requiring a downloader or disallowing signature settings, for example.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:32:35 -05:00
Dan McGee
33f2518531 Move default siglevel value from backend to frontend
This takes the libraries hidden default out of the equation: hidden in
the sense that we can't even find out what it is until we create a
handle. This is a chicken-and-egg problem where we have probably already
parsed the config, so it is hard to get the bitmask value right.

Move it to the frontend so the caller can do whatever the heck they
want. This also exposes a shortcoming where the frontend doesn't know if
the library even supports signatures, so we should probably add a
alpm_capabilities() method which exposes things like HAS_DOWNLOADER,
HAS_SIGNATURES, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:32:30 -05:00
Dan McGee
01f5c9e79a validate_deltas: split verify/check errors loops
This allows us to do all delta verification up front, followed by
whatever needs to be done with any found errors. In this case, we call
prompt_to_delete() for each error.

Add back the missing EVENT(ALPM_EVENT_DELTA_INTEGRITY_DONE) that
accidentally got removed in commit 062c391919.

Remove use of *data; we never even look at the stuff in this array for
the error code we were returning and this would be much better handled
by one callback per error anyway, or at least some strongly typed return
values.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:32:24 -05:00
Dan McGee
5e7875ae6a Fix possible segfault if siglist was empty
If siglist->results wasn't a NULL pointer, we would try to free it
anyway, even if siglist->count was zero. Only attempt to free this
pointer if we had results and the pointer is valid.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-22 10:31:28 -05:00
Dan McGee
3a460a8be6 Remove noisy debug logger
This one can be overwhelming when reading debug output from a very large
package. We already have the output of each extracted file so we
probably can do without this in 99.9% of cases.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-21 13:02:35 -05:00
Dan McGee
47dd315609 Fix int/size_t type in alpm_list_count() call
alpm_list_count() returns size_t, which we should use to store the
result since it is easy enough to format for printing.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 17:15:09 -05:00
Dan McGee
8375ad214a _alpm_sync_commit: extract two static methods
This adds two new static methods, check_validity() and load_packages(),
to sync.c which are simply code fragments pulled out of our
do-everything sync commit code.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:11 -05:00
Dan McGee
b7ebacc576 Pass package signature data up one more level
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:11 -05:00
Dan McGee
ec790ced7c signing: add a process and retry loop for database signatures
In reality, there is no retrying that happens as of now because we don't
have any import or changing of the keyring going on, but the code is set
up so we can drop this in our new _alpm_process_siglist() function. Wire
up the basics to the sync database validation code, so we see something
like the following:

    $ pacman -Ss unknowntrust
    error: core: signature from "Dan McGee <dpmcgee@gmail.com>" is unknown trust
    error: core: signature from "Dan McGee <dpmcgee@gmail.com>" is unknown trust
    error: database 'core' is not valid (invalid or corrupted database (PGP signature))

    $ pacman -Ss missingsig
    error: core: missing required signature
    error: core: missing required signature
    error: database 'core' is not valid (invalid or corrupted database (PGP signature))

Yes, there is some double output, but this should be fixable in the
future.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:11 -05:00
Dan McGee
994cb4da4f Allow our PGP helper method to pass back the signature results
This will make its way up the call chain eventually to allow trusting
and importing of keys as necessary.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:11 -05:00
Dan McGee
a27f993600 Split package validation and load loops
This adds a some new callback event and progress codes for package
loading, which was formerly bundled in with package validation before.
The main sync.c loop where loading occurred is now two loops running
sequentially. The behavior should not change with this patch outside of
progress and event display; more changes will come in following patches.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:11 -05:00
Dan McGee
afdbfc05f7 Extract an _alpm_pkg_validate_internal() method
_alpm_pkg_load_internal() was becoming a monster. Extract the top bit of
the method that dealt with checksum and signature validation into a
separate method that should be called before one loads a package to
ensure it is valid.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:11 -05:00
Dave Reisner
7eb2f0cd15 pacman/upgrade: print 'loading packages...' only once
Do this outside the loop to prevent the message from being displayed
(and pluralized!) for each individual package.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:11 -05:00
Dan McGee
8e3b39a9e0 pacman: use dynamic string allocation where it makes sense
None of these are hot-code paths, and at least the target reading has
little need for an arbitrary length limitation (however crazy it might
be to have longer arguments).

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:11 -05:00
Dan McGee
0f92fc5963 utils/cleanupdelta: remove unneeded syncdbpath
This variable was totally unused.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:11 -05:00
Dan McGee
79cbce60ac Remove all usages of alpm_list_getdata() from the library
No need for the indirection; just access ->data instead.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:10 -05:00
Dan McGee
70e2c34f0f _alpm_runscriptlet(): remove clean_tmpdir variable
This is always true at the end since we return early if we couldn't
create the tmpdir, so it is totally unnecessary.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:10 -05:00
Dan McGee
3796164848 Access db->pkgcache directly in db_free_pkgcache()
We shouldn't be going through the accessor that does a bunch of
unnecessary legwork, including potentially loading the pkgcache right
before we free it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:10 -05:00
Dan McGee
95119d46d4 Flip getcwd()/chdir() for open()/fchdir() in the frontend
Just like we did in libalpm in commit 288a81d847.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-20 10:23:10 -05:00
Dan McGee
288a81d847 Use more efficient way of restoring working directory
Rather than using a string-based path, we can restore the working
directory via a file descriptor and use of fchdir().

From the getcwd manpage:
    Opening the current directory (".") and calling fchdir(2) to
    return is usually a faster and more reliable alternative when
    sufficiently many file descriptors are available.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-19 14:11:08 -05:00
Dan McGee
bfe36c2ddf Reduce path allocation on the stack in local database
We did a lot of both malloc-ing and stack printing to form some paths in
this code. Attempt to unify it all into the one get_pkgpath() method by
adding an optional third "filename" parameter, and form the necessary
path string all in one go.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-19 13:43:13 -05:00
Dan McGee
e1899cbc64 Be smarter about running ldconfig during removal transactions
1. Don't run it if something failed in package removal- this mirrors
what we already do in sync transactions.
2. Don't run it if we are invoking it for the replaces removal bit of a
sync transaction- it doesn't make sense to run ldconfig halfway through
a sync install; we should only run it once at the end.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-19 13:18:42 -05:00
Dan McGee
a94ad29740 Search for non-prefixed paths in skip_remove list
We add them to this list with the root path not appended; we should be
searching for them this way as well.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-19 13:17:16 -05:00
Dan McGee
41d8deff88 be_local: cope with a desc file without trailing newline
We checked the (fgets == NULL and !feof) case, but never actually bailed
out of the loop if we were at the end of the file, causing infinite
looping.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-18 17:32:15 -05:00
Dan McGee
86d9fcbfff Remove const specifier from changelog_read() void parameter
This shouldn't really be declared with const, and causes a compile error
when -Wcast-qual is used. Remove the const specifier from the function
specification and all implementations.

Also fix one other trivial -Wcast-qual warning in _alpm_db_cmp().

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-18 17:11:39 -05:00
Dan McGee
69a3558b75 Remove dead changelog_feof() code
We never ended up using or really needing this; kill it for now knowing
it is in git history if ever needed again.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-18 17:03:56 -05:00
Dan McGee
49dff4c80b Add a random pactest
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-18 17:00:21 -05:00
Dave Reisner
83ee9708b1 src/util: provide strndup definitions where needed
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-18 16:58:21 -05:00
Dave Reisner
07e89c1e5d dload: avoid using memrchr
This function doesn't exist on OSX. Since there aren't any other
candidates in alpm for which this function would make sense to use,
simply replace the function call with a loop that does the equivalent.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-18 16:57:59 -05:00
Dan McGee
52c65fdfea Ensure entire struct is zeroed in _alpm_parsedate()
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-18 16:57:26 -05:00
Dave Reisner
c12fa4ab19 pactree: include missing ctype.h header
needed for isspace() -- avoids warnings on OSX.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-18 16:57:09 -05:00
Dave Reisner
b1a09b93ef configure: Fix quoting in SEDINPLACE on Darwin
single quotes expanded to nothing, leaving us with a command that
assumed the sed expression was the backup suffix. Use a pair of escaped
double quotes, which survives automake and ends up properly in makepkg.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-18 16:57:07 -05:00
Dave Reisner
223a92ca9d dload: remove user:pass@ definition from hostname
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-18 15:35:58 -05:00
Dave Reisner
7ad78c2c88 paccache: remove unnecessary if check
This is superfluous as the ensuing for loop will exit immediately on the
same condition avoided by the if.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-18 15:34:54 -05:00
Dan McGee
a7d7798032 Fix build without gpgme
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-18 15:34:28 -05:00
Dave Reisner
f883efe2cb pacman: add short opt '-p' for --print to -{S,R}h
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-14 17:24:55 -05:00
Dave Reisner
e01dbcc068 include ldconfig.stub in EXTRA_DIST
Since c51b9ca, ldconfig.stub is required by pactest so we need to
include it as part of the dist tarball.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-14 17:18:44 -05:00
Dave Reisner
68856755c4 buildsys: remove existing symlinks before installing
This fixes build errors when performing a manual install straight to a
filesystem where the files already exist.

Reported-by: Sergej Pupykin <ml@sergej.pp.ru>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-14 17:18:07 -05:00
Dan McGee
a2356d5ae3 Don't duplicate header strings
There is no need to print them into buffers; we can use the values
returned by gettext() directly without issue.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-14 17:18:07 -05:00
Dave Reisner
4a02350ded makepkg: fix recreation of hardlinks to .gz manpages
4ed12ae tightened up the logic to use only find, but ignored the fact
that since the manpage hard link names were no longer captured. They
were created as separate compressed manpages, rather than as hardlinks.

This also introduces a minor efficiency of deleting all hardlinks at
once and using proper iteration over an array rather than a string.

Note to anyone else touching this code: e2fsprogs and libpcap are useful
for testing this. If that changes in the future, you can use the below
bash to locate others:

  IFS=$'\n' read -rd '' -a a < <(find /usr/share/man -type f \! -links 1)
  pacman -Qqo "${a[@]}" | sort -u

I broke it!

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-14 17:25:29 -04:00
Dave Reisner
d1e04c1b67 makepkg: add missing newline on passing gpg sourcecheck
When a sourceball passes this check without any warnings, a newline is
omitted. Similar to the if clause of this else block, print a single new
line at the end of the clause instead of accounting for each output.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-14 14:19:18 -04:00
Dave Reisner
0f69e2ec0b makepkg: check for var existance before file existance
This prevents makepkg from aborting with 'file not found' when
changelog= or install= are declared in a PKGBUILD, but empty.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-12 08:27:13 -04:00
Dave Reisner
3905ada993 account for partial delta files in download size
Similar to an earlier commit which accounts for .part files for full
packages, calculate the download_size for deltas keeping mind the
possibility of a partial transfer.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-11 19:10:48 -05:00
Dave Reisner
d8eacae7bc make compute_download_size consider .part files
Check for the existance of a partial download of a package file before
jumping to delta calculations. Currently, if there were 10MiB remaining
in a 100MiB the values passed to the front end do not reflect this.

Refactored from an old patch originally by Dan.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-11 19:09:04 -05:00
Dave Reisner
befddfc3e6 dload: provide optional netrc support
if ~/.netrc exists and has credentials for the hostname requested in a
download, they will be provided in an http auth request. This can still
be overridden by explcitly declaring user:pass in the URL.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-11 19:07:25 -05:00
Dave Reisner
c736a12e86 makepkg: unset errexit when sourcing /etc/profile
This is a fix for a bash3 specific bug, where a file sourced by
/etc/profile would exit non-zero and make its way back up to makepkg,
forcing it to exit after package installation. Along with unsetting the
ERR handler, temporarily unset errexit to avoid this.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-11 13:47:07 +10:00
Dave Reisner
7f1235ccbc paccache: escape . in trimming of diskspace string
Before:
==> finished dry run: 2 candidates (diskspace saved: 7. MiB)

After:
==> finished dry run: 2 candidates (diskspace saved: 7.8 MiB)

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-11 13:46:07 +10:00
Dan McGee
4737a87b84 download callback: show decimal places in rate if we have room
Display now looks like this, whereas before we would have just showed
'2M/s' for the extra repository download. The cutoff is placed at 100.0
to ensure we only use 4 character slots of width (e.g. '99.9', '100').

:: Synchronizing package databases...
 testing                   39.9 KiB   470K/s 00:00 [######################] 100%
 core                      51.4 KiB   469K/s 00:00 [######################] 100%
 extra                    768.8 KiB   2.1M/s 00:00 [######################] 100%
 community-testing       1941.0   B  54.4M/s 00:00 [######################] 100%
 multilib                  26.6 KiB   458K/s 00:00 [######################] 100%
 community                449.8 KiB  1649K/s 00:00 [######################] 100%

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-11 13:45:59 +10:00
Dan McGee
f7653e582b Move download callback static vars into function
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-11 13:45:54 +10:00
Dave Reisner
db70c9da15 diskspace: fix memory leak on root mount not found
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-08 14:18:19 -05:00
Dan McGee
a03313f3f6 Print 'loading packages' message on -U operations
This will be the first thing printed when doing an upgrade. Currently
there is no output at all until we start resolving dependencies, which
can be a while in if specifying very large targets on the command line,
in which case it is nice to let the user know we are doing something.

Addresses FS#25822 in the most KISS way possible.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-08 14:14:51 -05:00
Dave Reisner
905ae640cf makepkg: use more awk'ish syntax in sanity checks
This simplifies the flow a bit, making the pipeline a little easier to
grok.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-07 21:05:05 -05:00
Dave Reisner
4ed12aec30 makepkg: avoid for loop in deleting manpage hardlinks
find can do this all on its own and remain portable.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-07 21:05:04 -05:00
Dave Reisner
17c3de3e4f makepkg: act on function return value, not output
Correcting a typo, as this function will never output anything.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-07 21:05:04 -05:00
Dave Reisner
3d9f961d13 makepkg: refactor check_pgpsigs output
- display associated warnings on same line as pass/fail msg, to be more
  consistent with checksum verification output
- properly error on a revoked key (matching pacman's behavior)

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-07 21:05:04 -05:00
Dan McGee
8ffa2b24a5 Use more correct integer types in diskspace checks
This adjusts type usage to match POSIX provided types from
<sys/types.h> rather than assuming everything will fit in a long or
unsigned long. Use fsblkcnt_t (unsigned) and blkcnt_t (signed) as
appropriate. These are affected the same way off_t is on 32 bit
platforms, where the types are extende to 64 bits if large file support
is enabled.

Because most numbers here are block counts, this isn't
near as pressing as using a 32-bit variable for file sizes where
anything over 2GiB can burn you; we likely can support files at least
512 but mainly 4096 times larger.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-07 21:05:04 -05:00
Dan McGee
b961ebe16f query check: use provided filelist count instead of keeping track
We don't need to keep track of how many files are in a package now that
said value is provided to us. It also makes more sense to use size_t
here for types rather than the (hopefully never too short) int.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-07 20:51:35 -05:00
Dan McGee
6317db8429 Remove unnecessary cast
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-07 20:51:35 -05:00
Dan McGee
3e08614fda Ensure PackageRequired works as expected
Changes in commit dc3336c277 caused this to stop working as expected for
sync packages, due to the way the logic is structured. Ensure we always
enter the signature code if the bitflag is flipped on to check
signatures for packages. Rename 'use_sig' to 'has_sig' for clarity.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-07 20:51:35 -05:00
Dave Reisner
0e79802c0a makepkg: use globs in place of regex
We seem to enjoy using bash regex capabilities, but never referencing
the result with BASH_REMATCH. Replace almost all regexes with equivalent
globs which are faster and functionally equivalent in these cases.

This enables the extglob shopt.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-06 11:46:01 -05:00
Dan McGee
8d0ff3d7dc dload: use intmax_t when printing off_t
This works for both 32-bit and 64-bit platforms.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-06 11:44:29 -05:00
Dave Reisner
29ad9e0a0a makepkg: unset variables as per !{make,build}flags
Don't just set the flag variables to zero length strings, actually unset
them from the environment. This fixes issues with broken gnu Makefies
that use ?= for assigment, where the presence of a var is enough to make
this condition avoid assignment.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-06 08:45:44 -05:00
Dave Reisner
7ed54a9940 rankmirrors: properly sort resulting times
- Properly read each sorted line into a new array, instead of breaking
  on every word.
- LC_COLLATE should apply to the sort portion of the pipeline, not the
  printing.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-06 08:44:34 -05:00
Dave Reisner
a4e0d3e930 dload: abstract dload_interrupted reasons
This gives us some amount of room to grow in case we ever find another
reason that we might return with an error from the progress callback.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-06 08:44:14 -05:00
Dave Reisner
6c236277a3 dload: improve debug output
We lost some of this output in the fetch->curl conversion, but I also
noticed in FS#25852 that we just lack some of this useful information
along the way.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-06 08:44:09 -05:00
Dave Reisner
7054e37126 sync: add missing newline in warning message
Dan: fix the other missing one too.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-06 08:43:23 -05:00
Dave Reisner
400942fedf avoid blowing out the filecache list when using tmpdir
_alpm_filecache_setup() destroys the list of cachedirs when it finds no
writeable directories in the config. This put us in an awkward situation
where _alpm_filecache_find() would locate a downloaded file in a r/o
cachedir, but then fail to install it after _alpm_filecache_setup() is
called (with a NULL argument). Change this behavior to merely prepend
the temporary directory to the list of available cachedirs.

Dan exposed it in e07547ee4e, as now a package can be found in a
directory we may not be able to actually store packages in.

Reported-by: Rémy Oudompheng <remy@archlinux.org>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-06 08:42:02 -05:00
Dan McGee
7ea1ea88bb More package operations cleanup
Neither deltas nor filename attributes are ever present in the local
database, so we can remove all of the indirection for accessing these
attributes.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 22:07:06 -05:00
Dan McGee
7c956d5d4b Add -p/--print tip for -Q operations on filepath
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 21:45:33 -05:00
Dan McGee
98fdfa1968 Former transaction callback rename refactor
Put all the callback stuff in alpm.h in one spot, and make the following
renames for clarity with the new structure:

ALPM_TRANS_EVT_* --> ALPM_EVENT_*
ALPM_TRANS_CONV_* --> ALPM_QUESTION_*
ALPM_TRANS_PROGRESS_* --> ALPM_PROGRESS_*
alpm_option_get_convcb() --> alpm_option_get_questioncb()
alpm_option_set_convcb() --> alpm_option_set_questioncb()

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 21:45:08 -05:00
Dan McGee
37da18aee8 Move all callbacks up to the handle level
This was just disgusting before, unnecessary to limit these to only
usage in a transaction. Still a lot of more room for cleanup but we'll
start by attaching them to the handle rather than the transaction we may
or may not even want to use these callbacks.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 21:45:03 -05:00
Dan McGee
d88e524e7c Be fully silent on any -Sp operation
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 21:44:45 -05:00
Dan McGee
062c391919 Make delta validation/application more logical
The call to apply was tucked inside validate, and the EVENT callbacks
were done outside the function rather than inside. Reorganize things a
bit to make more sense.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 21:44:39 -05:00
Dan McGee
16fd66f879 pacman-key: add --refresh-keys operation
This allows new signatures to be pulled, revocations to be found, etc.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 21:44:04 -05:00
Dan McGee
d9545103b9 pacman-key: split keyserver to a separate option
This also renames '--receive' to '-recv-keys' to match the wrapped gpg
option name, rather than invent a new one, now that the calling
convention is the same.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 21:43:03 -05:00
Dan McGee
5a9b07b0e7 pacman-key help and documentation cleanup
We were using the mystical [<foobar>] options which is some sort of
cross between a <required> argument and an [optional] one. Remove this
madness and do some other general cleanup/consistency work in the
manpage.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 21:41:40 -05:00
Dan McGee
24f4f9822f doc: consistency when referencing other options
Use '\--option' rather than `--option` everywhere.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 21:41:40 -05:00
Dan McGee
3c3ee6796a pacman-key: document --lsign-key
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 21:41:40 -05:00
Dan McGee
83a1e4fee3 Clean up handling of size fields
We currently have csize, isize, and size concepts, and sometimes the
difference isn't clear. Ensure the following holds:

* size (aka csize): always the compressed size of the package; available
  for everything except local packages (where it will return 0)
* isize: always the installed size of the package; available for all
  three package types

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-02 19:26:07 -05:00
Dan McGee
c51b9ca0ad pactest: remove PACMAN_OUTPUT from ldconfig tests
This removes the last usages of this rule that aren't explicitly looking
at real output from pacman. Notably, these tests depended on one
particular debug logger not ever being changed, which is too fragile,
not to mention doesn't work at all with --nolog.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-01 14:36:44 -05:00
Dan McGee
ad051f7328 _alpm_parsedate(): return time_t and not long
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-01 12:36:11 -05:00
Dan McGee
13072ef86c Add pactest for overflowing date (year 2038 problem)
This will work fine on x86_64 (or any platform that has a 64 bit long),
but currently fails on i686. This test also stresses the recent changes
to accommodate package size values greater than a 32 bit UINT_MAX.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-01 12:18:48 -05:00
Dan McGee
11873b70ae makepkg: fix overzealous PGP signature file matching
The regex wasn't rooted at the end of the filename, nor was it matching
a period/dot before the file extension. The end result was this matched a
file named '07_all_sig.patch' which is totally broken.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-01 11:42:55 -05:00
Dave Reisner
11ab9aa9f5 pacman/callback: reuse strlen calculation
Call strlen earlier in the dl progress callback, and reuse this length
to replace some heavier str*() calls with more optimized mem*()
replacements. This also gets rid of a false assumption that the ending
string will ever be longer than the original string.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-01 11:33:28 -05:00
Dave Reisner
cf1f014393 makepkg: fix sanity checking in versioning
Read the entire variable, respecting escapes, which are necessary to
retain for the successive eval.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-01 11:32:26 -05:00
Dave Reisner
5bb2d2e0a0 makepkg: read filenames in a while loop
Further improvments on 2ca27ab which will allow the changelog and
install script files to contain whitespace.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-01 11:32:20 -05:00
Dave Reisner
35d8cc8bc8 makepkg: fix breakage in eval'ing quoted strings
Broken in 2ca27a by me, trying to fix another problem.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-01 11:32:14 -05:00
Dan McGee
50f53b293c pacman-key: add --lsign-key operation
This allows local signing of a given key to help establish the web of
trust rooted at the generated (or imported) master key.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-30 08:39:26 -05:00
Dan McGee
7479bf21e8 pacman-key master key generation
This enables pacman-key, during --init, to generate a single secret key
for the pacman keyring if one is not present. This will be used as the
root of the web of trust for those that do not wish to manage it with
their own key, as will be the default.

This does not preclude later adding other secret keys to the keyring, or
removing this one- we simply ensure you have at least one secret key
available.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-30 08:23:46 -05:00
Dan McGee
06b228b20f Scale package integrity progress bar/percentage by package size
This upgrades the simple 15/17 scaling by package number we used before
to package sized based scaling, which is much more accurate. Addresses
some of the issues raised in FS#25817.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-30 08:23:32 -05:00
Allan McRae
19c3880ec9 Remove outdated comment for _alpm_outerconflicts
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-30 08:11:57 -05:00
Pang Yan Han
2c5f000d5b Improve advice for sync ops when db.lck is present
When the database is locked, sync operations involving transactions, such as
pacman -Syy, show the following:

:: Synchronizing package databases...
error: failed to update core (unable to lock database)
error: failed to update extra (unable to lock database)
error: failed to update community (unable to lock database)
error: failed to update multilib (unable to lock database)
error: failed to synchronize any databases

Whereas pacman -U <pkg> shows:

error: failed to init transaction (unable to lock database)
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck

Which is much more meaningful, since the presence of db.lck may indicate an
erroneous lockfile instead of an ongoing transaction.

Improve the error messages for sync operations by advising the user to remove
db.lck if he is sure that no package manager is running.

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 20:17:08 -05:00
Dan McGee
234b6ffc2c Parse > 2GiB file sizes correctly
We were using atol(), which on 32 bit, cannot handle values greater than
2GiB, which is fail.

Switch to a strtoull() wrapper function tailored toward parsing off_t
values. This allows parsing of very large positive integer values. off_t
is a signed type, but in our usages, we never parse or have a need for
negative values, so the function will return -1 on error.

Before:
    $ pacman -Si flightgear-data | grep Size
    Download Size  : 2097152.00 K
    Installed Size : 2097152.00 K

After:
    $ ./src/pacman/pacman -Si flightgear-data | grep Size
    Download Size  : 2312592.52 KiB
    Installed Size : 5402896.00 KiB

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 19:57:05 -05:00
Helder Martins
d74dad79b7 lib/libalpm/handle.c: Removed redundant if condition
Signed-off-by: Helder Martins <heldermartins89@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 19:56:24 -05:00
Dan McGee
515720a6fc Ensure progress callback updates if XX/YY numerator changes
We only updated if the percentage incremented and enough time had
elapsed, even though the numerator of the current/howmany fraction may
have changed. Ensure we proceed with the progress bar update in these
cases so as to not mislead the user.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 19:56:14 -05:00
Dan McGee
8129b93afe pacman-key: fix broken logic around updating trust database
Any option that flips UPDATEDB=1 doesn't work right now due to what we
thought was a good idea in commit cab1379a1a. Fix this by not
including the update operation in the option count and special casing
it where necessary.

Also, bring back the helpful "Updating trust database" message.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 19:55:28 -05:00
Allan McRae
e3676ae7b5 Run pacman test-suite with LC_ALL=C
Running the pacman test-suite in a non-English locale results in a few
failures.  Force the test-suite to run with LC_ALL=C.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 19:54:33 -05:00
Dan McGee
499e09734b Streamline alpm_splitdep() comparisons
This reduces from 5 to 3 the number of searches needed on the string
looking for a comparison operator, since we can so a second quick
comparison looking for '=' if we find '<' or '>'. It also makes every
search doable with strchr() or memchr() rather than the slower strstr()
method.

In testing, only 10% of splitdep calls (~1600 / 16000) during an -Ss
database load found a version comparison operator, so optimizing the not
found path to be require less work makes sense.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 19:54:18 -05:00
Dave Reisner
b3c0ae5205 pacsort: use boolean, not binary OR operation
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 19:53:58 -05:00
Dan McGee
7480df68ce Rework scriptlet tests to not depend on pacman output
This actually does something in a scriptlet we can check with our normal
set of rules, rather than relying on pacman debug output.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 07:48:59 -05:00
Dan McGee
f46db04f98 Merge branch 'allan/pacman-key' 2011-08-28 23:51:05 -05:00
Dan McGee
8973875a1f _alpm_splitdep(): don't pass bogus length value to strndup
If we fell through to the ALPM_DEP_MOD_ANY case, ptr would be NULL, and
we would pass (0 - <str>), which is a rather large negative number or
bogus positive number, depending on signed/unsigned. Just use strdup in
the case where we don't have a ptr available.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 23:50:28 -05:00
Dan McGee
b221af660d Database read optimizations
Hard to believe there was still more room to improve on this, but I
found an easily correctable oversight tonight. Our databases (both sync
and local) contain many blank lines, and we were not moving onto the
next line right away in these cases; instead we would proceed through
our strcmp() conditional checks as normal.

Some local numbers follow to show the effects of this patch:

Sync `-Ss foobarbaz`:
71,709 blank lines skipped early
~1,505,889 strcmp() calls avoided (21 per line)
~15% speed improvement (.210 --> .179 sec)

Local `-Qs foobarbaz`:
6,823 blank lines skipped early
115,991 strcmp() calls avoided (17 per line)
~6% speed improvement (.080 -> .071 sec)

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 23:49:27 -05:00
Dan McGee
040083b97f Allow access to package origin data
Add new alpm_pkg_get_origin() method, use it in the front end now that
the enum constants are publicly available.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 23:41:17 -05:00
Diogo Sousa
3a458783a2 Removed multiple definitions of pkgfrom_t
libalpm now exports type alpm_pkgfrom_t in alpm.h, which may be used
by frontends.

Pacman now uses alpm_pkgfrom_t instead of replicating that type (pkg_from
as was in src/pacman/package.h)

Updated API change in README.

Signed-off-by: Diogo Sousa <diogogsousa@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 23:30:10 -05:00
Dan McGee
12a6c77fdd pacman-key: have --init add more options to default gpg.conf
This adds a add_gpg_conf_option() helper function which tries to be
intelligent and only add not found options, and those which have not
been explicitly commented out.

The new options added are 'no-greeting', 'no-permission-warning', and a
default 'keyserver'.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 11:55:23 +10:00
Dan McGee
7ceeebf150 pacman-key: refine permission and locking checks
* secring.gpg can be 600, readable by root user only
* ensure grep for lock-never option in check_keyring doesn't catch comments

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-29 11:55:23 +10:00
Allan McRae
e1b9f7b300 pacman-key: rework and document holding keys in keyring
The HoldKey option was undocumented and was not suited for pacman.conf.
Instead use the file "/etc/pacman.d/gnupg/heldkeys" to contain a list
of keys not to be removed from the pacman keyring with the --populate
option.

Signed-off-by: Allan McRae <allan@archlinux.org>
2011-08-29 11:55:23 +10:00
Allan McRae
29dede2eb7 pacman-key: Improve documentation for --populate
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-08-29 11:55:23 +10:00
Allan McRae
cab1379a1a pacman-key: update trust database for relevant operations
After most operations that touch the keyring, it is a good idea to
always run a check on the trustdb as this prevents gpg complaining
on later operations.

Inspiration-from: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-08-29 11:55:22 +10:00
Allan McRae
710e83999b pacman-key: import everything then revoke on --populate
The optimization of only importing keys that were not to be later
revoked was a not smart enough.  For example, if a key was
in both a repos keyring and its revoke list, alternate runs of
pacman-key --populate would add then remove the key from the pacman
keyring.  This problem is made worse when considering the possibility
of multiple keyrings being imported.

Instead, import all keys followed by the revoking of all keys.  This
may result in a key being added then revoked, but that is not much of
an issue given that is a very fast operation.

Signed-off-by: Allan McRae <allan@archlinux.org>
2011-08-29 11:55:22 +10:00
Allan McRae
d1240f67ea pacman-key: rework importing distro/repo provided keyrings
The current --reload option, apart from being non-clear in its naming,
is very limited in that only one keyring can be provided.  A distribution
may want to provide multiple keyrings for various subsets of its
organisation or custom repo providers may also want to provide a keyring.

This patch adds a --populate option that reads keyrings from (by default)
/usr/share/pacman/keyrings.  A keyring is named foo.gpg, with optional
foo-revoked file providing a list of revoked key ids.  These files are
required to be signed (detached) by a key trusted by pacman-key, in
practice probably by the key that signed the package providing these
files. The --populate flag either updates the pacman keyring using all
keyrings in the directory or individual keyrings can be specified.

Signed-off-by: Allan McRae <allan@archlinux.org>
2011-08-29 11:55:22 +10:00
Dan McGee
2cfcc874b9 Better error handling out of package load method
There are many other ways to fail a package load other than "file not
found". We should also use the correct error code in this case. Clean it
up a bit in the various callers.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:52:41 -05:00
Dan McGee
dc3336c277 Refactor some args out of pkg_load_internal
Just pass the entire sync package in if we have it; that way we can do
any necessary operations involving it rather than have a parameter list
growing endlessly.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:52:19 -05:00
Dan McGee
c7e4005e5c Add more info to debug key display
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:52:10 -05:00
Dan McGee
de43d00db0 Refactor signature result return format
I was trying to take a shortcut and not introduce a wrapper struct for
the signature results, so packed it all into alpm_sigresult_t in the
first iteration. However, this is painful when one wants to add new
fields or only return information regarding a single signature.

Refactor the type into a few components which are exposed to the end
user, and will allow a lot more future flexibility. This also exposes
more information regarding the key to the frontend than was previously
available.

The "private" void *data pointer is used by the library to store the
actual key object returned by gpgme; it is typed this way so the
frontend has no expectations of what is there, and so we don't have any
hard gpgme requirement in our public API.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:51:54 -05:00
Diogo Sousa
12387ca4e5 lib/libalpm/signing.c: Fix memory leak in decode_signature() in case of error.
Signed-off-by: Diogo Sousa <diogogsousa@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:50:22 -05:00
Lukas Fleischer
0dad2f6e62 lib/libalpm/util.c: Fix two memory leaks
Free "md5sum" if md5_file() fails in alpm_compute_md5sum(). Free
"sha256sum" if sha2_file() fails in alpm_compute_sha256sum().

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:49:02 -05:00
Dan McGee
a12a4ea396 Check local database status flag in db_write sanity check block
Do all the checks at once; this also avoids the 'return' call after we
have allocated memory for "pkgpath" as well as tweaked the umask.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:46:09 -05:00
Lukas Fleischer
455ca55f4e be_sync.c: Fix memory leak in alpm_db_update()
Free "syncpath" and restore umask if we fail to grab a lock.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:40:22 -05:00
Lukas Fleischer
a2002b8f69 pacman.c: Remove redundant strdup() in parsearg_global()
config_set_arch() already calls strdup(). Remove strdup() from the
config_set_arch() invocation to avoid a memory leak.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:37:16 -05:00
Dan McGee
87fb8f5d57 Make sync error message smarter on unfound targets
We had two issues here. One is a file with an absolute path passed to -S
results in a cryptic error message due to the database name being '\0'.
The second is not realizing you should be doing -U instead of -S. Fix
both of these to transform this:

    $ sudo pacman -S /tmp/binutils-2.21.1-2-i686.pkg.tar.xz
    error: database not found:

to this:

    $ sudo pacman -S /tmp/binutils-2.21.1-2-i686.pkg.tar.xz
    error: target not found: /tmp/binutils-2.21.1-2-i686.pkg.tar.xz
    warning: '/tmp/binutils-2.21.1-2-i686.pkg.tar.xz' is a file, did you mean -U/--upgrade instead of -S/--sync?

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:37:04 -05:00
Dan McGee
84d6de806b Fix possible mismatched type with several curl arguments
After commit 2e7d002315, we use off_t rather than long variables.
Use the _LARGE variants of the methods to indicate we are passing off_t
sized variables, and cast using (curl_off_t) accordingly.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-28 19:36:50 -05:00
Dan McGee
5a07b75b22 Always process validity value returned by gpgme
Don't force 'never'; you should be checking both the status and validity
anyway.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 17:41:47 -05:00
Dan McGee
be72e10015 Fix small memory leak in sig check code
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 17:41:27 -05:00
Dan McGee
c5982a3eb5 strtrim: don't move empty string
There were many cases where the string coming in was a blank line, e.g.
"\n\0", length 1. The trim routine starts by trimming leading spaces,
thus trimming everything. We would then proceed to do a memmove of the
NULL byte, which is completely worthless as we can just assign it
instead.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 17:14:19 -05:00
Dan McGee
e1dce078b2 Remove argument from check_pgp_helper
This one wasn't all that necessary as we only used it in one place in
the function, which can be checked easily enough at the call site.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 16:12:49 -05:00
Dan McGee
6aa9fdce5a Remove trans is NULL check in QUESTION/EVENT/PROGRESS macros
trans cannot (and better not) be NULL at any point when these are being
called.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 16:12:33 -05:00
Dan McGee
0ee3ce70a8 Remove short/long label distinction
We only used short labels in one place, and the short label is always
the first character of the long label anyway.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 16:09:52 -05:00
Dan McGee
73fcf17041 Slight refresh of the download progress callback
This cleans up some of the mess we have here.

* switch to long units for the download size
* omit the .0 decimal part from the download rate
* omit the almost always zero HH: from estimated time if eta_h == 0
* Display --:-- if eta_h > 99; formatting was screwed up before

The net result of this is we usually have 1 more character to use for
filename display.

Before:
 extra                   500.9K 1242.4K/s 00:00:00 [######################] 100%
 community-testing       947.0B   28.2M/s 00:00:00 [######################] 100%
 multilib                 26.5K  405.1K/s 00:00:00 [######################] 100%
 community               450.6K 1238.3K/s 00:00:00 [######################] 100%

After:
 extra                    500.9 KiB  1118K/s 00:00 [######################] 100%
 community-testing        947.0   B    23M/s 00:00 [######################] 100%
 multilib                  26.5 KiB   255K/s 00:00 [######################] 100%
 community                450.6 KiB  1211K/s 00:00 [######################] 100%

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 16:09:52 -05:00
Dan McGee
30cad47fb9 Add a few more sizes to humanize_sizes()
Because why the hell not? Exbibyte, zebibyte, and yobibyte are going in,
even though nothing bigger than the 2^60 exbibyte can be represented
using an off_t variable anyway.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 16:09:52 -05:00
Dan McGee
f7a3c4c8df Finish large file download attack prevention
This handles the no Content-Length header problem as stated in the
comments of FS#23413. We add a quick check to the callback that will
force an abort if the downloaded data exceeds the payload size, and then
check for this error in the post-download cleanup code.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 16:09:52 -05:00
Dan McGee
2e7d002315 Use off_t rather than double where possible
Beautiful of libcurl to use floating point types for what are never
fractional values. We can do better, and we usually want these values in
their integer form anyway.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 16:09:52 -05:00
Dan McGee
f0357e415c Add new 'lt' and 'zh_TW' translations from transifex
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 16:04:41 -05:00
Dan McGee
5c48ca3239 Update existing translations from Transifex
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-25 16:04:41 -05:00
Diogo Sousa
268d0bbcbe Improved alpm_list_mmerge() performance (fixed coding style)
Improved alpm_list_mmerge() performance by removing an extra
pass to obtain the tail node.

This was actually suggested by a TODO comment.

Signed-off-by: Diogo Sousa <diogogsousa@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-24 11:27:11 -05:00
Dan McGee
30d978a966 vercmp: ensure 2.0a and 2.0.a do not compare equal
We had this interesting set of facts conundrum, according to vercmp
return values:
    2.0a <  2.0
    2.0  <  2.0.a
    2.0a == 2.0.a

This introduces a code change that ensures '2.0a < 2.0.a' as would be
expected by the first two comparisons. Unfortunately this stays us a bit
further from upstream RPM code, but those are the breaks (in RPM, the
versions involving 'a' do in fact compare the same, but they are both
greater than the bare '2.0').

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-23 01:49:29 -05:00
Dan McGee
cc03d6366a Style-match rpmvercmp code with upstream
Not sure how or why some of this differed, but it is easy enough to set
it back to how it was so it is easier to diff.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-23 01:47:45 -05:00
Dan McGee
a8a4395098 Retrieve default SigLevel value from backend after initial setting
This ensures we grab and use the library default once we have processed
the global SigLevel setting, but before processing the repo-specific
settings. This means the following two configs will now evaluate the
same, as the backend currently defaults to 'Optional':

Config 1:
    [options]
    # nothing here
    [repo]
    SigLevel = TrustAll

Config 2:
    [options]
    SigLevel = Optional
    [repo]
    SigLevel = TrustAll

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-23 01:06:56 -05:00
Dave Reisner
6731d0a940 sync: halt file discovery if repo has no servers
This avoids error spam when no servers are configured for a repo and a
sync operation is performed:

Proceed with installation? [Y/n] y
:: Retrieving packages from testing...
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing
warning: failed to retrieve some files from testing

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-23 00:49:14 -05:00
Jakob Gruber
dddd6a46a0 Fix formatting in pacman-key manpage
Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 13:15:15 -05:00
Dan McGee
762cbf574b dload: prevent need to copy struct in mask_signal()
Since we store this directly in the download function, just rework
mask_signal() to take a pointer to a location to store the original.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 09:27:13 -05:00
Dave Reisner
f3e2858621 dload: extract tempfile creation to its own function
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 09:23:18 -05:00
Dave Reisner
c65cea0dcb dload: move (un)masking of signals to separate functions
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 09:23:14 -05:00
Dave Reisner
10cbfc956c dload: move curl option setting to static function
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 09:19:38 -05:00
Dave Reisner
d64c409913 dload: add open_mode to payload struct
This is a precursor to a following patch which will move the setting of
options to a separate function. With the open mode as part of the
struct, we can avoid modifying stack allocated variables.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 09:18:00 -05:00
Dave Reisner
592ed13bce dload: rename cd_filename to content_disp_name
This is more in line with the menagerie of file name members that we now
have on the payload struct.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 09:15:11 -05:00
Dave Reisner
329a7b7e24 dload: move tempfile and destfile to payload struct
These are private to the download operation already, so glob them onto
the struct. This is an ugly rename patch, with the only logical change
being that destfile and tempfile are now freed by the payload_free
function.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 09:14:45 -05:00
Dave Reisner
c4350d90f1 pacman/util: use string_length to calculate line length
This is measuring strings that are potentially localized, so we need a
multibyte aware function to count characters instead of bytes.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 08:53:25 -05:00
Allan McRae
b6914d16cc Print callback messages to stderr
Fixes FS#25099.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 08:53:01 -05:00
Dan McGee
a98babbfef Print debug timestamps to same stream as rest of output
We used fprintf() elsewhere in this function, but we didn't use it on
the debug timestamp printing. Use fprintf() instead of printf() to fix
this.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 08:53:01 -05:00
Pang Yan Han
343ea81718 pacsort: correct list freeing
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 08:53:01 -05:00
Dan McGee
ffdfc82523 pacsort: ensure list is freed if size is 0
Found using: `valgrind ./src/util/.libs/lt-pacsort /dev/null`

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 08:53:01 -05:00
Pang Yan Han
e9b8a7693d pacsort: correct pointer type in list_new
Pointer sizes are the same but this makes intention clearer.

Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-22 08:53:01 -05:00
Dan McGee
d9e5dab6ac Remove alpm_option_get_* usage from backend
These are all available directly on the handle without indirection.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 19:12:21 -05:00
Dave Reisner
d307ed5eb9 dload: remove unused macro
This was a vestige leftover from the libfetch days of yore.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 19:01:57 -05:00
Dave Reisner
82fc816d79 dload: delete zero length downloads on curl error
In the case of a non-operation (e.g. DNS resolver error), delete the
leftover 0 byte .part file.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 19:00:58 -05:00
Dave Reisner
43940f591e dload: rename payload->filename to payload->remote_name
This is a far more accurate description of what this is, since it's more
than likely not really a filename at all, but the name after a final
slash on a URL.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 19:00:40 -05:00
Dave Reisner
eae363c96f dload: remove code duplication
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 19:00:13 -05:00
Dave Reisner
d3f135af8f bash_completion: add dbonly to sync options
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 18:56:00 -05:00
Dan McGee
e07547ee4e Rework finding a writable cache directory
This is a refactor and refresh of the code used to find where we should
download packages.

* Incorporate suggestions from FS#25435 to use TMPDIR from the
  environment if set, otherwise fall back to /tmp as before.
* Make the writability tests a bit more in depth. We now do a three part
  check consisting of:
  - S_ISDIR(): is this even a directory
  - access(W_OK): is this directory writable by the current user.
    Unfortunately for root, this almost always returns that it is, but
    in the case of a RO mount or NFS share inaccessible to root, this
    check will exclude the directory.
  - mode & (any write bit): is there a writable bit set on this
    directory. This makes it possible to enforce a read-only cache
    directory by setting permissions to 0555, for example.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 13:10:17 -05:00
Dan McGee
6d544984f2 Be more robust when copying package data
This changes the signature of _alpm_pkg_dup() to return an integer error
code and provide the new package in a passed pointer argument. All
callers are now more robust with checking the return value of this
function to ensure a fatal error did not occur.

We allow load failures to proceed as otherwise we have a chicken and egg
problem- if a 'desc' local database entry is missing, the best way of
restoring said file is `pacman -Sf --dbonly packagename`. This patch
fixes a segfault that was occurring in this case.

Fixes the segfault reported in FS#25667.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 11:09:57 -05:00
Dave Reisner
9934b3bd34 lib/dload: unlink on response code >=400
ftp and http both define >=400 as being "something bad happened"

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 09:54:58 -05:00
Dave Reisner
24824b54ce dload: add 'unlink_on_fail' to payload struct
Let callers of _alpm_download state whether we should delete on fail,
rather than inferring it from context. We still override this decision
and always unlink when a temp file is used.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 09:43:19 -05:00
Dave Reisner
2ca27ab3a1 makepkg: quote re-evaluation of simple vars
This is a safety measure to prevent simple code injection.

$ i="foo bar"
$ eval i="$i"
bash: bar: command not found
$ eval i=\"$i\"
$ echo "|$i|"
|foo bar|

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 09:42:41 -05:00
Dave Reisner
1723e6dc4f lib/dload: prevent possible NULL dereference
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 09:41:55 -05:00
Dave Reisner
16334f778b sync: fix garbled output in conflict prompt
$ pacman -S cronie
resolving dependencies...
looking for inter-conflicts...
:: cronie and fcron are in conflict (@.). Remove fcron? [y/N] n

$ sudo pacman -S pacman
resolving dependencies...
looking for inter-conflicts...
:: pacman and pacman-git are in conflict (pKÈ). Remove pacman-git? [y/N]

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-19 09:40:07 -05:00
Allan McRae
c28052e45b makepkg: deal with variable substitution when checking sanity
If any of pkgver, pkgrel or epoch contained a variable substitution,
then it needed to be evaluated before checking its value conformed
to the rules.

[Dan: add quotes around RHS]

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:50:17 -05:00
Dan McGee
2a466c2abc doc/PKGBUILD: update regarding versioned package fields
Add the info that versioned replaces are now supported, as well as
beefing up some of the other places touching on versioned fields.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Dan McGee
6cfc4757b9 Convert resolvedep() to use _alpm_depcmp_literal()
The whole first loop is trying to check literals only, so teach it to do
so. Also, reorder operations to make more sense by putting the strcmp()
first in the literal loop, and using a very cheap name_hash check first
in the second loop.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Dan McGee
3752edbff4 Fix replacement of provider issue
When we switched to using alpm_depcmp() in resolving replacments, we had
some interesting behavior with regard to providers and packages not
found in repositories. Teach the replacement resolving code to not look
at provisions at all to be slightly more sane.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Dan McGee
d008a816f1 Add an _alpm_depcmp_literal() function
This omits the finding of matching provisions and only checks the
package itself against the provided dep.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Dan McGee
78b63ce7c3 Replacements refactor: extract check_replacers()
This moves code that was inline in alpm_sync_sysupgrade() to its own
method.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Dan McGee
231d6cc1e4 Replacements refactor: extract check_literal()
This moves code that was inline in alpm_sync_sysupgrade() to its own
method.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Dan McGee
5d291d050e Remove usages of alpm_list_next() in backend
Another function call that can be replaced by a single pointer
dereference.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Dan McGee
c4bd476ad1 Remove use of no-op accessor functions in library
The functions alpm_db_get_name(), alpm_pkg_get_name(), and
alpm_pkg_get_version() are not necessary at all, so remove the calling
and indirection when used in the backend, which makes things slightly
more efficient and reduces code size.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Dan McGee
c885a953eb Enhance and utilize database status flags
* Move is_local standalone field to status enum
* Create VALID/INVALID flag pair
* Create EXISTS/MISSING flag pair

With these additional fields, we can be more intelligent with database
loading and messages to the user. We now only warn once if a sync
database does not exist and do not continue to try to load it once we
have marked it as missing.

The reason for the flags existing in pairs is so the unknown case can be
represented. There should never be a time when both flags in the same
group are true, but if they are both false, it represents the unknown
case. Care is taken to always manipulate both flags at the same time.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Sebastien Luttringer
4a7f3bbc46 Add makepkg -S which is an alias to makepkg --source
makepkg --source is a often used go make source package like for AUR.
Have a -S shortcut will save the world.

Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Lukas Fleischer
d18e600952 lib/libalpm/dload.c: Use STRDUP() instead of strdup()
Use the STRDUP macro instead of strdup() for the sake of better error
handling on memory allocation failures.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 10:47:41 -05:00
Lukas Fleischer
0745288c14 lib/libalpm/dload.c: Add ASSERT() to alpm_fetch_pkgurl()
Return with ALPM_ERR_WRONG_ARGS instead of causing a potential segfault
if alpm_fetch_pkgurl() is invoked with a NULL URL.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18 07:38:31 -05:00
Dave Reisner
9f139550f8 lib/dload: refactor deletion on failure
This moves all the delete-on-fail logic to under cleanup label. This
also implies should_unlink when a payload is received that doesn't allow
resuming.

Fixes .db.sig.part files leftover in the sync dir.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-17 21:03:43 -05:00
Dave Reisner
2dbdfe0788 lib/dload: avoid renaming download to 0 length destfile
This leverages earlier work that avoids a rename when destfile is unset.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-17 17:31:04 -05:00
Lukas Fleischer
b9833838c6 Avoid stat() on NULL path in curl_download_internal()
stat()'s behaviour is undefined if the first argument is NULL and might
be prone to segfault. Add an additional check to skip the stat()
invocation if no destfile is used.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-17 17:30:52 -05:00
Lukas Fleischer
9cddc4ad80 Skip rename() on NULL destfile in curl_download_internal()
Avoid a potential segfault that may occur if we use a temporary file and
fail to build the destination file name from the effective URL.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-17 17:30:41 -05:00
Dan McGee
3ceef97799 Fix trailing whitespace in whole codebase
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-17 17:03:19 -05:00
Sebastien Luttringer
b2688e9559 Update PKGBUILD manpage about startdir deprecation
Signed-off-by: Sebastien Luttringer <seblu@seblu.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-17 16:54:53 -05:00
Dan McGee
b952a3b08c Fix compilation using --without-gpgme
This function is used regardless of whether gpgme support is enabled, so
make sure it is always accessible.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16 19:51:21 -05:00
Allan McRae
c5c1a1349a configure.ac: add checks for more types, functions and headers
This covers most types, functions and headers that we use in the
code base.  Currently we do not use any of these checks, but it
is useful to have the configure output when looking at build issues
on other peoples systems.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16 19:39:07 -05:00
Dave Reisner
b008193c12 dload: zero out pm_errno in curl_download_internal
This reverts some hacky behavior from 5fc3ec and resets the handle's
pm_errno where it should be reset -- prior to each download. This
prevents a transaction with a download from being aborted when a package
is successfully grabbed from a secondary server.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16 19:37:14 -05:00
Dan McGee
cea6d7eb13 doc/PKGBUILD: fix Asciidoc formatting issues
We had this gem:
    ⇐ (less than or equal to)

Due to not ensuring we did literal printing of things like this. Fix it
and a few other problems noticed scanning through both the HTML and
manpage generated files.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16 11:47:53 -05:00
Dan McGee
70db027204 Update authors and contributors
* .mailmap: add mapping for Dave's two email addresses.
* AUTHORS: clear out file, tell people to use `git shortlog -s` instead.
* doc/footer.txt: "promote" Dave, put Xavier and Nagy in past contributors.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16 11:46:44 -05:00
Allan McRae
f41dc7e8fa repo-add: fix creation of signature symlink
When creating a repo outside the current directory, the signature
symlink was not created.

Reported-by: Gaetan Bisson <bisson@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-16 09:25:10 -05:00
Dan McGee
1175702828 Update message catalogs
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 16:09:45 -05:00
Dan McGee
d4a92cacc6 Update translations from Transifex
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 16:09:11 -05:00
Dan McGee
11b9bc443d repo-add: reorganize output messages for clarity
The use of warning once we had already started adding a package was
confusing as it broke the standard indent pattern. It was especially bad
if adding multiple packages as it wasn't clear what sub-messages applied
to which package being added. This should be an output change only from:

    ==> Adding package '/tmp/sync/netcfg-2.6.7-1-any.pkg.tar.xz'
      -> Computing checksums...
      -> Adding package signature...
    ==> WARNING: An entry for 'netcfg-2.6.7-1' already existed
      -> Removing existing entry 'netcfg-2.6.7-1'...
      -> Creating 'desc' db entry...
      -> Creating 'depends' db entry...

to:

    ==> Adding package '/tmp/sync/netcfg-2.6.7-1-any.pkg.tar.xz'
    ==> WARNING: An entry for 'netcfg-2.6.7-1' already existed
      -> Computing checksums...
      -> Adding package signature...
      -> Removing existing entry 'netcfg-2.6.7-1'...
      -> Creating 'desc' db entry...
      -> Creating 'depends' db entry...

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 15:15:11 -05:00
Dan McGee
11f4a7a48e Only check necessary signatures and checksums
The precedence goes as follows: signature > sha256sum > md5sum

Add some logic and helper methods to check what we have available when
loading a package, and then only check what is necessary to verify the
package. This should speed up sync database verifies as we no longer
will be doing both a checksum and a signature validation.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 15:15:11 -05:00
Rémy Oudompheng
855bc16a9e libalpm: fix a remaining old syntax of RET_ERR() macro
It would prevent compilation of pacman on FreeBSD, and possibly other
systems.

Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 14:55:14 -05:00
Dave Reisner
5fc3ecf7f8 lib/sync: ignore download errors for as long as possible
Previously, the behavior was such that if a sync operation required
packages from multiple repos, a download error in the first repo would
cause a hard repo, ignoring the remainder of the repositories. Change
this behavior so that we do a better job of fetching as many packages as
possible before aborting the transaction.

There's a little bit of refactoring mixed in here to get rid of some
useless variables. Since we now depend heavily on the value of
handle->pm_errno being accurate the determine the function's return
value, we clear it when the transaction state is set.

Fixes FS#25532.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 14:54:21 -05:00
Dan McGee
796eaaed40 Further fixes to replacement iteration
A partial fix for this was in commit 7de92cb22, but this should fix the
remaining cases. There are still several issues dealing with "provision
as replacement" selection however.

Addresses FS#25538 and FS#25527.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 14:47:19 -05:00
Dan McGee
88bd1cec77 Add short example signature config to pacman.conf
This is similar to what we do with every other option.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 13:08:24 -05:00
Dave Reisner
82ffe2cbfd build-sys: always use $(RM) instead of rm -f
These are equivalent. Use the autoconf macro for consistency.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 13:05:27 -05:00
Dave Reisner
1741b5cc30 dist: preserve symlinks on installation
This applies to the repo-remove man page as well as the script itself.

Yes Dan, I ran distcheck afterwards.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 13:05:17 -05:00
Dan McGee
a628feee46 Parse conflicts/provides/replaces at database load time
We did this with depends way back in commit c244cfecf6 in 2007. We
can do it with these fields as well.

Of note is the inclusion of provides even though only '=' is supported-
we'll parse other things, but no guarantees are given as to behavior,
which is more or less similar to before since we only looked for the
equals sign.

Also of note is the non-inclusion of optdepends; this will likely be
resolved down the road.

The biggest benefactors of this change will be the resolving code that
formerly had to parse and reparse several of these fields; it only
happens once now at load time. This does lead to the disadvantage that
we will now always be parsing this information up front even if we never
need it in the split form, but as these are uncommon fields and our
parser is quite efficient it shouldn't be a big concern.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 12:56:41 -05:00
Dan McGee
bd5ec9cd8e Validate the sha256sum if available
Adjust load_internal() to check the sha256sum value if we have it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 12:13:35 -05:00
Dan McGee
f37c501657 Show 'None' in Signatures -Qip/-Si output if none found
This is to be as consistent as possible across both types of display.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 12:12:37 -05:00
Dan McGee
fa4aad5b50 decode_signature: guess signature data length for efficiency
We may end up allocating 1 or 2 extra bytes this way, but it is worth it
to simplify the method and not have to call base64_decode() a second
time. Use the hueristic that base64 encoding produces 3 bytes of decoded
data for every 4 bytes of encoded data.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 12:11:59 -05:00
Dan McGee
f3f39cef84 Remove checksum access indirection
These items are never present in anything but sync databases, nor do we
even try to load them from the local database. Remvoe the indirection
meant to allow the caching layer to work since it will never do anything
anyway.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 12:11:59 -05:00
Dave Reisner
7de92cb223 lib/sync: reset flag after rejecting a replace
This prevents iteration through the remainder of the current tree, with
pacman claiming that they're all replacements to the original
replacement candidate.

:: Synchronizing package databases...
 allanbrokeit is up to date
 testing is up to date
 core is up to date
 extra is up to date
 community-testing is up to date
 community is up to date
:: Starting full system upgrade...
:: Replace util-linux-git with core/util-linux? [Y/n] n
:: Replace util-linux-git with core/vi? [Y/n] n
:: Replace util-linux-git with core/vpnc? [Y/n] n
:: Replace util-linux-git with core/wget? [Y/n] n
:: Replace util-linux-git with core/which? [Y/n] n
:: Replace util-linux-git with core/wireless-regdb? [Y/n] n
:: Replace util-linux-git with core/wireless_tools? [Y/n] n
:: Replace util-linux-git with core/wpa_actiond? [Y/n] n
:: Replace util-linux-git with core/wpa_supplicant? [Y/n] n
:: Replace util-linux-git with core/xfsprogs? [Y/n] n
:: Replace util-linux-git with core/xinetd? [Y/n] n
:: Replace util-linux-git with core/xz? [Y/n] n
:: Replace util-linux-git with core/zd1211-firmware? [Y/n] n
:: Replace util-linux-git with core/zlib? [Y/n] n
 there is nothing to do

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 12:11:59 -05:00
Dan McGee
ebb2e36cc4 Load and allow access to sha256sum
This adds a field in the package struct for this checksum type as well
as allowing access via the API to it. The frontend is now able to
display any read value. Note that this does not implement any use or
verification of the value internally.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 12:11:55 -05:00
Dan McGee
31f2e0cba3 Add ALPM sha256sum routines
These mirror ones we already have for md5sums.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 07:07:13 -05:00
Dan McGee
ff88228abd Add sha2 (sha256) routines from PolarSSL
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 07:07:13 -05:00
Allan McRae
31a7b150b0 repo-add: indicate whether package signature is found
When adding a package to a repo, it is useful to be able to see
that repo-add has indeed found the signature file.

[Dan: update text to be more in line with other messages]

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 07:07:13 -05:00
Dave Reisner
20b5cc96be pacman/package: show presence of signature in in -Si
adds a new API method: alpm_pkg_get_base64_sig

[Dan: don't use a new header string in frontend]

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 07:06:23 -05:00
Dave Reisner
ea79de21d8 README: update with 3.5.0 -> 4.0.0 API changes
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 06:34:15 -05:00
Dave Reisner
71f854dde8 makepkg: don't hardcode path to strip
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 06:33:01 -05:00
Dave Reisner
05f87e0b09 alpm.h: fix inconsistency in function prototype
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 06:30:58 -05:00
Dave Reisner
8d5018e780 add pactest for replacing a shared provider
This is currently expected to fail.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 06:30:25 -05:00
Dave Reisner
ce8f91a71b pactest/sync200: check for curl instead of fetch
We can't just check for LIBS as curl won't be listed. Instead, look at
the length of the LIBCURL var from the Makefile.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 06:29:09 -05:00
Dave Reisner
6bf60568f8 lib/dload: avoid deleting .part file on too-slow xfer
Take this opportunity to refactor the if/then/else logic into a
switch/case which is likely going to be needed to fine tune more
exceptions in the future.

Fixes FS#25531

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 06:26:08 -05:00
Dan McGee
83f076d3a8 Update base64 PolarSSL code
Also adjust our code using it for the size_t adjustments made by
upstream.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15 06:24:49 -05:00
Dan McGee
835365b817 Update MD5 routines with changes from PolarSSL
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-11 20:17:21 -05:00
Dan McGee
c9cc2332cf pacman/query.c: avoid variable redeclaration
We were using i as the loop variable in both the inner and outer loop.
Use j in the inner loop instead for clarity.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-11 20:17:21 -05:00
Pang Yan Han
450bcb5d7b pactest: -U --recursive
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-11 12:52:18 -05:00
Dan McGee
fffaba50fb scripts/pkgdelta: fix make distcheck
--help and --version are required by the sanity checks performed by
`make distcheck`.

Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-11 11:56:47 -05:00
194 changed files with 17188 additions and 6449 deletions

View File

@@ -7,6 +7,7 @@ Bryan Ischo <bryan@ischo.com> <bji-keyword-pacman.3644cb@www.ischo.com>
Christos Nouskas <nous@archlinux.us> <nouskas@gmail.com>
Daenyth Blank <daenyth+arch@gmail.com> <Daenyth+Arch@gmail.com>
Daenyth Blank <Daenyth+arch@gmail.com> <Daenyth+git@gmail.com>
Dave Reisner <dreisner@archlinux.org> <d@falconindy.com>
甘露(Gan Lu) <rhythm.gan@gmail.com>
Giovanni Scafora <giovanni@archlinux.org> <linuxmania@gmail.com>
Jaroslaw Swierczynski <swiergot@gmail.com> <swiergot@juvepoland.com>

17
AUTHORS
View File

@@ -1,16 +1 @@
Judd Vinet <jvinet@zeroflux.org>
Aurelien Foret <aurelien@archlinux.org>
Aaron Griffin <aaron@archlinux.org>
Dan McGee <dan@archlinux.org>
Miklós Vajna <vmiklos@frugalware.org>
Christian Hamar <krics@linuxforum.hu>
Josh Wheeler <deltalima@gmail.com>
David Kimpe <DNAku@frugalware.org>
James Rosten <seinfeld90@gmail.com>
Roman Kyrylych <Roman.Kyrylych@gmail.com>
Andrew Fyfe <andrew@neptune-one.net>
Chantry Xavier <shiningxc@gmail.com>
Nagy Gabor <ngaba@bibl.u-szeged.hu>
Nathan Jones <nathanj@insightbb.com>
Allan McRae <mcrae_allan@hotmail.com>
Use `git shortlog -s` for a list of contributors.

View File

@@ -22,7 +22,7 @@ dist_pkgdata_DATA = \
# run the pactest test suite and vercmp tests
check-local: test/pacman test/util src/pacman src/util
$(PYTHON) $(top_srcdir)/test/pacman/pactest.py --debug=1 \
LC_ALL=C $(PYTHON) $(top_srcdir)/test/pacman/pactest.py --debug=1 \
--test $(top_srcdir)/test/pacman/tests/*.py \
-p $(top_builddir)/src/pacman/pacman
$(SH) $(top_srcdir)/test/util/pacsorttest.sh \

6
NEWS
View File

@@ -122,7 +122,7 @@ VERSION DESCRIPTION
- Installing packages with -U can handle installing
dependencies, conflict resolution and replacing packages
(FS#3492, FS#5798)
- can upgrade the system and install a new package using
- can upgrade the system and install a new package using
"pacman -Syu <pkg>" (FS#15581)
- new -D/--database operation for modifying package install
reasons (FS#12950)
@@ -134,7 +134,7 @@ VERSION DESCRIPTION
- allow -Qo to perform a functional 'which' (FS#8798)
- cache cleaning cleans all directories, not just first
- cleanupdelta: new utility to help remove unused deltas from
a repo database
a repo database
- bash completion: rewrite for size and performance (FS#16630)
- repo-add: handle removing the final package from a repo
- rankmirrors: rewrite using bash
@@ -580,7 +580,7 @@ VERSION DESCRIPTION
- Makefile fix for nonstandard lib search paths (Kevin Piche)
- fixed the leftover directories in /tmp
- speed improvement patches from Tommi Rantala
2.9.2 - bugfix for 2.9.1
2.9.2 - bugfix for 2.9.1
2.9.1 - --refresh now only downloads fresh packages lists if they've
been updated (currently only works with FTP)
2.9 - Improved -Rs functionality -- pacman now tracks why a package

82
README
View File

@@ -154,7 +154,7 @@ specified error code into a more friendly sentence, and alpm_strerrorlast()
does the same for the last error encountered (represented by pm_errno).
[List - alpm_list_t]
[List - alpm_list_t]
The alpm_list_t structure is a doubly-linked list for use with the libalpm
routines. This type is provided publicly so that frontends are free to use it
@@ -365,3 +365,83 @@ API CHANGES BETWEEN 3.4 AND 3.5
PM_TRANS_FLAG_NODEPVERSION, PM_TRANS_EVT_DISKSPACE_START,
PM_TRANS_EVT_DISKSPACE_DONE, PM_TRANS_CONV_SELECT_PROVIDER,
PM_TRANS_PROGRESS_DISKSPACE_START, PM_TRANS_PROGRESS_INTEGRITY_START
API CHANGES BETWEEN 3.5 AND 4.0
===============================
[REMOVED]
- error codes:
PM_ERR_LIBFETCH, PM_ERR_WRITE
- alpm_option_set_root(), alpm_option_set_dbpath()
- alpm_list_first()
- alpm_grp_get_name(), alpm_grp_get_pkgs()
- alpm_delta_get_from(), alpm_delta_get_to(), alpm_delta_get_filename(),
alpm_delta_get_md5sum(), alpm_delta_get_size()
- alpm_miss_get_target(), alpm_miss_get_dep(), alpm_miss_get_causingpkg()
- alpm_dep_get_mod(), alpm_dep_get_name(), alpm_dep_get_version()
- alpm_conflict_get_package1(), alpm_conflict_get_package2(),
alpm_conflict_get_reason()
- alpm_fileconflict_get_target(), alpm_fileconflict_get_type(),
alpm_fileconflict_get_file(), alpm_fileconflict_get_ctarget()
- alpm_db_get_url()
[CHANGED]
- PM_ prefixes for enum values are now ALPM_
- pm prefixes for structs and enums are now alpm_
- alpm_initialize now has parameters: char *root, char *dbpath,
_alpm_errno_t *err and returns an alpm_handle_t struct.
- alpm_release now takes an alpm_handle_t *.
- alpm_db_register_sync() now requires a extra parameter of a alpm_siglevel_t.
- alpm_pkg_load() now requires an extra parameter of an alpm_siglevel_t
- alpm_db_setserver() replaced by alpm_db_set_servers(), alpm_db_add_server(),
alpm_db_remove_server()
- alpm_trans_init() no longer takes callbacks, set those using
alpm_option_set_*cb() functions
- many functions now require a first parameter of an alpm_handle_t *:
- alpm_option_get_*
- alpm_option_set_*
- alpm_option_add_*
- alpm_option_remove_*
- alpm_trans_*
- alpm_add_pkg
- alpm_checkconflicts
- alpm_checkdeps
- alpm_db_register_sync
- alpm_db_set_pkgreason
- alpm_db_unregister_all
- alpm_fetch_pkgurl
- alpm_find_dbs_satisfier
- alpm_logaction
- alpm_pkg_load
- alpm_release
- alpm_remove_pkg
- alpm_sync_sysupgrade
- several structs are no longer opaque
- alpm_conflict_t
- alpm_delta_t
- alpm_depend_t
- alpm_depmissing_t
- alpm_depmod_t
- alpm_fileconflict_t
- alpm_group_t
- alpm_pkg_reason_t
[ADDED]
- option functions:
alpm_{get,set}_eventcb(), alpm_option_{get,set}_convcb(),
alpm_option_{get,set}_progresscb()
- package signing functions:
alpm_option_get_default_siglevel(), alpm_option_set_default_siglevel(),
alpm_option_get_gpgdir(), alpm_option_set_gpgdir(), alpm_db_get_siglevel(),
alpm_siglist_cleanup(), alpm_db_check_pgp_signature(), alpm_pkg_check_pgp_signature(),
alpm_pkg_get_origin(), alpm_pkg_get_sha256sum(), alpm_pkg_get_base64_sig()
- list functions:
alpm_list_to_array(), alpm_list_previous()
- structs:
alpm_backup_t, alpm_file_t, alpm_filelist_t
- enums:
alpm_siglevel_t, alpm_sigstatus_t, alpm_sigvalidity_t, alpm_pkgfrom_t
- error codes:
ALPM_ERR_DB_INVALID, ALPM_ERR_DB_INVALID_SIG, ALPM_ERR_GPGME,
ALPM_ERR_PKG_INVALID_CHECKSUM, ALPM_ERR_PKG_INVALID_SIG, ALPM_ERR_SIG_INVALID,
ALPM_ERR_SIG_MISSING

View File

@@ -125,10 +125,12 @@ AC_ARG_ENABLE(git-version,
# Checks for programs.
AC_PROG_AWK
AC_PROG_CC_C99
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_PROG_RANLIB
AC_CHECK_PROGS([PYTHON], [python2.7 python2.6 python2.5 python2 python], [false])
AC_PATH_PROGS([BASH_SHELL], [bash bash4 bash3], [false])
@@ -170,17 +172,19 @@ AS_IF([test "x$with_gpgme" != "xno"],
AM_CONDITIONAL([HAVE_LIBGPGME], [test "x$with_gpgme" = "xyes"])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h glob.h libintl.h locale.h mntent.h string.h \
sys/ioctl.h sys/mount.h sys/param.h sys/statvfs.h \
sys/time.h sys/types.h sys/ucred.h syslog.h termios.h \
wchar.h])
AC_CHECK_HEADERS([fcntl.h float.h glob.h libintl.h limits.h locale.h \
mntent.h stddef.h string.h sys/ioctl.h sys/mount.h \
sys/param.h sys/statvfs.h sys/time.h sys/types.h \
sys/ucred.h syslog.h termios.h wchar.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_INT64_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_STRUCT_TM
AC_TYPE_UID_T
AC_STRUCT_DIRENT_D_TYPE
@@ -190,10 +194,14 @@ PATH_MAX_DEFINED
AC_FUNC_FORK
AC_FUNC_GETMNTENT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_CHECK_FUNCS([geteuid getmntinfo realpath regcomp strcasecmp \
strndup strrchr strsep swprintf tcflush \
wcwidth uname])
AC_FUNC_STRCOLL
AC_CHECK_FUNCS([dup2 getcwd geteuid getmntinfo gettimeofday memmove memset \
mkdir realpath regcomp rmdir setenv setlocale strcasecmp \
strchr strcspn strdup strerror strndup strrchr strsep strstr \
strtol swprintf tcflush wcwidth uname])
# For the diskspace code
FS_STATS_TYPE
AC_CHECK_MEMBERS([struct statvfs.f_flag],,,[[#include <sys/statvfs.h>]])
@@ -217,7 +225,7 @@ STRIP_STATIC="--strip-debug"
case "${host_os}" in
*bsd*)
SIZECMD="stat -L -f %z"
SEDINPLACE="sed -i ''"
SEDINPLACE="sed -i \"\""
;;
cygwin*)
host_os_cygwin=yes

View File

@@ -36,7 +36,7 @@ edit = sed \
$(OURSCRIPTS): Makefile
@echo ' ' GEN $@;
@rm -f $@ $@.tmp
@$(RM) $@ $@.tmp
@$(edit) $(srcdir)/$@.in >$@.tmp
@chmod +x $@.tmp
@chmod a-w $@.tmp
@@ -44,7 +44,7 @@ $(OURSCRIPTS): Makefile
$(OURFILES): Makefile
@echo ' ' GEN $@;
@rm -f $@ $@.tmp
@$(RM) $@ $@.tmp
@$(edit) $(srcdir)/$@.in >$@.tmp
@chmod a-w $@.tmp
@mv $@.tmp $@

View File

@@ -35,7 +35,7 @@ _makepkg() {
opts=('allsource asroot check clean config force geninteg help holdver ignorearch
install log nobuild nocheck nocolor noconfirm nodeps noextract noprogressbar
nosign pkg repackage rmdeps sign skipinteg source syncdeps'
'A L R c d e f g h i m o p r s')
'A L R S c d e f g h i m o p r s')
_arch_ptr2comp opts
fi
true
@@ -59,7 +59,7 @@ _pacman() {
query=('changelog check deps explicit file foreign groups info list owns
search unrequired upgrades' 'c e g i k l m o p s t u')
remove=('cascade dbonly nodeps nosave print recursive unneeded' 'c n p s u')
sync=('asdeps asexplicit clean downloadonly force groups ignore ignoregroup
sync=('asdeps asexplicit clean dbonly downloadonly force groups ignore ignoregroup
info list needed nodeps print refresh recursive search sysupgrade'
'c f g i l p s u w y')
upgrade=('asdeps asexplicit force needed nodeps print recursive' 'f p')

View File

@@ -95,10 +95,8 @@ pkgfilter() {
# enforce architecture match if specified
if (!scanarch || scanarch == idx[2]) {
count = split(packages[idx[1], idx[2]], pkgs, SUBSEP)
if (count > keep) {
for(i = 1; i <= count - keep; i++) {
print pkgs[i]
}
for(i = 1; i <= count - keep; i++) {
print pkgs[i]
}
}
}
@@ -121,7 +119,7 @@ size_to_human() {
}
sizestr = sprintf("%.2f", size)
sub(/.?0+$/, "", sizestr)
sub(/\.?0+$/, "", sizestr)
printf("%s %s", sizestr, suffix[count])
}'
}

View File

@@ -116,12 +116,12 @@ _pacman_action_none() {
_pacman_action_query() {
local context state line
typeset -A opt_args
# _arguments -s : \
# "$_pacman_opts_common[@]" \
# "$_pacman_opts_query_actions[@]" \
# "$_pacman_opts_query_modifiers[@]"
case $state in
query_file)
_arguments -s : \
@@ -168,12 +168,12 @@ _pacman_action_remove() {
_pacman_action_sync() {
local context state line
typeset -A opt_args
# _arguments -s : \
# "$_pacman_opts_common[@]" \
# "$_pacman_opts_sync_actions[@]" #\
# #"$_pacman_opts_sync_modifiers[@]"
case $state in
sync_clean)
_arguments -s : \

View File

@@ -76,7 +76,7 @@ REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
endif
man_MANS =
dist_man_MANS = $(ASCIIDOC_MANS) repo-remove.8
dist_man_MANS = $(ASCIIDOC_MANS)
if USE_DOXYGEN
man_MANS += $(DOXYGEN_MANS)
@@ -148,7 +148,17 @@ pacman.conf.5 pacman.conf.5.html: pacman.conf.5.txt
libalpm.3 libalpm.3.html: libalpm.3.txt
# this one is just a symlink
repo-remove.8: repo-add.8
rm -f repo-remove.8
$(RM) repo-remove.8
$(LN_S) repo-add.8 repo-remove.8
install-data-hook:
cd $(DESTDIR)$(mandir)/man8 && \
$(RM) repo-remove.8 && \
( $(LN_S) repo-add.8 repo-remove.8 || \
ln repo-add.8 repo-remove.8 || \
cp repo-add.8 repo-remove.8 )
uninstall-hook:
$(RM) $(DESTDIR)$(mandir)/man8/repo-remove.8
# vim:set ts=2 sw=2 noet:

View File

@@ -117,7 +117,7 @@ name. The syntax is: `source=('filename::url')`.
This array contains an MD5 hash for every source file specified in the
source array (in the same order). makepkg will use this to verify source
file integrity during subsequent builds. To easily generate md5sums, run
``makepkg -g >> PKGBUILD''. If desired, move the md5sums line to an
`makepkg -g >> PKGBUILD`. If desired, move the md5sums line to an
appropriate location.
*sha1sums, sha256sums, sha384sums, sha512sums (arrays)*::
@@ -134,7 +134,7 @@ name. The syntax is: `source=('filename::url')`.
*arch (array)*::
Defines on which architectures the given package is available (e.g.,
`arch=('i686' 'x86_64')`). Packages that contain no architecture specific
files should use arch=('any').
files should use `arch=('any')`.
*backup (array)*::
An array of filenames, without preceding slashes, that
@@ -146,9 +146,9 @@ name. The syntax is: `source=('filename::url')`.
An array of packages this package depends on to run. Entries in
this list should be surrounded with single quotes and contain at least
the package name. Entries can also include a version requirement of the
form 'name<>version', where <> is one of five comparisons: >= (greater
than or equal to), <= (less than or equal to), = (equal to), > (greater
than), or < (less than).
form 'name<>version', where `<>` is one of five comparisons: `>=` (greater
than or equal to), `<=` (less than or equal to), `=` (equal to), `>`
(greater than), or `<` (less than).
+
If the dependency name appears to be a library (ends with .so), makepkg will
try to find a binary that depends on the library in the built package and
@@ -178,18 +178,19 @@ disables auto detection.
*conflicts (array)*::
An array of packages that will conflict with this package (i.e. they
cannot both be installed at the same time). This directive follows the
same format as depends. Versioned conflicts are also supported.
same format as depends. Versioned conflicts are supported using the
operators as described in `depends`.
*provides (array)*::
An array of ``virtual provisions'' this package provides. This allows
a package to provide dependencies other than its own package name. For
example, the dcron package can provide 'cron', which allows packages to
depend on 'cron' rather than 'dcron OR fcron'.
Versioned provisions are also possible, in the 'name=version' format.
For example, dcron can provide 'cron=2.0' to satisfy the 'cron>=2.0'
dependency of other packages. Provisions involving the '>' and '<'
operators are invalid as only specific versions of a package may be
provided.
+
Versioned provisions are also possible, in the 'name=version' format. For
example, dcron can provide 'cron=2.0' to satisfy the 'cron>=2.0' dependency of
other packages. Provisions involving the `>` and `<` operators are invalid as
only specific versions of a package may be provided.
+
If the provision name appears to be a library (ends with .so), makepkg will
try to find the library in the built package and append the correct
@@ -199,9 +200,11 @@ version. Appending the version yourself disables auto detection.
An array of packages this package should replace. This can be used
to handle renamed/combined packages. For example, if the 'j2re' package
is renamed to 'jre', this directive allows future upgrades to continue
as expected even though the package has moved. Sysupgrade is currently
the only pacman operation that utilizes this field, a normal sync will
not use its value.
as expected even though the package has moved. Versioned replaces are
supported using the operators as described in `depends`.
+
Sysupgrade is currently the only pacman operation that utilizes this field.
A normal sync or upgrade will not use its value.
*options (array)*::
This array allows you to override some of makepkg's default behavior
@@ -273,6 +276,7 @@ variables for use during the build and install process:
*startdir*::
This contains the absolute path to the directory where the PKGBUILD is
located, which is usually the output of `$(pwd)` when makepkg is started.
Use of this variable is deprecated and strongly discouraged.
*srcdir*::
This contains the directory where makepkg extracts, or copies, all source

View File

@@ -20,12 +20,15 @@ Current maintainers:
* Allan McRae <allan@archlinux.org>
* Dan McGee <dan@archlinux.org>
* Xavier Chantry <shiningxc@gmail.com>
* Dave Reisner <dreisner@archlinux.org>
Past contributors:
Past major contributors:
* Judd Vinet <jvinet@zeroflux.org>
* Aurelien Foret <aurelien@archlinux.org>
* Aaron Griffin <aaron@archlinux.org>
* Xavier Chantry <shiningxc@gmail.com>
* Nagy Gabor <ngaba@bibl.u-szeged.hu>
See the 'AUTHORS' file for additional contributors.
For additional contributors, use `git shortlog -s` on the pacman.git
repository.

View File

@@ -16,10 +16,10 @@ automatically and can download packages from a remote server.
History
~~~~~~~
Version 2.0 of pacman introduced the ability to sync packages (the `--sync`
Version 2.0 of pacman introduced the ability to sync packages (the '\--sync'
option) with a master server through the use of package databases. Prior to
this, packages would have to be installed manually using the `--add` and
`--upgrade` operations.
this, packages would have to be installed manually using the '\--add' and
'\--upgrade' operations.
Version 3.0 was the switch to a two-part pacman- a backend named libalpm
(library for Arch Linux Package Management), and the familiar pacman frontend.

View File

@@ -117,7 +117,7 @@ Options
*-o, \--nobuild*::
Download and extract files only, but do not build them. Useful with the
`\--noextract` option if you wish to tweak the files in src/ before
'\--noextract' option if you wish to tweak the files in src/ before
building.
*-p* <buildscript>::
@@ -138,6 +138,13 @@ Options
dependencies are not found, pacman will try to resolve them. If
successful, the missing packages will be downloaded and installed.
*-S, \--source*::
Do not actually build the package, but build a source-only tarball that
does not include sources that can be fetched via a download URL. This is
useful for passing a single tarball to another program such as a chroot,
remote builder, or a tarball upload. Because integrity checks are verified,
all source files of the package need to be present or downloadable.
*\--allsource*::
Do not actually build the package, but build a source-only tarball that
includes all sources, including those that are normally download via
@@ -145,13 +152,6 @@ Options
such as a chroot or remote builder. It will also satisfy requirements of
the GPL when distributing binary packages.
*\--source*::
Do not actually build the package, but build a source-only tarball that
does not include sources that can be fetched via a download URL. This is
useful for passing a single tarball to another program such as a chroot,
remote builder, or a tarball upload. Because integrity checks are verified,
all source files of the package need to be present or downloadable.
*\--pkg <list>*::
Only build listed packages from a split package.

View File

@@ -96,7 +96,7 @@ Options
*check*;;
Run the check() function if present in the PKGBUILD. This can be
enabled or disabled for individual packages through the use of
makepkg's `--check` and `--nocheck` options respectively.
makepkg's '\--check' and '\--nocheck' options respectively.
*sign*;;
Generate a PGP signature file using GnuPG. This will execute `gpg
@@ -120,7 +120,7 @@ Options
**GPGKEY=**""::
Specify a key to use for gpg signing instead of the default key in the
keyring. Can be overridden with makepkg's `--key` option.
keyring. Can be overridden with makepkg's '\--key' option.
**OPTIONS=(**strip docs libtool emptydirs zipman purge !upx**)**::
This array contains options that affect the default packaging. They are

View File

@@ -23,7 +23,7 @@ provides the ability to import and export keys, fetch keys from keyservers and
update the key trust database.
More complex keyring management can be achieved using GnuPG directly combined with
the `--homedir` option pointing at the pacman keyring (located in
the '\--homedir' option pointing at the pacman keyring (located in
+{sysconfdir}/pacman.d/gnupg+ by default).
@@ -45,9 +45,9 @@ Options
Export key(s) identified by the specified keyid(s) to 'stdout'. If no keyid
is specified, all keys will be exported.
*\--edit-key * <keyid(s)>::
Present a menu for key management task on the specified keyids. Useful for
adjusting a keys trust level.
*\--edit-key* <keyid(s)>::
Present a menu for key management task on the specified keyid(s). Useful
for adjusting a keys trust level.
*-f, \--finger* [keyid(s)]::
List a fingerprint for each specified keyid, or for all known keys if no
@@ -60,39 +60,78 @@ Options
*-h, \--help*::
Output syntax and command line options.
*--import* <dir(s)>::
*\--import* <dir(s)>::
Adds keys from pubring.gpg into pacman's keyring and imports ownertrust
values from trustdb.gpg in the specified directories.
*--import-dirs* <dir(s)> ::
*\--import-dirs* <dir(s)> ::
Imports ownertrust values from trustdb.gpg in the specified directories.
*--init*::
*\--init*::
Ensure the keyring is properly initialized and has the required access
permissions.
*\--keyserver* <keyserver>::
Use the specified keyserver if the operation requires one. This will take
precedence over any keyserver option specified in a `gpg.conf`
configuration file. Running '\--init' with this option will set the default
keyserver if one was not already configured.
*-l, \--list-keys* [keyid(s)]::
Lists all or specified keys from the public keyring.
*--list-sigs* [keyid(s)]::
Same as --list-keys, but the signatures are listed too.
*\--list-sigs* [keyid(s)]::
Same as '\--list-keys', but the signatures are listed too.
*-r, \--receive* <keyserver> <keyid(s)>::
Fetch the specified keyids from the specified key server URL.
*\--lsign-key* <keyid>::
Locally sign the given key. This is primarily used to root the web of trust
in the local private key generated by '\--init'.
*\--reload*::
Reloads the keys from the keyring package.
*-r, \--recv-keys* <keyid(s)>::
Equivalent to '\--recv-keys' in GnuPG.
*\--refresh-keys* [keyid(s)]::
Equivalent to '\--refresh-keys' in GnuPG.
*\--populate* [keyring(s)]::
Reload the default keys from the (optionally provided) keyrings in
+{pkgdatadir}/keyrings+. For more information, see
<<SC,Providing a Keyring for Import>> below.
*-u, \--updatedb*::
Equivalent to \--check-trustdb in GnuPG.
Equivalent to '\--check-trustdb' in GnuPG.
* -v, \--verify* <signature>::
*-v, \--verify* <signature>::
Verify the given signature file.
*-V, \--version*::
Displays the program version.
Providing a Keyring for Import
------------------------------
A distribution or other repository provided may want to provide a set of
PGP keys used in the signing of its packages and repository databases that can
be readily imported into the pacman keyring. This is achieved by providing a
PGP keyring file `foo.gpg` that contains the keys for the foo keyring in the
directory +{pkgdatadir}/keyrings+.
Optionally, the file `foo-trusted` can be provided containing a list of trusted
key IDs for that keyring. This file will inform the user which keys a user
needs to verify and sign to build a local web of trust.
Also optionally, the file `foo-revoked` can be provided containing a list of
revoked key IDs for that keyring. Revoked is defined as "no longer valid for
any signing", so should be used with prudence. A key being marked as revoked
will be disabled in the keyring and no longer treated as valid, so this always
takes priority over it's trusted state in any other keyring.
All files are required to be signed (detached) by a trusted PGP key that the
user must manually import to the pacman keyring. This prevents a potentially
malicious repository adding keys to the pacman keyring without the users
knowledge.
See Also
--------
linkman:pacman[8], linkman:pacman.conf[5]

View File

@@ -86,7 +86,7 @@ You can also use `pacman -Su` to upgrade all packages that are out of date. See
to determine which packages need upgrading. This behavior operates as follows:
Alphanumeric:
1.0a < 1.0alpha < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0
1.0a < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0 < 1.0.a < 1.0.1
Numeric:
1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
+

View File

@@ -26,7 +26,7 @@ numbers. It outputs values as follows:
Version comparsion operates as follows:
Alphanumeric:
1.0a < 1.0alpha < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0
1.0a < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0 < 1.0.a < 1.0.1
Numeric:
1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0

View File

@@ -23,7 +23,7 @@ edit = sed \
$(dist_sysconf_DATA): Makefile
@echo ' ' GEN $@;
@rm -f $@ $@.tmp
@$(RM) $@ $@.tmp
@$(edit) `test -f ./$@.in || echo $(srcdir)/`$@.in >$@.tmp
@mv $@.tmp $@

View File

@@ -36,6 +36,9 @@ Architecture = auto
#CheckSpace
#VerbosePkgLists
# PGP signature checking
#SigLevel = Optional
#
# REPOSITORIES
# - can be defined here or included from another file
@@ -60,6 +63,7 @@ Architecture = auto
# servers immediately after the header and they will be used before the
# default mirrors.
#[core]
#SigLevel = Required
#Server = ftp://ftp.example.com/foobar/$repo/os/$arch/
# The file referenced here should contain a list of 'Server = ' lines.
#Include = @sysconfdir@/pacman.d/mirrorlist
@@ -67,5 +71,6 @@ Architecture = auto
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

View File

@@ -51,7 +51,8 @@ libalpm_la_SOURCES = \
if !HAVE_LIBSSL
libalpm_la_SOURCES += \
md5.h md5.c
md5.h md5.c \
sha2.h sha2.c
endif
if HAVE_LIBGPGME

View File

@@ -25,6 +25,7 @@
#include <time.h>
#include <string.h>
#include <limits.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -76,8 +77,8 @@ int SYMEXPORT alpm_add_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg)
local = _alpm_db_get_pkgfromcache(handle->db_local, pkgname);
if(local) {
const char *localpkgname = alpm_pkg_get_name(local);
const char *localpkgver = alpm_pkg_get_version(local);
const char *localpkgname = local->name;
const char *localpkgver = local->version;
int cmp = _alpm_pkg_compare_versions(pkg, local);
if(cmp == 0) {
@@ -460,8 +461,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
ASSERT(trans != NULL, return -1);
snprintf(scriptlet, PATH_MAX, "%s%s-%s/install",
_alpm_db_path(db), alpm_pkg_get_name(newpkg),
alpm_pkg_get_version(newpkg));
_alpm_db_path(db), newpkg->name, newpkg->version);
/* see if this is an upgrade. if so, remove the old package first */
alpm_pkg_t *local = _alpm_db_get_pkgfromcache(db, newpkg->name);
@@ -469,24 +469,27 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
is_upgrade = 1;
/* we'll need to save some record for backup checks later */
oldpkg = _alpm_pkg_dup(local);
if(_alpm_pkg_dup(local, &oldpkg) == -1) {
ret = -1;
goto cleanup;
}
EVENT(trans, ALPM_TRANS_EVT_UPGRADE_START, newpkg, oldpkg);
EVENT(handle, ALPM_EVENT_UPGRADE_START, newpkg, local);
_alpm_log(handle, ALPM_LOG_DEBUG, "upgrading package %s-%s\n",
newpkg->name, newpkg->version);
/* copy over the install reason */
newpkg->reason = alpm_pkg_get_reason(oldpkg);
newpkg->reason = alpm_pkg_get_reason(local);
/* pre_upgrade scriptlet */
if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) {
_alpm_runscriptlet(handle, newpkg->origin_data.file,
"pre_upgrade", newpkg->version, oldpkg->version);
"pre_upgrade", newpkg->version, local->version);
}
} else {
is_upgrade = 0;
EVENT(trans, ALPM_TRANS_EVT_ADD_START, newpkg, NULL);
EVENT(handle, ALPM_EVENT_ADD_START, newpkg, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "adding package %s-%s\n",
newpkg->name, newpkg->version);
@@ -517,7 +520,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
changelog/install script installation (FS#12263) */
if(_alpm_local_db_prepare(db, newpkg)) {
alpm_logaction(handle, "error: could not create database entry %s-%s\n",
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
newpkg->name, newpkg->version);
handle->pm_errno = ALPM_ERR_DB_WRITE;
ret = -1;
goto cleanup;
@@ -526,8 +529,7 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
if(!(trans->flags & ALPM_TRANS_FLAG_DBONLY)) {
struct archive *archive;
struct archive_entry *entry;
char cwd[PATH_MAX] = "";
int restore_cwd = 0;
int cwdfd;
_alpm_log(handle, ALPM_LOG_DEBUG, "extracting files\n");
@@ -549,10 +551,11 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
}
/* save the cwd so we can restore it later */
if(getcwd(cwd, PATH_MAX) == NULL) {
do {
cwdfd = open(".", O_RDONLY);
} while(cwdfd == -1 && errno == EINTR);
if(cwdfd < 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not get current working directory\n"));
} else {
restore_cwd = 1;
}
/* libarchive requires this for extracting hard links */
@@ -565,11 +568,11 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
/* call PROGRESS once with 0 percent, as we sort-of skip that here */
if(is_upgrade) {
PROGRESS(trans, ALPM_TRANS_PROGRESS_UPGRADE_START,
alpm_pkg_get_name(newpkg), 0, pkg_count, pkg_current);
PROGRESS(handle, ALPM_PROGRESS_UPGRADE_START,
newpkg->name, 0, pkg_count, pkg_current);
} else {
PROGRESS(trans, ALPM_TRANS_PROGRESS_ADD_START,
alpm_pkg_get_name(newpkg), 0, pkg_count, pkg_current);
PROGRESS(handle, ALPM_PROGRESS_ADD_START,
newpkg->name, 0, pkg_count, pkg_current);
}
for(i = 0; archive_read_next_header(archive, &entry) == ARCHIVE_OK; i++) {
@@ -581,9 +584,6 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
* (missing metadata sizes) */
int64_t pos = archive_position_compressed(archive);
percent = (pos * 100) / newpkg->size;
_alpm_log(handle, ALPM_LOG_DEBUG, "decompression progress: "
"%d%% (%"PRId64" / %jd)\n",
percent, pos, (intmax_t)newpkg->size);
if(percent >= 100) {
percent = 100;
}
@@ -592,13 +592,11 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
}
if(is_upgrade) {
PROGRESS(trans, ALPM_TRANS_PROGRESS_UPGRADE_START,
alpm_pkg_get_name(newpkg), percent, pkg_count,
pkg_current);
PROGRESS(handle, ALPM_PROGRESS_UPGRADE_START,
newpkg->name, percent, pkg_count, pkg_current);
} else {
PROGRESS(trans, ALPM_TRANS_PROGRESS_ADD_START,
alpm_pkg_get_name(newpkg), percent, pkg_count,
pkg_current);
PROGRESS(handle, ALPM_PROGRESS_ADD_START,
newpkg->name, percent, pkg_count, pkg_current);
}
/* extract the next file from the archive */
@@ -607,8 +605,12 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
archive_read_finish(archive);
/* restore the old cwd if we have it */
if(restore_cwd && chdir(cwd) != 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not change directory to %s (%s)\n"), cwd, strerror(errno));
if(cwdfd >= 0) {
if(fchdir(cwdfd) != 0) {
_alpm_log(handle, ALPM_LOG_ERROR,
_("could not restore working directory (%s)\n"), strerror(errno));
}
close(cwdfd);
}
if(errors) {
@@ -635,9 +637,9 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
if(_alpm_local_db_write(db, newpkg, INFRQ_ALL)) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not update database entry %s-%s\n"),
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
newpkg->name, newpkg->version);
alpm_logaction(handle, "error: could not update database entry %s-%s\n",
alpm_pkg_get_name(newpkg), alpm_pkg_get_version(newpkg));
newpkg->name, newpkg->version);
handle->pm_errno = ALPM_ERR_DB_WRITE;
ret = -1;
goto cleanup;
@@ -645,15 +647,15 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
if(_alpm_db_add_pkgincache(db, newpkg) == -1) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not add entry '%s' in cache\n"),
alpm_pkg_get_name(newpkg));
newpkg->name);
}
if(is_upgrade) {
PROGRESS(trans, ALPM_TRANS_PROGRESS_UPGRADE_START,
alpm_pkg_get_name(newpkg), 100, pkg_count, pkg_current);
PROGRESS(handle, ALPM_PROGRESS_UPGRADE_START,
newpkg->name, 100, pkg_count, pkg_current);
} else {
PROGRESS(trans, ALPM_TRANS_PROGRESS_ADD_START,
alpm_pkg_get_name(newpkg), 100, pkg_count, pkg_current);
PROGRESS(handle, ALPM_PROGRESS_ADD_START,
newpkg->name, 100, pkg_count, pkg_current);
}
/* run the post-install script if it exists */
@@ -661,18 +663,17 @@ static int commit_single_pkg(alpm_handle_t *handle, alpm_pkg_t *newpkg,
&& !(trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) {
if(is_upgrade) {
_alpm_runscriptlet(handle, scriptlet, "post_upgrade",
alpm_pkg_get_version(newpkg),
oldpkg ? alpm_pkg_get_version(oldpkg) : NULL);
newpkg->version, oldpkg ? oldpkg->version : NULL);
} else {
_alpm_runscriptlet(handle, scriptlet, "post_install",
alpm_pkg_get_version(newpkg), NULL);
newpkg->version, NULL);
}
}
if(is_upgrade) {
EVENT(trans, ALPM_TRANS_EVT_UPGRADE_DONE, newpkg, oldpkg);
EVENT(handle, ALPM_EVENT_UPGRADE_DONE, newpkg, oldpkg);
} else {
EVENT(trans, ALPM_TRANS_EVT_ADD_DONE, newpkg, oldpkg);
EVENT(handle, ALPM_EVENT_ADD_DONE, newpkg, oldpkg);
}
cleanup:

View File

@@ -133,9 +133,30 @@ int SYMEXPORT alpm_release(alpm_handle_t *myhandle)
* @brief Various libalpm functions
*/
/* Get the version of library */
const char SYMEXPORT *alpm_version(void) {
/** Get the version of library.
* @return the library version, e.g. "6.0.4"
* */
const char SYMEXPORT *alpm_version(void)
{
return LIB_VERSION;
}
/** Get the capabilities of the library.
* @return a bitmask of the capabilities
* */
enum alpm_caps SYMEXPORT alpm_capabilities(void)
{
return 0
#ifdef ENABLE_NLS
| ALPM_CAPABILITY_NLS
#endif
#ifdef HAVE_LIBCURL
| ALPM_CAPABILITY_DOWNLOADER
#endif
#ifdef HAVE_LIBGPGME
| ALPM_CAPABILITY_SIGNATURES
#endif
| 0;
}
/* vim: set ts=2 sw=2 noet: */

View File

@@ -60,6 +60,12 @@ typedef enum _alpm_pkgreason_t {
ALPM_PKG_REASON_DEPEND = 1
} alpm_pkgreason_t;
typedef enum _alpm_pkgfrom_t {
PKG_FROM_FILE = 1,
PKG_FROM_LOCALDB,
PKG_FROM_SYNCDB
} alpm_pkgfrom_t;
/** Types of version constraints in dependency specs. */
typedef enum _alpm_depmod_t {
/** No version constraint */
@@ -111,6 +117,7 @@ typedef enum _alpm_sigstatus_t {
ALPM_SIGSTATUS_KEY_EXPIRED,
ALPM_SIGSTATUS_SIG_EXPIRED,
ALPM_SIGSTATUS_KEY_UNKNOWN,
ALPM_SIGSTATUS_KEY_DISABLED,
ALPM_SIGSTATUS_INVALID
} alpm_sigstatus_t;
@@ -155,7 +162,7 @@ typedef struct _alpm_conflict_t {
unsigned long package2_hash;
char *package1;
char *package2;
char *reason;
alpm_depend_t *reason;
} alpm_conflict_t;
/** File conflict */
@@ -209,16 +216,30 @@ typedef struct _alpm_backup_t {
char *hash;
} alpm_backup_t;
typedef struct _alpm_pgpkey_t {
void *data;
char *fingerprint;
char *uid;
char *name;
char *email;
time_t created;
time_t expires;
} alpm_pgpkey_t;
/** Signature result. Contains the number of signatures found and pointers to
* arrays containing key and status info. All contained arrays have size
* #count.*/
typedef struct _alpm_sigresult_t {
int count;
alpm_sigstatus_t *status;
alpm_sigvalidity_t *validity;
char **uid;
alpm_pgpkey_t key;
alpm_sigstatus_t status;
alpm_sigvalidity_t validity;
} alpm_sigresult_t;
typedef struct _alpm_siglist_t {
size_t count;
alpm_sigresult_t *results;
} alpm_siglist_t;
/*
* Logging facilities
*/
@@ -236,6 +257,122 @@ typedef enum _alpm_loglevel_t {
typedef void (*alpm_cb_log)(alpm_loglevel_t, const char *, va_list);
int alpm_logaction(alpm_handle_t *handle, const char *fmt, ...);
/** Events.
* NULL parameters are passed to in all events unless specified otherwise.
*/
typedef enum _alpm_event_t {
/** Dependencies will be computed for a package. */
ALPM_EVENT_CHECKDEPS_START = 1,
/** Dependencies were computed for a package. */
ALPM_EVENT_CHECKDEPS_DONE,
/** File conflicts will be computed for a package. */
ALPM_EVENT_FILECONFLICTS_START,
/** File conflicts were computed for a package. */
ALPM_EVENT_FILECONFLICTS_DONE,
/** Dependencies will be resolved for target package. */
ALPM_EVENT_RESOLVEDEPS_START,
/** Dependencies were resolved for target package. */
ALPM_EVENT_RESOLVEDEPS_DONE,
/** Inter-conflicts will be checked for target package. */
ALPM_EVENT_INTERCONFLICTS_START,
/** Inter-conflicts were checked for target package. */
ALPM_EVENT_INTERCONFLICTS_DONE,
/** Package will be installed.
* A pointer to the target package is passed to the callback.
*/
ALPM_EVENT_ADD_START,
/** Package was installed.
* A pointer to the new package is passed to the callback.
*/
ALPM_EVENT_ADD_DONE,
/** Package will be removed.
* A pointer to the target package is passed to the callback.
*/
ALPM_EVENT_REMOVE_START,
/** Package was removed.
* A pointer to the removed package is passed to the callback.
*/
ALPM_EVENT_REMOVE_DONE,
/** Package will be upgraded.
* A pointer to the upgraded package is passed to the callback.
*/
ALPM_EVENT_UPGRADE_START,
/** Package was upgraded.
* A pointer to the new package, and a pointer to the old package is passed
* to the callback, respectively.
*/
ALPM_EVENT_UPGRADE_DONE,
/** Target package's integrity will be checked. */
ALPM_EVENT_INTEGRITY_START,
/** Target package's integrity was checked. */
ALPM_EVENT_INTEGRITY_DONE,
/** Target package will be loaded. */
ALPM_EVENT_LOAD_START,
/** Target package is finished loading. */
ALPM_EVENT_LOAD_DONE,
/** Target deltas's integrity will be checked. */
ALPM_EVENT_DELTA_INTEGRITY_START,
/** Target delta's integrity was checked. */
ALPM_EVENT_DELTA_INTEGRITY_DONE,
/** Deltas will be applied to packages. */
ALPM_EVENT_DELTA_PATCHES_START,
/** Deltas were applied to packages. */
ALPM_EVENT_DELTA_PATCHES_DONE,
/** Delta patch will be applied to target package.
* The filename of the package and the filename of the patch is passed to the
* callback.
*/
ALPM_EVENT_DELTA_PATCH_START,
/** Delta patch was applied to target package. */
ALPM_EVENT_DELTA_PATCH_DONE,
/** Delta patch failed to apply to target package. */
ALPM_EVENT_DELTA_PATCH_FAILED,
/** Scriptlet has printed information.
* A line of text is passed to the callback.
*/
ALPM_EVENT_SCRIPTLET_INFO,
/** Files will be downloaded from a repository.
* The repository's tree name is passed to the callback.
*/
ALPM_EVENT_RETRIEVE_START,
/** Disk space usage will be computed for a package */
ALPM_EVENT_DISKSPACE_START,
/** Disk space usage was computed for a package */
ALPM_EVENT_DISKSPACE_DONE,
} alpm_event_t;
/** Event callback */
typedef void (*alpm_cb_event)(alpm_event_t, void *, void *);
/** Questions */
typedef enum _alpm_question_t {
ALPM_QUESTION_INSTALL_IGNOREPKG = 1,
ALPM_QUESTION_REPLACE_PKG = (1 << 1),
ALPM_QUESTION_CONFLICT_PKG = (1 << 2),
ALPM_QUESTION_CORRUPTED_PKG = (1 << 3),
ALPM_QUESTION_LOCAL_NEWER = (1 << 4),
ALPM_QUESTION_REMOVE_PKGS = (1 << 5),
ALPM_QUESTION_SELECT_PROVIDER = (1 << 6),
ALPM_QUESTION_IMPORT_KEY = (1 << 7)
} alpm_question_t;
/** Question callback */
typedef void (*alpm_cb_question)(alpm_question_t, void *, void *, void *, int *);
/** Progress */
typedef enum _alpm_progress_t {
ALPM_PROGRESS_ADD_START,
ALPM_PROGRESS_UPGRADE_START,
ALPM_PROGRESS_REMOVE_START,
ALPM_PROGRESS_CONFLICTS_START,
ALPM_PROGRESS_DISKSPACE_START,
ALPM_PROGRESS_INTEGRITY_START,
ALPM_PROGRESS_LOAD_START,
} alpm_progress_t;
/** Progress callback */
typedef void (*alpm_cb_progress)(alpm_progress_t, const char *, int, size_t, size_t);
/*
* Downloading
*/
@@ -292,6 +429,21 @@ alpm_cb_totaldl alpm_option_get_totaldlcb(alpm_handle_t *handle);
/** Sets the callback used to report total download size. */
int alpm_option_set_totaldlcb(alpm_handle_t *handle, alpm_cb_totaldl cb);
/** Returns the callback used for events. */
alpm_cb_event alpm_option_get_eventcb(alpm_handle_t *handle);
/** Sets the callback used for events. */
int alpm_option_set_eventcb(alpm_handle_t *handle, alpm_cb_event cb);
/** Returns the callback used for questions. */
alpm_cb_question alpm_option_get_questioncb(alpm_handle_t *handle);
/** Sets the callback used for questions. */
int alpm_option_set_questioncb(alpm_handle_t *handle, alpm_cb_question cb);
/** Returns the callback used for operation progress. */
alpm_cb_progress alpm_option_get_progresscb(alpm_handle_t *handle);
/** Sets the callback used for operation progress. */
int alpm_option_set_progresscb(alpm_handle_t *handle, alpm_cb_progress cb);
/** Returns the root of the destination filesystem. Read-only. */
const char *alpm_option_get_root(alpm_handle_t *handle);
@@ -578,6 +730,11 @@ const char *alpm_pkg_get_name(alpm_pkg_t *pkg);
*/
const char *alpm_pkg_get_version(alpm_pkg_t *pkg);
/** Returns the origin of the package.
* @return a #alpm_pkgfrom_t constant, -1 on error
*/
alpm_pkgfrom_t alpm_pkg_get_origin(alpm_pkg_t *pkg);
/** Returns the package description.
* @param pkg a pointer to package
* @return a reference to an internal string
@@ -609,19 +766,27 @@ time_t alpm_pkg_get_installdate(alpm_pkg_t *pkg);
const char *alpm_pkg_get_packager(alpm_pkg_t *pkg);
/** Returns the package's MD5 checksum as a string.
* The returned string is a sequence of lowercase hexadecimal digits.
* The returned string is a sequence of 32 lowercase hexadecimal digits.
* @param pkg a pointer to package
* @return a reference to an internal string
*/
const char *alpm_pkg_get_md5sum(alpm_pkg_t *pkg);
/** Returns the package's SHA256 checksum as a string.
* The returned string is a sequence of 64 lowercase hexadecimal digits.
* @param pkg a pointer to package
* @return a reference to an internal string
*/
const char *alpm_pkg_get_sha256sum(alpm_pkg_t *pkg);
/** Returns the architecture for which the package was built.
* @param pkg a pointer to package
* @return a reference to an internal string
*/
const char *alpm_pkg_get_arch(alpm_pkg_t *pkg);
/** Returns the size of the package.
/** Returns the size of the package. This is only available for sync database
* packages and package files, not those loaded from the local database.
* @param pkg a pointer to package
* @return the size of the package in bytes.
*/
@@ -663,15 +828,15 @@ alpm_list_t *alpm_pkg_get_depends(alpm_pkg_t *pkg);
*/
alpm_list_t *alpm_pkg_get_optdepends(alpm_pkg_t *pkg);
/** Returns the list of package names conflicting with pkg.
/** Returns the list of packages conflicting with pkg.
* @param pkg a pointer to package
* @return a reference to an internal list of strings.
* @return a reference to an internal list of alpm_depend_t structures.
*/
alpm_list_t *alpm_pkg_get_conflicts(alpm_pkg_t *pkg);
/** Returns the list of package names provided by pkg.
/** Returns the list of packages provided by pkg.
* @param pkg a pointer to package
* @return a reference to an internal list of strings.
* @return a reference to an internal list of alpm_depend_t structures.
*/
alpm_list_t *alpm_pkg_get_provides(alpm_pkg_t *pkg);
@@ -683,7 +848,7 @@ alpm_list_t *alpm_pkg_get_deltas(alpm_pkg_t *pkg);
/** Returns the list of packages to be replaced by pkg.
* @param pkg a pointer to package
* @return a reference to an internal list of strings.
* @return a reference to an internal list of alpm_depend_t structures.
*/
alpm_list_t *alpm_pkg_get_replaces(alpm_pkg_t *pkg);
@@ -713,6 +878,12 @@ alpm_list_t *alpm_pkg_get_backup(alpm_pkg_t *pkg);
*/
alpm_db_t *alpm_pkg_get_db(alpm_pkg_t *pkg);
/** Retuns the base64 encoded package signature.
* @param pkg a pointer to package
* @return a reference to an internal string
*/
const char *alpm_pkg_get_base64_sig(alpm_pkg_t *pkg);
/* End of alpm_pkg_t accessors */
/* @} */
@@ -735,9 +906,7 @@ void *alpm_pkg_changelog_open(alpm_pkg_t *pkg);
* error occurred.
*/
size_t alpm_pkg_changelog_read(void *ptr, size_t size,
const alpm_pkg_t *pkg, const void *fp);
/*int alpm_pkg_changelog_feof(const alpm_pkg_t *pkg, void *fp);*/
const alpm_pkg_t *pkg, void *fp);
int alpm_pkg_changelog_close(const alpm_pkg_t *pkg, void *fp);
@@ -763,11 +932,11 @@ alpm_list_t *alpm_pkg_unused_deltas(alpm_pkg_t *pkg);
* Signatures
*/
int alpm_pkg_check_pgp_signature(alpm_pkg_t *pkg, alpm_sigresult_t *result);
int alpm_pkg_check_pgp_signature(alpm_pkg_t *pkg, alpm_siglist_t *siglist);
int alpm_db_check_pgp_signature(alpm_db_t *db, alpm_sigresult_t *result);
int alpm_db_check_pgp_signature(alpm_db_t *db, alpm_siglist_t *siglist);
int alpm_sigresult_cleanup(alpm_sigresult_t *result);
int alpm_siglist_cleanup(alpm_siglist_t *siglist);
/*
* Groups
@@ -824,117 +993,6 @@ typedef enum _alpm_transflag_t {
ALPM_TRANS_FLAG_NOLOCK = (1 << 17)
} alpm_transflag_t;
/** Transaction events.
* NULL parameters are passed to in all events unless specified otherwise.
*/
typedef enum _alpm_transevt_t {
/** Dependencies will be computed for a package. */
ALPM_TRANS_EVT_CHECKDEPS_START = 1,
/** Dependencies were computed for a package. */
ALPM_TRANS_EVT_CHECKDEPS_DONE,
/** File conflicts will be computed for a package. */
ALPM_TRANS_EVT_FILECONFLICTS_START,
/** File conflicts were computed for a package. */
ALPM_TRANS_EVT_FILECONFLICTS_DONE,
/** Dependencies will be resolved for target package. */
ALPM_TRANS_EVT_RESOLVEDEPS_START,
/** Dependencies were resolved for target package. */
ALPM_TRANS_EVT_RESOLVEDEPS_DONE,
/** Inter-conflicts will be checked for target package. */
ALPM_TRANS_EVT_INTERCONFLICTS_START,
/** Inter-conflicts were checked for target package. */
ALPM_TRANS_EVT_INTERCONFLICTS_DONE,
/** Package will be installed.
* A pointer to the target package is passed to the callback.
*/
ALPM_TRANS_EVT_ADD_START,
/** Package was installed.
* A pointer to the new package is passed to the callback.
*/
ALPM_TRANS_EVT_ADD_DONE,
/** Package will be removed.
* A pointer to the target package is passed to the callback.
*/
ALPM_TRANS_EVT_REMOVE_START,
/** Package was removed.
* A pointer to the removed package is passed to the callback.
*/
ALPM_TRANS_EVT_REMOVE_DONE,
/** Package will be upgraded.
* A pointer to the upgraded package is passed to the callback.
*/
ALPM_TRANS_EVT_UPGRADE_START,
/** Package was upgraded.
* A pointer to the new package, and a pointer to the old package is passed
* to the callback, respectively.
*/
ALPM_TRANS_EVT_UPGRADE_DONE,
/** Target package's integrity will be checked. */
ALPM_TRANS_EVT_INTEGRITY_START,
/** Target package's integrity was checked. */
ALPM_TRANS_EVT_INTEGRITY_DONE,
/** Target deltas's integrity will be checked. */
ALPM_TRANS_EVT_DELTA_INTEGRITY_START,
/** Target delta's integrity was checked. */
ALPM_TRANS_EVT_DELTA_INTEGRITY_DONE,
/** Deltas will be applied to packages. */
ALPM_TRANS_EVT_DELTA_PATCHES_START,
/** Deltas were applied to packages. */
ALPM_TRANS_EVT_DELTA_PATCHES_DONE,
/** Delta patch will be applied to target package.
* The filename of the package and the filename of the patch is passed to the
* callback.
*/
ALPM_TRANS_EVT_DELTA_PATCH_START,
/** Delta patch was applied to target package. */
ALPM_TRANS_EVT_DELTA_PATCH_DONE,
/** Delta patch failed to apply to target package. */
ALPM_TRANS_EVT_DELTA_PATCH_FAILED,
/** Scriptlet has printed information.
* A line of text is passed to the callback.
*/
ALPM_TRANS_EVT_SCRIPTLET_INFO,
/** Files will be downloaded from a repository.
* The repository's tree name is passed to the callback.
*/
ALPM_TRANS_EVT_RETRIEVE_START,
/** Disk space usage will be computed for a package */
ALPM_TRANS_EVT_DISKSPACE_START,
/** Disk space usage was computed for a package */
ALPM_TRANS_EVT_DISKSPACE_DONE,
} alpm_transevt_t;
/** Transaction Conversations (ie, questions) */
typedef enum _alpm_transconv_t {
ALPM_TRANS_CONV_INSTALL_IGNOREPKG = 1,
ALPM_TRANS_CONV_REPLACE_PKG = (1 << 1),
ALPM_TRANS_CONV_CONFLICT_PKG = (1 << 2),
ALPM_TRANS_CONV_CORRUPTED_PKG = (1 << 3),
ALPM_TRANS_CONV_LOCAL_NEWER = (1 << 4),
ALPM_TRANS_CONV_REMOVE_PKGS = (1 << 5),
ALPM_TRANS_CONV_SELECT_PROVIDER = (1 << 6),
} alpm_transconv_t;
/** Transaction Progress */
typedef enum _alpm_transprog_t {
ALPM_TRANS_PROGRESS_ADD_START,
ALPM_TRANS_PROGRESS_UPGRADE_START,
ALPM_TRANS_PROGRESS_REMOVE_START,
ALPM_TRANS_PROGRESS_CONFLICTS_START,
ALPM_TRANS_PROGRESS_DISKSPACE_START,
ALPM_TRANS_PROGRESS_INTEGRITY_START,
} alpm_transprog_t;
/** Transaction Event callback */
typedef void (*alpm_trans_cb_event)(alpm_transevt_t, void *, void *);
/** Transaction Conversation callback */
typedef void (*alpm_trans_cb_conv)(alpm_transconv_t, void *, void *,
void *, int *);
/** Transaction Progress callback */
typedef void (*alpm_trans_cb_progress)(alpm_transprog_t, const char *, int, size_t, size_t);
/** Returns the bitfield of flags for the current transaction.
* @param handle the context handle
* @return the bitfield of transaction flags
@@ -945,25 +1003,20 @@ alpm_transflag_t alpm_trans_get_flags(alpm_handle_t *handle);
* @param handle the context handle
* @return a list of alpm_pkg_t structures
*/
alpm_list_t * alpm_trans_get_add(alpm_handle_t *handle);
alpm_list_t *alpm_trans_get_add(alpm_handle_t *handle);
/** Returns the list of packages removed by the transaction.
* @param handle the context handle
* @return a list of alpm_pkg_t structures
*/
alpm_list_t * alpm_trans_get_remove(alpm_handle_t *handle);
alpm_list_t *alpm_trans_get_remove(alpm_handle_t *handle);
/** Initialize the transaction.
* @param handle the context handle
* @param flags flags of the transaction (like nodeps, etc)
* @param event event callback function pointer
* @param conv question callback function pointer
* @param progress progress callback function pointer
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
int alpm_trans_init(alpm_handle_t *handle, alpm_transflag_t flags,
alpm_trans_cb_event cb_event, alpm_trans_cb_conv conv,
alpm_trans_cb_progress cb_progress);
int alpm_trans_init(alpm_handle_t *handle, alpm_transflag_t flags);
/** Prepare a transaction.
* @param handle the context handle
@@ -1052,6 +1105,7 @@ char *alpm_dep_compute_string(const alpm_depend_t *dep);
/* checksums */
char *alpm_compute_md5sum(const char *name);
char *alpm_compute_sha256sum(const char *filename);
/** @addtogroup alpm_api_errors Error Codes
* @{
@@ -1134,7 +1188,15 @@ const char *alpm_strerror(enum _alpm_errno_t err);
alpm_handle_t *alpm_initialize(const char *root, const char *dbpath,
enum _alpm_errno_t *err);
int alpm_release(alpm_handle_t *handle);
enum alpm_caps {
ALPM_CAPABILITY_NLS = (1 << 0),
ALPM_CAPABILITY_DOWNLOADER = (1 << 1),
ALPM_CAPABILITY_SIGNATURES = (1 << 2)
};
const char *alpm_version(void);
enum alpm_caps alpm_capabilities(void);
/* End of alpm_api */
/** @} */

View File

@@ -206,12 +206,18 @@ alpm_list_t SYMEXPORT *alpm_list_join(alpm_list_t *first, alpm_list_t *second)
*/
alpm_list_t SYMEXPORT *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn)
{
alpm_list_t *newlist, *lp;
alpm_list_t *newlist, *lp, *tail_ptr, *left_tail_ptr, *right_tail_ptr;
if(left == NULL)
if(left == NULL) {
return right;
if(right == NULL)
}
if(right == NULL) {
return left;
}
/* Save tail node pointers for future use */
left_tail_ptr = left->prev;
right_tail_ptr = right->prev;
if(fn(left->data, right->data) <= 0) {
newlist = left;
@@ -242,19 +248,18 @@ alpm_list_t SYMEXPORT *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, a
if(left != NULL) {
lp->next = left;
left->prev = lp;
tail_ptr = left_tail_ptr;
}
else if(right != NULL) {
lp->next = right;
right->prev = lp;
tail_ptr = right_tail_ptr;
}
else {
tail_ptr = lp;
}
/* Find our tail pointer
* TODO maintain this in the algorithm itself */
lp = newlist;
while(lp && lp->next) {
lp = lp->next;
}
newlist->prev = lp;
newlist->prev = tail_ptr;
return newlist;
}

View File

@@ -65,10 +65,10 @@ static const unsigned char base64_dec_map[128] =
/*
* Encode a buffer into base64 format
*/
int base64_encode( unsigned char *dst, int *dlen,
const unsigned char *src, int slen )
int base64_encode( unsigned char *dst, size_t *dlen,
const unsigned char *src, size_t slen )
{
int i, n;
size_t i, n;
int C1, C2, C3;
unsigned char *p;
@@ -128,10 +128,10 @@ int base64_encode( unsigned char *dst, int *dlen,
/*
* Decode a base64-formatted buffer
*/
int base64_decode( unsigned char *dst, int *dlen,
const unsigned char *src, int slen )
int base64_decode( unsigned char *dst, size_t *dlen,
const unsigned char *src, size_t slen )
{
int i, j, n;
size_t i, j, n;
unsigned long x;
unsigned char *p;

View File

@@ -25,8 +25,10 @@
#ifndef _BASE64_H
#define _BASE64_H
#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL 0x0010
#define POLARSSL_ERR_BASE64_INVALID_CHARACTER 0x0012
#include <string.h>
#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL -0x0010 /**< Output buffer too small. */
#define POLARSSL_ERR_BASE64_INVALID_CHARACTER -0x0012 /**< Invalid character in input. */
/**
* \brief Encode a buffer into base64 format
@@ -43,8 +45,8 @@
* \note Call this function with *dlen = 0 to obtain the
* required buffer size in *dlen
*/
int base64_encode( unsigned char *dst, int *dlen,
const unsigned char *src, int slen );
int base64_encode( unsigned char *dst, size_t *dlen,
const unsigned char *src, size_t slen );
/**
* \brief Decode a base64-formatted buffer
@@ -62,7 +64,7 @@ int base64_encode( unsigned char *dst, int *dlen,
* \note Call this function with *dlen = 0 to obtain the
* required buffer size in *dlen
*/
int base64_decode( unsigned char *dst, int *dlen,
const unsigned char *src, int slen );
int base64_decode( unsigned char *dst, size_t *dlen,
const unsigned char *src, size_t slen );
#endif /* base64.h */

View File

@@ -57,12 +57,6 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq);
* initialized.
*/
static const char *_cache_get_filename(alpm_pkg_t *pkg)
{
LAZY_LOAD(INFRQ_DESC, NULL);
return pkg->filename;
}
static const char *_cache_get_desc(alpm_pkg_t *pkg)
{
LAZY_LOAD(INFRQ_DESC, NULL);
@@ -93,24 +87,12 @@ static const char *_cache_get_packager(alpm_pkg_t *pkg)
return pkg->packager;
}
static const char *_cache_get_md5sum(alpm_pkg_t *pkg)
{
LAZY_LOAD(INFRQ_DESC, NULL);
return pkg->md5sum;
}
static const char *_cache_get_arch(alpm_pkg_t *pkg)
{
LAZY_LOAD(INFRQ_DESC, NULL);
return pkg->arch;
}
static off_t _cache_get_size(alpm_pkg_t *pkg)
{
LAZY_LOAD(INFRQ_DESC, -1);
return pkg->size;
}
static off_t _cache_get_isize(alpm_pkg_t *pkg)
{
LAZY_LOAD(INFRQ_DESC, -1);
@@ -171,12 +153,6 @@ static alpm_list_t *_cache_get_replaces(alpm_pkg_t *pkg)
return pkg->replaces;
}
/* local packages can not have deltas */
static alpm_list_t *_cache_get_deltas(alpm_pkg_t UNUSED *pkg)
{
return NULL;
}
static alpm_filelist_t *_cache_get_files(alpm_pkg_t *pkg)
{
LAZY_LOAD(INFRQ_FILES, NULL);
@@ -198,11 +174,9 @@ static alpm_list_t *_cache_get_backup(alpm_pkg_t *pkg)
static void *_cache_changelog_open(alpm_pkg_t *pkg)
{
char clfile[PATH_MAX];
alpm_db_t *db = alpm_pkg_get_db(pkg);
snprintf(clfile, PATH_MAX, "%s/%s/%s-%s/changelog",
alpm_option_get_dbpath(pkg->handle),
alpm_db_get_name(alpm_pkg_get_db(pkg)),
alpm_pkg_get_name(pkg),
alpm_pkg_get_version(pkg));
pkg->handle->dbpath, db->treename, pkg->name, pkg->version);
return fopen(clfile, "r");
}
@@ -216,7 +190,7 @@ static void *_cache_changelog_open(alpm_pkg_t *pkg)
* @return the number of characters read, or 0 if there is no more data
*/
static size_t _cache_changelog_read(void *ptr, size_t size,
const alpm_pkg_t UNUSED *pkg, const void *fp)
const alpm_pkg_t UNUSED *pkg, void *fp)
{
return fread(ptr, 1, size, (FILE *)fp);
}
@@ -244,15 +218,12 @@ static int _cache_force_load(alpm_pkg_t *pkg)
* logic.
*/
static struct pkg_operations local_pkg_ops = {
.get_filename = _cache_get_filename,
.get_desc = _cache_get_desc,
.get_url = _cache_get_url,
.get_builddate = _cache_get_builddate,
.get_installdate = _cache_get_installdate,
.get_packager = _cache_get_packager,
.get_md5sum = _cache_get_md5sum,
.get_arch = _cache_get_arch,
.get_size = _cache_get_size,
.get_isize = _cache_get_isize,
.get_reason = _cache_get_reason,
.has_scriptlet = _cache_has_scriptlet,
@@ -263,7 +234,6 @@ static struct pkg_operations local_pkg_ops = {
.get_conflicts = _cache_get_conflicts,
.get_provides = _cache_get_provides,
.get_replaces = _cache_get_replaces,
.get_deltas = _cache_get_deltas,
.get_files = _cache_get_files,
.get_backup = _cache_get_backup,
@@ -325,6 +295,9 @@ static int local_db_validate(alpm_db_t *db)
if(db->status & DB_STATUS_VALID) {
return 0;
}
if(db->status & DB_STATUS_INVALID) {
return -1;
}
dbpath = _alpm_db_path(db);
if(dbpath == NULL) {
@@ -335,11 +308,16 @@ static int local_db_validate(alpm_db_t *db)
if(errno == ENOENT) {
/* database dir doesn't exist yet */
db->status |= DB_STATUS_VALID;
db->status &= ~DB_STATUS_INVALID;
db->status &= ~DB_STATUS_EXISTS;
db->status |= DB_STATUS_MISSING;
return 0;
} else {
RET_ERR(db->handle, ALPM_ERR_DB_OPEN, -1);
}
}
db->status |= DB_STATUS_EXISTS;
db->status &= ~DB_STATUS_MISSING;
while((ent = readdir(dbdir)) != NULL) {
const char *name = ent->d_name;
@@ -355,12 +333,15 @@ static int local_db_validate(alpm_db_t *db)
snprintf(path, PATH_MAX, "%s%s/depends", dbpath, name);
if(access(path, F_OK) == 0) {
/* we found a depends file- bail */
db->status &= ~DB_STATUS_VALID;
db->status |= DB_STATUS_INVALID;
db->handle->pm_errno = ALPM_ERR_DB_VERSION;
goto done;
}
}
/* we found no depends file after full scan */
db->status |= DB_STATUS_VALID;
db->status &= ~DB_STATUS_INVALID;
ret = 0;
done:
@@ -380,6 +361,11 @@ static int local_db_populate(alpm_db_t *db)
const char *dbpath;
DIR *dbdir;
if(db->status & DB_STATUS_INVALID) {
RET_ERR(db->handle, ALPM_ERR_DB_INVALID, -1);
}
/* note: DB_STATUS_MISSING is not fatal for local database */
dbpath = _alpm_db_path(db);
if(dbpath == NULL) {
/* pm_errno set in _alpm_db_path() */
@@ -390,6 +376,8 @@ static int local_db_populate(alpm_db_t *db)
if(dbdir == NULL) {
if(errno == ENOENT) {
/* no database existing yet is not an error */
db->status &= ~DB_STATUS_EXISTS;
db->status |= DB_STATUS_MISSING;
return 0;
}
RET_ERR(db->handle, ALPM_ERR_DB_OPEN, -1);
@@ -397,6 +385,8 @@ static int local_db_populate(alpm_db_t *db)
if(fstat(dirfd(dbdir), &buf) != 0) {
RET_ERR(db->handle, ALPM_ERR_DB_OPEN, -1);
}
db->status |= DB_STATUS_EXISTS;
db->status &= ~DB_STATUS_MISSING;
if(buf.st_nlink >= 2) {
est_count = buf.st_nlink;
} else {
@@ -485,7 +475,7 @@ static int local_db_populate(alpm_db_t *db)
}
/* Note: the return value must be freed by the caller */
static char *get_pkgpath(alpm_db_t *db, alpm_pkg_t *info)
static char *get_pkgpath(alpm_db_t *db, alpm_pkg_t *info, const char *filename)
{
size_t len;
char *pkgpath;
@@ -493,8 +483,10 @@ static char *get_pkgpath(alpm_db_t *db, alpm_pkg_t *info)
dbpath = _alpm_db_path(db);
len = strlen(dbpath) + strlen(info->name) + strlen(info->version) + 3;
len += filename ? strlen(filename) : 0;
MALLOC(pkgpath, len, RET_ERR(db->handle, ALPM_ERR_MEMORY, NULL));
sprintf(pkgpath, "%s%s-%s/", dbpath, info->name, info->version);
sprintf(pkgpath, "%s%s-%s/%s", dbpath, info->name, info->version,
filename ? filename : "");
return pkgpath;
}
@@ -510,18 +502,27 @@ static char *get_pkgpath(alpm_db_t *db, alpm_pkg_t *info)
#define READ_AND_STORE_ALL(f) do { \
char *linedup; \
if(fgets(line, sizeof(line), fp) == NULL && !feof(fp)) goto error; \
if(fgets(line, sizeof(line), fp) == NULL) {\
if(!feof(fp)) goto error; else break; \
} \
if(_alpm_strip_newline(line) == 0) break; \
STRDUP(linedup, line, goto error); \
f = alpm_list_add(f, linedup); \
} while(1) /* note the while(1) and not (0) */
#define READ_AND_SPLITDEP(f) do { \
if(fgets(line, sizeof(line), fp) == NULL) {\
if(!feof(fp)) goto error; else break; \
} \
if(_alpm_strip_newline(line) == 0) break; \
f = alpm_list_add(f, _alpm_splitdep(line)); \
} while(1) /* note the while(1) and not (0) */
static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
{
FILE *fp = NULL;
char path[PATH_MAX];
char line[1024];
char *pkgpath = NULL;
char *pkgpath;
alpm_db_t *db = info->origin_data.db;
/* bitmask logic here:
@@ -543,27 +544,35 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
_alpm_log(db->handle, ALPM_LOG_FUNCTION, "loading package data for %s : level=0x%x\n",
info->name, inforeq);
/* clear out 'line', to be certain - and to make valgrind happy */
memset(line, 0, sizeof(line));
pkgpath = get_pkgpath(db, info);
if(access(pkgpath, F_OK)) {
pkgpath = get_pkgpath(db, info, NULL);
if(!pkgpath || access(pkgpath, F_OK)) {
/* directory doesn't exist or can't be opened */
_alpm_log(db->handle, ALPM_LOG_DEBUG, "cannot find '%s-%s' in db '%s'\n",
info->name, info->version, db->treename);
goto error;
}
free(pkgpath);
/* clear out 'line', to be certain - and to make valgrind happy */
memset(line, 0, sizeof(line));
/* DESC */
if(inforeq & INFRQ_DESC && !(info->infolevel & INFRQ_DESC)) {
snprintf(path, PATH_MAX, "%sdesc", pkgpath);
if((fp = fopen(path, "r")) == NULL) {
char *path = get_pkgpath(db, info, "desc");
if(!path || (fp = fopen(path, "r")) == NULL) {
_alpm_log(db->handle, ALPM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
free(path);
goto error;
}
free(path);
while(!feof(fp)) {
READ_NEXT();
if(fgets(line, sizeof(line), fp) == NULL && !feof(fp)) {
goto error;
}
if(_alpm_strip_newline(line) == 0) {
/* length of stripped line was zero */
continue;
}
if(strcmp(line, "%NAME%") == 0) {
READ_NEXT();
if(strcmp(line, info->name) != 0) {
@@ -596,32 +605,20 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
READ_AND_STORE(info->packager);
} else if(strcmp(line, "%REASON%") == 0) {
READ_NEXT();
info->reason = (alpm_pkgreason_t)atol(line);
info->reason = (alpm_pkgreason_t)atoi(line);
} else if(strcmp(line, "%SIZE%") == 0) {
/* NOTE: the CSIZE and SIZE fields both share the "size" field
* in the pkginfo_t struct. This can be done b/c CSIZE
* is currently only used in sync databases, and SIZE is
* only used in local databases.
*/
READ_NEXT();
info->size = atol(line);
/* also store this value to isize */
info->isize = info->size;
info->isize = _alpm_strtoofft(line);
} else if(strcmp(line, "%REPLACES%") == 0) {
READ_AND_STORE_ALL(info->replaces);
READ_AND_SPLITDEP(info->replaces);
} else if(strcmp(line, "%DEPENDS%") == 0) {
/* Different than the rest because of the _alpm_splitdep call. */
while(1) {
READ_NEXT();
if(strlen(line) == 0) break;
info->depends = alpm_list_add(info->depends, _alpm_splitdep(line));
}
READ_AND_SPLITDEP(info->depends);
} else if(strcmp(line, "%OPTDEPENDS%") == 0) {
READ_AND_STORE_ALL(info->optdepends);
} else if(strcmp(line, "%CONFLICTS%") == 0) {
READ_AND_STORE_ALL(info->conflicts);
READ_AND_SPLITDEP(info->conflicts);
} else if(strcmp(line, "%PROVIDES%") == 0) {
READ_AND_STORE_ALL(info->provides);
READ_AND_SPLITDEP(info->provides);
}
}
fclose(fp);
@@ -631,11 +628,13 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
/* FILES */
if(inforeq & INFRQ_FILES && !(info->infolevel & INFRQ_FILES)) {
snprintf(path, PATH_MAX, "%sfiles", pkgpath);
if((fp = fopen(path, "r")) == NULL) {
char *path = get_pkgpath(db, info, "files");
if(!path || (fp = fopen(path, "r")) == NULL) {
_alpm_log(db->handle, ALPM_LOG_ERROR, _("could not open file %s: %s\n"), path, strerror(errno));
free(path);
goto error;
}
free(path);
while(fgets(line, sizeof(line), fp)) {
_alpm_strip_newline(line);
if(strcmp(line, "%FILES%") == 0) {
@@ -686,19 +685,18 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
/* INSTALL */
if(inforeq & INFRQ_SCRIPTLET && !(info->infolevel & INFRQ_SCRIPTLET)) {
snprintf(path, PATH_MAX, "%sinstall", pkgpath);
char *path = get_pkgpath(db, info, "install");
if(access(path, F_OK) == 0) {
info->scriptlet = 1;
}
free(path);
info->infolevel |= INFRQ_SCRIPTLET;
}
free(pkgpath);
return 0;
error:
info->infolevel |= INFRQ_ERROR;
free(pkgpath);
if(fp) {
fclose(fp);
}
@@ -709,14 +707,14 @@ int _alpm_local_db_prepare(alpm_db_t *db, alpm_pkg_t *info)
{
mode_t oldmask;
int retval = 0;
char *pkgpath = NULL;
char *pkgpath;
if(checkdbdir(db) != 0) {
return -1;
}
oldmask = umask(0000);
pkgpath = get_pkgpath(db, info);
pkgpath = get_pkgpath(db, info, NULL);
if((retval = mkdir(pkgpath, 0755)) != 0) {
_alpm_log(db->handle, ALPM_LOG_ERROR, _("could not create directory %s: %s\n"),
@@ -732,36 +730,31 @@ int _alpm_local_db_prepare(alpm_db_t *db, alpm_pkg_t *info)
int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
{
FILE *fp = NULL;
char path[PATH_MAX];
mode_t oldmask;
alpm_list_t *lp = NULL;
alpm_list_t *lp;
int retval = 0;
char *pkgpath = NULL;
if(db == NULL || info == NULL) {
if(db == NULL || info == NULL || !(db->status & DB_STATUS_LOCAL)) {
return -1;
}
pkgpath = get_pkgpath(db, info);
/* make sure we have a sane umask */
oldmask = umask(0022);
if(strcmp(db->treename, "local") != 0) {
return -1;
}
/* DESC */
if(inforeq & INFRQ_DESC) {
char *path;
_alpm_log(db->handle, ALPM_LOG_DEBUG, "writing %s-%s DESC information back to db\n",
info->name, info->version);
snprintf(path, PATH_MAX, "%sdesc", pkgpath);
if((fp = fopen(path, "w")) == NULL) {
path = get_pkgpath(db, info, "desc");
if(!path || (fp = fopen(path, "w")) == NULL) {
_alpm_log(db->handle, ALPM_LOG_ERROR, _("could not open file %s: %s\n"),
path, strerror(errno));
retval = -1;
free(path);
goto cleanup;
}
free(path);
fprintf(fp, "%%NAME%%\n%s\n\n"
"%%VERSION%%\n%s\n\n", info->name, info->version);
if(info->desc) {
@@ -778,7 +771,9 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq
if(info->replaces) {
fputs("%REPLACES%\n", fp);
for(lp = info->replaces; lp; lp = lp->next) {
fprintf(fp, "%s\n", (char *)lp->data);
char *depstring = alpm_dep_compute_string(lp->data);
fprintf(fp, "%s\n", depstring);
free(depstring);
}
fprintf(fp, "\n");
}
@@ -837,14 +832,18 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq
if(info->conflicts) {
fputs("%CONFLICTS%\n", fp);
for(lp = info->conflicts; lp; lp = lp->next) {
fprintf(fp, "%s\n", (char *)lp->data);
char *depstring = alpm_dep_compute_string(lp->data);
fprintf(fp, "%s\n", depstring);
free(depstring);
}
fprintf(fp, "\n");
}
if(info->provides) {
fputs("%PROVIDES%\n", fp);
for(lp = info->provides; lp; lp = lp->next) {
fprintf(fp, "%s\n", (char *)lp->data);
char *depstring = alpm_dep_compute_string(lp->data);
fprintf(fp, "%s\n", depstring);
free(depstring);
}
fprintf(fp, "\n");
}
@@ -855,15 +854,18 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq
/* FILES */
if(inforeq & INFRQ_FILES) {
char *path;
_alpm_log(db->handle, ALPM_LOG_DEBUG, "writing %s-%s FILES information back to db\n",
info->name, info->version);
snprintf(path, PATH_MAX, "%sfiles", pkgpath);
if((fp = fopen(path, "w")) == NULL) {
path = get_pkgpath(db, info, "files");
if(!path || (fp = fopen(path, "w")) == NULL) {
_alpm_log(db->handle, ALPM_LOG_ERROR, _("could not open file %s: %s\n"),
path, strerror(errno));
retval = -1;
free(path);
goto cleanup;
}
free(path);
if(info->files.count) {
size_t i;
fprintf(fp, "%%FILES%%\n");
@@ -890,7 +892,6 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq
cleanup:
umask(oldmask);
free(pkgpath);
if(fp) {
fclose(fp);
@@ -902,9 +903,7 @@ cleanup:
int _alpm_local_db_remove(alpm_db_t *db, alpm_pkg_t *info)
{
int ret = 0;
char *pkgpath = NULL;
pkgpath = get_pkgpath(db, info);
char *pkgpath = get_pkgpath(db, info, NULL);
ret = _alpm_rmrf(pkgpath);
free(pkgpath);

View File

@@ -87,7 +87,7 @@ static void *_package_changelog_open(alpm_pkg_t *pkg)
* @return the number of characters read, or 0 if there is no more data
*/
static size_t _package_changelog_read(void *ptr, size_t size,
const alpm_pkg_t UNUSED *pkg, const void *fp)
const alpm_pkg_t UNUSED *pkg, void *fp)
{
ssize_t sret = archive_read_data((struct archive *)fp, ptr, size);
/* Report error (negative values) */
@@ -187,18 +187,21 @@ static int parse_descfile(alpm_handle_t *handle, struct archive *a, alpm_pkg_t *
STRDUP(newpkg->arch, ptr, return -1);
} else if(strcmp(key, "size") == 0) {
/* size in the raw package is uncompressed (installed) size */
newpkg->isize = atol(ptr);
newpkg->isize = _alpm_strtoofft(ptr);
} else if(strcmp(key, "depend") == 0) {
alpm_depend_t *dep = _alpm_splitdep(ptr);
newpkg->depends = alpm_list_add(newpkg->depends, dep);
} else if(strcmp(key, "optdepend") == 0) {
newpkg->optdepends = alpm_list_add(newpkg->optdepends, strdup(ptr));
} else if(strcmp(key, "conflict") == 0) {
newpkg->conflicts = alpm_list_add(newpkg->conflicts, strdup(ptr));
alpm_depend_t *conflict = _alpm_splitdep(ptr);
newpkg->conflicts = alpm_list_add(newpkg->conflicts, conflict);
} else if(strcmp(key, "replaces") == 0) {
newpkg->replaces = alpm_list_add(newpkg->replaces, strdup(ptr));
alpm_depend_t *replace = _alpm_splitdep(ptr);
newpkg->replaces = alpm_list_add(newpkg->replaces, replace);
} else if(strcmp(key, "provides") == 0) {
newpkg->provides = alpm_list_add(newpkg->provides, strdup(ptr));
alpm_depend_t *provide = _alpm_splitdep(ptr);
newpkg->provides = alpm_list_add(newpkg->provides, provide);
} else if(strcmp(key, "backup") == 0) {
alpm_backup_t *backup;
CALLOC(backup, 1, sizeof(alpm_backup_t), return -1);
@@ -269,20 +272,90 @@ static alpm_file_t *files_msort(alpm_file_t *files, size_t n)
return files;
}
/**
* Validate a package.
* @param handle the context handle
* @param pkgfile path to the package file
* @param syncpkg package object to load verification data from (md5sum,
* sha256sum, and/or base64 signature)
* @param level the required level of signature verification
* @param sigdata signature data from the package to pass back
* @return 0 if package is fully valid, -1 and pm_errno otherwise
*/
int _alpm_pkg_validate_internal(alpm_handle_t *handle,
const char *pkgfile, alpm_pkg_t *syncpkg, alpm_siglevel_t level,
alpm_siglist_t **sigdata)
{
int has_sig;
handle->pm_errno = 0;
if(pkgfile == NULL || strlen(pkgfile) == 0) {
RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);
}
/* attempt to access the package file, ensure it exists */
if(access(pkgfile, R_OK) != 0) {
RET_ERR(handle, ALPM_ERR_PKG_NOT_FOUND, -1);
}
/* can we get away with skipping checksums? */
has_sig = 0;
if(level & ALPM_SIG_PACKAGE) {
if(syncpkg && syncpkg->base64_sig) {
has_sig = 1;
} else {
char *sigpath = _alpm_sigpath(handle, pkgfile);
if(sigpath && !_alpm_access(handle, NULL, sigpath, R_OK)) {
has_sig = 1;
}
free(sigpath);
}
}
if(syncpkg && !has_sig) {
if(syncpkg->md5sum && !syncpkg->sha256sum) {
_alpm_log(handle, ALPM_LOG_DEBUG, "md5sum: %s\n", syncpkg->md5sum);
_alpm_log(handle, ALPM_LOG_DEBUG, "checking md5sum for %s\n", pkgfile);
if(_alpm_test_checksum(pkgfile, syncpkg->md5sum, ALPM_CSUM_MD5) != 0) {
RET_ERR(handle, ALPM_ERR_PKG_INVALID_CHECKSUM, -1);
}
}
if(syncpkg->sha256sum) {
_alpm_log(handle, ALPM_LOG_DEBUG, "sha256sum: %s\n", syncpkg->sha256sum);
_alpm_log(handle, ALPM_LOG_DEBUG, "checking sha256sum for %s\n", pkgfile);
if(_alpm_test_checksum(pkgfile, syncpkg->sha256sum, ALPM_CSUM_SHA256) != 0) {
RET_ERR(handle, ALPM_ERR_PKG_INVALID_CHECKSUM, -1);
}
}
}
/* even if we don't have a sig, run the check code if level tells us to */
if(has_sig || level & ALPM_SIG_PACKAGE) {
const char *sig = syncpkg ? syncpkg->base64_sig : NULL;
_alpm_log(handle, ALPM_LOG_DEBUG, "sig data: %s\n", sig ? sig : "<from .sig>");
if(_alpm_check_pgp_helper(handle, pkgfile, sig,
level & ALPM_SIG_PACKAGE_OPTIONAL, level & ALPM_SIG_PACKAGE_MARGINAL_OK,
level & ALPM_SIG_PACKAGE_UNKNOWN_OK, sigdata)) {
handle->pm_errno = ALPM_ERR_PKG_INVALID_SIG;
return -1;
}
}
return 0;
}
/**
* Load a package and create the corresponding alpm_pkg_t struct.
* @param handle the context handle
* @param pkgfile path to the package file
* @param full whether to stop the load after metadata is read or continue
* through the full archive
* @return An information filled alpm_pkg_t struct
* through the full archive
*/
alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile,
int full, const char *md5sum, const char *base64_sig,
alpm_siglevel_t level)
alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
const char *pkgfile, int full)
{
int ret;
int config = 0;
int ret, config = 0;
struct archive *archive;
struct archive_entry *entry;
alpm_pkg_t *newpkg = NULL;
@@ -304,29 +377,10 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile,
newpkg->size = st.st_size;
} else {
/* couldn't stat the pkgfile, return an error */
RET_ERR(handle, ALPM_ERR_PKG_OPEN, NULL);
RET_ERR(handle, ALPM_ERR_PKG_NOT_FOUND, NULL);
}
/* first steps- validate the package file */
_alpm_log(handle, ALPM_LOG_DEBUG, "md5sum: %s\n", md5sum);
if(md5sum) {
_alpm_log(handle, ALPM_LOG_DEBUG, "checking md5sum for %s\n", pkgfile);
if(_alpm_test_md5sum(pkgfile, md5sum) != 0) {
alpm_pkg_free(newpkg);
RET_ERR(handle, ALPM_ERR_PKG_INVALID_CHECKSUM, NULL);
}
}
_alpm_log(handle, ALPM_LOG_DEBUG, "base64_sig: %s\n", base64_sig);
if(level & ALPM_SIG_PACKAGE &&
_alpm_check_pgp_helper(handle, pkgfile, base64_sig,
level & ALPM_SIG_PACKAGE_OPTIONAL, level & ALPM_SIG_PACKAGE_MARGINAL_OK,
level & ALPM_SIG_PACKAGE_UNKNOWN_OK, ALPM_ERR_PKG_INVALID_SIG)) {
_alpm_pkg_free(newpkg);
return NULL;
}
/* next- try to create an archive object to read in the package */
/* try to create an archive object to read in the package */
if((archive = archive_read_new()) == NULL) {
alpm_pkg_free(newpkg);
RET_ERR(handle, ALPM_ERR_LIBARCHIVE, NULL);
@@ -458,7 +512,11 @@ int SYMEXPORT alpm_pkg_load(alpm_handle_t *handle, const char *filename, int ful
CHECK_HANDLE(handle, return -1);
ASSERT(pkg != NULL, RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1));
*pkg = _alpm_pkg_load_internal(handle, filename, full, NULL, NULL, level);
if(_alpm_pkg_validate_internal(handle, filename, NULL, level, NULL) == -1) {
/* pm_errno is set by pkg_validate */
return -1;
}
*pkg = _alpm_pkg_load_internal(handle, filename, full);
if(*pkg == NULL) {
/* pm_errno is set by pkg_load */
return -1;

View File

@@ -41,13 +41,12 @@
static char *get_sync_dir(alpm_handle_t *handle)
{
const char *dbpath = alpm_option_get_dbpath(handle);
size_t len = strlen(dbpath) + 6;
size_t len = strlen(handle->dbpath) + 6;
char *syncpath;
struct stat buf;
MALLOC(syncpath, len, RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
sprintf(syncpath, "%s%s", dbpath, "sync/");
sprintf(syncpath, "%s%s", handle->dbpath, "sync/");
if(stat(syncpath, &buf) != 0) {
_alpm_log(handle, ALPM_LOG_DEBUG, "database dir '%s' does not exist, creating it\n",
@@ -70,37 +69,62 @@ static char *get_sync_dir(alpm_handle_t *handle)
static int sync_db_validate(alpm_db_t *db)
{
alpm_siglevel_t level;
const char *dbpath;
if(db->status & DB_STATUS_VALID) {
if(db->status & DB_STATUS_VALID || db->status & DB_STATUS_MISSING) {
return 0;
}
if(db->status & DB_STATUS_INVALID) {
return -1;
}
dbpath = _alpm_db_path(db);
if(!dbpath) {
/* pm_errno set in _alpm_db_path() */
return -1;
}
/* we can skip any validation if the database doesn't exist */
if(access(dbpath, R_OK) != 0 && errno == ENOENT) {
db->status &= ~DB_STATUS_EXISTS;
db->status |= DB_STATUS_MISSING;
_alpm_log(db->handle, ALPM_LOG_WARNING,
"database file for '%s' does not exist\n", db->treename);
goto valid;
}
db->status |= DB_STATUS_EXISTS;
db->status &= ~DB_STATUS_MISSING;
/* this takes into account the default verification level if UNKNOWN
* was assigned to this db */
level = alpm_db_get_siglevel(db);
if(level & ALPM_SIG_DATABASE) {
const char *dbpath = _alpm_db_path(db);
if(!dbpath) {
/* pm_errno set in _alpm_db_path() */
return -1;
}
/* we can skip any validation if the database doesn't exist */
if(access(dbpath, R_OK) != 0 && errno == ENOENT) {
goto valid;
return 0;
}
if(_alpm_check_pgp_helper(db->handle, dbpath, NULL,
int retry, ret;
do {
retry = 0;
alpm_siglist_t *siglist;
ret = _alpm_check_pgp_helper(db->handle, dbpath, NULL,
level & ALPM_SIG_DATABASE_OPTIONAL, level & ALPM_SIG_DATABASE_MARGINAL_OK,
level & ALPM_SIG_DATABASE_UNKNOWN_OK, ALPM_ERR_DB_INVALID_SIG)) {
level & ALPM_SIG_DATABASE_UNKNOWN_OK, &siglist);
if(ret) {
retry = _alpm_process_siglist(db->handle, db->treename, siglist,
level & ALPM_SIG_DATABASE_OPTIONAL, level & ALPM_SIG_DATABASE_MARGINAL_OK,
level & ALPM_SIG_DATABASE_UNKNOWN_OK);
}
alpm_siglist_cleanup(siglist);
free(siglist);
} while(retry);
if(ret) {
db->handle->pm_errno = ALPM_ERR_DB_INVALID_SIG;
return 1;
}
}
valid:
db->status |= DB_STATUS_VALID;
db->status &= ~DB_STATUS_INVALID;
return 0;
}
@@ -167,6 +191,8 @@ int SYMEXPORT alpm_db_update(int force, alpm_db_t *db)
/* attempt to grab a lock */
if(_alpm_handle_lock(handle)) {
free(syncpath);
umask(oldmask);
RET_ERR(handle, ALPM_ERR_HANDLE_LOCK, -1);
}
@@ -187,12 +213,13 @@ int SYMEXPORT alpm_db_update(int force, alpm_db_t *db)
snprintf(payload->fileurl, len, "%s/%s.db", server, db->treename);
payload->handle = handle;
payload->force = force;
payload->unlink_on_fail = 1;
ret = _alpm_download(payload, syncpath, NULL);
if(ret == 0 && (level & ALPM_SIG_DATABASE)) {
/* an existing sig file is no good at this point */
char *sigpath = _alpm_db_sig_path(db);
char *sigpath = _alpm_sigpath(handle, _alpm_db_path(db));
if(!sigpath) {
ret = -1;
break;
@@ -234,7 +261,12 @@ int SYMEXPORT alpm_db_update(int force, alpm_db_t *db)
/* Cache needs to be rebuilt */
_alpm_db_free_pkgcache(db);
/* clear all status flags regarding validity/existence */
db->status &= ~DB_STATUS_VALID;
db->status &= ~DB_STATUS_INVALID;
db->status &= ~DB_STATUS_EXISTS;
db->status &= ~DB_STATUS_MISSING;
if(sync_db_validate(db)) {
/* pm_errno should be set */
ret = -1;
@@ -244,7 +276,7 @@ cleanup:
if(_alpm_handle_unlock(handle)) {
_alpm_log(handle, ALPM_LOG_WARNING, _("could not remove lock file %s\n"),
alpm_option_get_lockfile(handle));
handle->lockfile);
}
free(syncpath);
umask(oldmask);
@@ -378,6 +410,13 @@ static int sync_db_populate(alpm_db_t *db)
struct archive_entry *entry;
alpm_pkg_t *pkg = NULL;
if(db->status & DB_STATUS_INVALID) {
RET_ERR(db->handle, ALPM_ERR_DB_INVALID, -1);
}
if(db->status & DB_STATUS_MISSING) {
RET_ERR(db->handle, ALPM_ERR_DB_NOT_FOUND, -1);
}
if((archive = archive_read_new()) == NULL) {
RET_ERR(db->handle, ALPM_ERR_LIBARCHIVE, -1);
}
@@ -460,6 +499,12 @@ static int sync_db_populate(alpm_db_t *db)
f = alpm_list_add(f, linedup); \
} while(1) /* note the while(1) and not (0) */
#define READ_AND_SPLITDEP(f) do { \
if(_alpm_archive_fgets(archive, &buf) != ARCHIVE_OK) goto error; \
if(_alpm_strip_newline(buf.line) == 0) break; \
f = alpm_list_add(f, _alpm_splitdep(line)); \
} while(1) /* note the while(1) and not (0) */
static int sync_db_read(alpm_db_t *db, struct archive *archive,
struct archive_entry *entry, alpm_pkg_t **likely_pkg)
{
@@ -495,7 +540,10 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
int ret;
while((ret = _alpm_archive_fgets(archive, &buf)) == ARCHIVE_OK) {
char *line = buf.line;
_alpm_strip_newline(line);
if(_alpm_strip_newline(line) == 0) {
/* length of stripped line was zero */
continue;
}
if(strcmp(line, "%NAME%") == 0) {
READ_NEXT();
@@ -527,41 +575,27 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
} else if(strcmp(line, "%PACKAGER%") == 0) {
READ_AND_STORE(pkg->packager);
} else if(strcmp(line, "%CSIZE%") == 0) {
/* Note: the CSIZE and SIZE fields both share the "size" field in the
* pkginfo_t struct. This can be done b/c CSIZE is currently only used
* in sync databases, and SIZE is only used in local databases.
*/
READ_NEXT();
pkg->size = atol(line);
/* also store this value to isize if isize is unset */
if(pkg->isize == 0) {
pkg->isize = pkg->size;
}
pkg->size = _alpm_strtoofft(line);
} else if(strcmp(line, "%ISIZE%") == 0) {
READ_NEXT();
pkg->isize = atol(line);
pkg->isize = _alpm_strtoofft(line);
} else if(strcmp(line, "%MD5SUM%") == 0) {
READ_AND_STORE(pkg->md5sum);
} else if(strcmp(line, "%SHA256SUM%") == 0) {
/* we don't do anything with this value right now */
READ_NEXT();
READ_AND_STORE(pkg->sha256sum);
} else if(strcmp(line, "%PGPSIG%") == 0) {
READ_AND_STORE(pkg->base64_sig);
} else if(strcmp(line, "%REPLACES%") == 0) {
READ_AND_STORE_ALL(pkg->replaces);
READ_AND_SPLITDEP(pkg->replaces);
} else if(strcmp(line, "%DEPENDS%") == 0) {
/* Different than the rest because of the _alpm_splitdep call. */
while(1) {
READ_NEXT();
if(strlen(line) == 0) break;
pkg->depends = alpm_list_add(pkg->depends, _alpm_splitdep(line));
}
READ_AND_SPLITDEP(pkg->depends);
} else if(strcmp(line, "%OPTDEPENDS%") == 0) {
READ_AND_STORE_ALL(pkg->optdepends);
} else if(strcmp(line, "%CONFLICTS%") == 0) {
READ_AND_STORE_ALL(pkg->conflicts);
READ_AND_SPLITDEP(pkg->conflicts);
} else if(strcmp(line, "%PROVIDES%") == 0) {
READ_AND_STORE_ALL(pkg->provides);
READ_AND_SPLITDEP(pkg->provides);
} else if(strcmp(line, "%DELTAS%") == 0) {
/* Different than the rest because of the _alpm_delta_parse call. */
while(1) {

View File

@@ -42,7 +42,7 @@
#include "deps.h"
static alpm_conflict_t *conflict_new(alpm_pkg_t *pkg1, alpm_pkg_t *pkg2,
const char *reason)
alpm_depend_t *reason)
{
alpm_conflict_t *conflict;
@@ -52,7 +52,7 @@ static alpm_conflict_t *conflict_new(alpm_pkg_t *pkg1, alpm_pkg_t *pkg2,
conflict->package2_hash = pkg2->name_hash;
STRDUP(conflict->package1, pkg1->name, return NULL);
STRDUP(conflict->package2, pkg2->name, return NULL);
STRDUP(conflict->reason, reason, return NULL);
conflict->reason = reason;
return conflict;
}
@@ -61,7 +61,6 @@ void _alpm_conflict_free(alpm_conflict_t *conflict)
{
FREE(conflict->package2);
FREE(conflict->package1);
FREE(conflict->reason);
FREE(conflict);
}
@@ -74,7 +73,7 @@ alpm_conflict_t *_alpm_conflict_dup(const alpm_conflict_t *conflict)
newconflict->package2_hash = conflict->package2_hash;
STRDUP(newconflict->package1, conflict->package1, return NULL);
STRDUP(newconflict->package2, conflict->package2, return NULL);
STRDUP(newconflict->reason, conflict->reason, return NULL);
newconflict->reason = conflict->reason;
return newconflict;
}
@@ -103,16 +102,18 @@ static int conflict_isin(alpm_conflict_t *needle, alpm_list_t *haystack)
* @param reason reason for this conflict
*/
static int add_conflict(alpm_handle_t *handle, alpm_list_t **baddeps,
alpm_pkg_t *pkg1, alpm_pkg_t *pkg2, const char *reason)
alpm_pkg_t *pkg1, alpm_pkg_t *pkg2, alpm_depend_t *reason)
{
alpm_conflict_t *conflict = conflict_new(pkg1, pkg2, reason);
if(!conflict) {
return -1;
}
_alpm_log(handle, ALPM_LOG_DEBUG, "package %s conflicts with %s (by %s)\n",
pkg1->name, pkg2->name, reason);
if(!conflict_isin(conflict, *baddeps)) {
char *conflict_str = alpm_dep_compute_string(reason);
*baddeps = alpm_list_add(*baddeps, conflict);
_alpm_log(handle, ALPM_LOG_DEBUG, "package %s conflicts with %s (by %s)\n",
pkg1->name, pkg2->name, conflict_str);
free(conflict_str);
} else {
_alpm_conflict_free(conflict);
}
@@ -144,9 +145,8 @@ static void check_conflict(alpm_handle_t *handle,
alpm_list_t *j;
for(j = alpm_pkg_get_conflicts(pkg1); j; j = j->next) {
const char *conflict = j->data;
alpm_depend_t *conflict = j->data;
alpm_list_t *k;
alpm_depend_t *parsed_conflict = _alpm_splitdep(conflict);
for(k = list2; k; k = k->next) {
alpm_pkg_t *pkg2 = k->data;
@@ -157,7 +157,7 @@ static void check_conflict(alpm_handle_t *handle,
continue;
}
if(_alpm_depcmp(pkg2, parsed_conflict)) {
if(_alpm_depcmp(pkg2, conflict)) {
if(order >= 0) {
add_conflict(handle, baddeps, pkg1, pkg2, conflict);
} else {
@@ -165,7 +165,6 @@ static void check_conflict(alpm_handle_t *handle,
}
}
}
_alpm_dep_free(parsed_conflict);
}
}
}
@@ -181,10 +180,7 @@ alpm_list_t *_alpm_innerconflicts(alpm_handle_t *handle, alpm_list_t *packages)
return baddeps;
}
/* Check for target vs (db - target) conflicts
* In case of conflict the package1 field of pmdepconflict_t contains
* the target package, package2 field contains the local package
*/
/* Check for target vs (db - target) conflicts */
alpm_list_t *_alpm_outerconflicts(alpm_db_t *db, alpm_list_t *packages)
{
alpm_list_t *baddeps = NULL;
@@ -388,7 +384,6 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
alpm_list_t *i, *conflicts = NULL;
size_t numtargs = alpm_list_count(upgrade);
size_t current;
alpm_trans_t *trans = handle->trans;
if(!upgrade) {
return NULL;
@@ -406,11 +401,11 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
size_t filenum;
int percent = (current * 100) / numtargs;
PROGRESS(trans, ALPM_TRANS_PROGRESS_CONFLICTS_START, "", percent,
PROGRESS(handle, ALPM_PROGRESS_CONFLICTS_START, "", percent,
numtargs, current);
/* CHECK 1: check every target against every target */
_alpm_log(handle, ALPM_LOG_DEBUG, "searching for file conflicts: %s\n",
alpm_pkg_get_name(p1));
p1->name);
for(j = i->next; j; j = j->next) {
alpm_list_t *common_files;
alpm_pkg_t *p2 = j->data;
@@ -423,8 +418,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
for(k = common_files; k; k = k->next) {
snprintf(path, PATH_MAX, "%s%s", handle->root, (char *)k->data);
conflicts = add_fileconflict(handle, conflicts,
ALPM_FILECONFLICT_TARGET, path,
alpm_pkg_get_name(p1), alpm_pkg_get_name(p2));
ALPM_FILECONFLICT_TARGET, path, p1->name, p2->name);
if(handle->pm_errno == ALPM_ERR_MEMORY) {
FREELIST(conflicts);
FREELIST(common_files);
@@ -590,7 +584,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
free(tmpfiles.files);
}
}
PROGRESS(trans, ALPM_TRANS_PROGRESS_CONFLICTS_START, "", 100,
PROGRESS(handle, ALPM_PROGRESS_CONFLICTS_START, "", 100,
numtargs, current);
return conflicts;

View File

@@ -224,7 +224,7 @@ alpm_siglevel_t SYMEXPORT alpm_db_get_siglevel(alpm_db_t *db)
{
ASSERT(db != NULL, return -1);
if(db->siglevel & ALPM_SIG_USE_DEFAULT) {
return alpm_option_get_default_siglevel(db->handle);
return db->handle->siglevel;
} else {
return db->siglevel;
}
@@ -326,7 +326,11 @@ alpm_db_t *_alpm_db_new(const char *treename, int is_local)
CALLOC(db, 1, sizeof(alpm_db_t), return NULL);
STRDUP(db->treename, treename, return NULL);
db->is_local = is_local;
if(is_local) {
db->status |= DB_STATUS_LOCAL;
} else {
db->status &= ~DB_STATUS_LOCAL;
}
return db;
}
@@ -353,13 +357,13 @@ const char *_alpm_db_path(alpm_db_t *db)
const char *dbpath;
size_t pathsize;
dbpath = alpm_option_get_dbpath(db->handle);
dbpath = db->handle->dbpath;
if(!dbpath) {
_alpm_log(db->handle, ALPM_LOG_ERROR, _("database path is undefined\n"));
RET_ERR(db->handle, ALPM_ERR_DB_OPEN, NULL);
}
if(db->is_local) {
if(db->status & DB_STATUS_LOCAL) {
pathsize = strlen(dbpath) + strlen(db->treename) + 2;
CALLOC(db->_path, 1, pathsize, RET_ERR(db->handle, ALPM_ERR_MEMORY, NULL));
sprintf(db->_path, "%s%s/", dbpath, db->treename);
@@ -375,24 +379,10 @@ const char *_alpm_db_path(alpm_db_t *db)
return db->_path;
}
char *_alpm_db_sig_path(alpm_db_t *db)
{
char *sigpath;
size_t len;
const char *dbfile = _alpm_db_path(db);
if(!db || !dbfile) {
return NULL;
}
len = strlen(dbfile) + strlen(".sig") + 1;
CALLOC(sigpath, len, sizeof(char), RET_ERR(db->handle, ALPM_ERR_MEMORY, NULL));
sprintf(sigpath, "%s.sig", dbfile);
return sigpath;
}
int _alpm_db_cmp(const void *d1, const void *d2)
{
alpm_db_t *db1 = (alpm_db_t *)d1;
alpm_db_t *db2 = (alpm_db_t *)d2;
const alpm_db_t *db1 = d1;
const alpm_db_t *db2 = d2;
return strcmp(db1->treename, db2->treename);
}
@@ -421,7 +411,7 @@ alpm_list_t *_alpm_db_search(alpm_db_t *db, const alpm_list_t *needles)
for(j = list; j; j = j->next) {
alpm_pkg_t *pkg = j->data;
const char *matched = NULL;
const char *name = alpm_pkg_get_name(pkg);
const char *name = pkg->name;
const char *desc = alpm_pkg_get_desc(pkg);
/* check name as regex AND as plain text */
@@ -437,7 +427,8 @@ alpm_list_t *_alpm_db_search(alpm_db_t *db, const alpm_list_t *needles)
if(!matched) {
/* check provides */
for(k = alpm_pkg_get_provides(pkg); k; k = k->next) {
if(regexec(&reg, k->data, 0, 0, 0) == 0) {
alpm_depend_t *provide = k->data;
if(regexec(&reg, provide->name, 0, 0, 0) == 0) {
matched = k->data;
break;
}
@@ -517,9 +508,11 @@ void _alpm_db_free_pkgcache(alpm_db_t *db)
_alpm_log(db->handle, ALPM_LOG_DEBUG,
"freeing package cache for repository '%s'\n", db->treename);
alpm_list_free_inner(_alpm_db_get_pkgcache(db),
if(db->pkgcache) {
alpm_list_free_inner(db->pkgcache->list,
(alpm_list_fn_free)_alpm_pkg_free);
_alpm_pkghash_free(db->pkgcache);
_alpm_pkghash_free(db->pkgcache);
}
db->status &= ~DB_STATUS_PKGCACHE;
free_groupcache(db);
@@ -562,13 +555,12 @@ int _alpm_db_add_pkgincache(alpm_db_t *db, alpm_pkg_t *pkg)
return -1;
}
newpkg = _alpm_pkg_dup(pkg);
if(newpkg == NULL) {
if(_alpm_pkg_dup(pkg, &newpkg)) {
return -1;
}
_alpm_log(db->handle, ALPM_LOG_DEBUG, "adding entry '%s' in '%s' cache\n",
alpm_pkg_get_name(newpkg), db->treename);
newpkg->name, db->treename);
db->pkgcache = _alpm_pkghash_add_sorted(db->pkgcache, newpkg);
free_groupcache(db);
@@ -585,13 +577,13 @@ int _alpm_db_remove_pkgfromcache(alpm_db_t *db, alpm_pkg_t *pkg)
}
_alpm_log(db->handle, ALPM_LOG_DEBUG, "removing entry '%s' from '%s' cache\n",
alpm_pkg_get_name(pkg), db->treename);
pkg->name, db->treename);
db->pkgcache = _alpm_pkghash_remove(db->pkgcache, pkg, &data);
if(data == NULL) {
/* package not found */
_alpm_log(db->handle, ALPM_LOG_DEBUG, "cannot remove entry '%s' from '%s' cache: not found\n",
alpm_pkg_get_name(pkg), db->treename);
pkg->name, db->treename);
return -1;
}

View File

@@ -47,8 +47,13 @@ typedef enum _alpm_dbinfrq_t {
/** Database status. Bitflags. */
enum _alpm_dbstatus_t {
DB_STATUS_VALID = (1 << 0),
DB_STATUS_PKGCACHE = (1 << 1),
DB_STATUS_GRPCACHE = (1 << 2)
DB_STATUS_INVALID = (1 << 1),
DB_STATUS_EXISTS = (1 << 2),
DB_STATUS_MISSING = (1 << 3),
DB_STATUS_LOCAL = (1 << 10),
DB_STATUS_PKGCACHE = (1 << 11),
DB_STATUS_GRPCACHE = (1 << 12)
};
struct db_operations {
@@ -63,16 +68,13 @@ struct __alpm_db_t {
char *treename;
/* do not access directly, use _alpm_db_path(db) for lazy access */
char *_path;
/* also indicates whether we are RO or RW */
int is_local;
/* flags determining validity, loaded caches, etc. */
enum _alpm_dbstatus_t status;
alpm_pkghash_t *pkgcache;
alpm_list_t *grpcache;
alpm_list_t *servers;
alpm_siglevel_t siglevel;
struct db_operations *ops;
/* flags determining validity, local, loaded caches, etc. */
enum _alpm_dbstatus_t status;
alpm_siglevel_t siglevel;
};
@@ -80,7 +82,6 @@ struct __alpm_db_t {
alpm_db_t *_alpm_db_new(const char *treename, int is_local);
void _alpm_db_free(alpm_db_t *db);
const char *_alpm_db_path(alpm_db_t *db);
char *_alpm_db_sig_path(alpm_db_t *db);
int _alpm_db_cmp(const void *d1, const void *d2);
alpm_list_t *_alpm_db_search(alpm_db_t *db, const alpm_list_t *needles);
alpm_db_t *_alpm_db_register_local(alpm_handle_t *handle);

View File

@@ -89,12 +89,28 @@ static void graph_init_size(alpm_handle_t *handle, alpm_list_t *vertices)
/* determine whether the delta file already exists */
fpath = _alpm_filecache_find(handle, vdelta->delta);
md5sum = alpm_compute_md5sum(fpath);
if(fpath && md5sum && strcmp(md5sum, vdelta->delta_md5) == 0) {
vdelta->download_size = 0;
if(fpath) {
md5sum = alpm_compute_md5sum(fpath);
if(md5sum && strcmp(md5sum, vdelta->delta_md5) == 0) {
vdelta->download_size = 0;
}
FREE(md5sum);
FREE(fpath);
} else {
char *fnamepart;
CALLOC(fnamepart, strlen(vdelta->delta) + 6, sizeof(char), return);
sprintf(fnamepart, "%s.part", vdelta->delta);
fpath = _alpm_filecache_find(handle, fnamepart);
if(fpath) {
struct stat st;
if(stat(fpath, &st) == 0) {
vdelta->download_size = vdelta->delta_size - st.st_size;
vdelta->download_size = vdelta->download_size < 0 ? 0 : vdelta->download_size;
}
FREE(fpath);
}
FREE(fnamepart);
}
FREE(fpath);
FREE(md5sum);
/* determine whether a base 'from' file exists */
fpath = _alpm_filecache_find(handle, vdelta->from);
@@ -249,12 +265,8 @@ static alpm_list_t *find_unused(alpm_list_t *deltas, const char *to, off_t quota
alpm_list_t SYMEXPORT *alpm_pkg_unused_deltas(alpm_pkg_t *pkg)
{
off_t pkgsize = alpm_pkg_get_size(pkg);
alpm_list_t *unused = find_unused(
alpm_pkg_get_deltas(pkg),
alpm_pkg_get_filename(pkg),
pkgsize * MAX_DELTA_RATIO);
return unused;
ASSERT(pkg != NULL, return NULL);
return find_unused(pkg->deltas, pkg->filename, pkg->size * MAX_DELTA_RATIO);
}
/** @} */
@@ -299,7 +311,7 @@ alpm_delta_t *_alpm_delta_parse(char *line)
tmp2 = tmp;
tmp = strchr(tmp, ' ');
*(tmp++) = '\0';
delta->delta_size = atol(tmp2);
delta->delta_size = _alpm_strtoofft(tmp2);
tmp2 = tmp;
tmp = strchr(tmp, ' ');

View File

@@ -230,7 +230,7 @@ static alpm_pkg_t *find_dep_satisfier(alpm_list_t *pkgs, alpm_depend_t *dep)
{
alpm_list_t *i;
for(i = pkgs; i; i = alpm_list_next(i)) {
for(i = pkgs; i; i = i->next) {
alpm_pkg_t *pkg = i->data;
if(_alpm_depcmp(pkg, dep)) {
return pkg;
@@ -368,41 +368,38 @@ static int dep_vercmp(const char *version1, alpm_depmod_t mod,
return equal;
}
int _alpm_depcmp_literal(alpm_pkg_t *pkg, alpm_depend_t *dep)
{
if(pkg->name_hash != dep->name_hash
|| strcmp(pkg->name, dep->name) != 0) {
/* skip more expensive checks */
return 0;
}
return dep_vercmp(pkg->version, dep->mod, dep->version);
}
int _alpm_depcmp(alpm_pkg_t *pkg, alpm_depend_t *dep)
{
alpm_list_t *i;
int satisfy = 0;
int satisfy = _alpm_depcmp_literal(pkg, dep);
/* check (pkg->name, pkg->version) */
if(pkg->name_hash != dep->name_hash) {
/* skip more expensive checks */
} else {
satisfy = (strcmp(pkg->name, dep->name) == 0
&& dep_vercmp(pkg->version, dep->mod, dep->version));
if(satisfy) {
return satisfy;
}
if(satisfy) {
return satisfy;
}
/* check provisions, format : "name=version" */
/* check provisions, name and version if available */
for(i = alpm_pkg_get_provides(pkg); i && !satisfy; i = i->next) {
const char *provision = i->data;
const char *provver = strchr(provision, '=');
alpm_depend_t *provision = i->data;
if(provver == NULL) { /* no provision version */
satisfy = (dep->mod == ALPM_DEP_MOD_ANY
&& strcmp(provision, dep->name) == 0);
} else {
/* This is a bit tricker than the old code for performance reasons. To
* prevent the need to copy and duplicate strings, strncmp only the name
* portion if they are the same length, since there is a version and
* operator in play here. Cast is to silence sign conversion warning;
* we know provver >= provision if we are here. */
size_t namelen = (size_t)(provver - provision);
provver += 1;
satisfy = (strlen(dep->name) == namelen
&& strncmp(provision, dep->name, namelen) == 0
&& dep_vercmp(provver, dep->mod, dep->version));
if(dep->mod == ALPM_DEP_MOD_ANY) {
/* any version will satisfy the requirement */
satisfy = (provision->name_hash == dep->name_hash
&& strcmp(provision->name, dep->name) == 0);
} else if (provision->mod == ALPM_DEP_MOD_EQ) {
/* provision specifies a version, so try it out */
satisfy = (provision->name_hash == dep->name_hash
&& strcmp(provision->name, dep->name) == 0
&& dep_vercmp(provision->version, dep->mod, dep->version));
}
}
@@ -413,38 +410,48 @@ alpm_depend_t *_alpm_splitdep(const char *depstring)
{
alpm_depend_t *depend;
const char *ptr, *version = NULL;
size_t deplen;
if(depstring == NULL) {
return NULL;
}
CALLOC(depend, 1, sizeof(alpm_depend_t), return NULL);
deplen = strlen(depstring);
/* Find a version comparator if one exists. If it does, set the type and
* increment the ptr accordingly so we can copy the right strings. */
if((ptr = strstr(depstring, ">="))) {
depend->mod = ALPM_DEP_MOD_GE;
version = ptr + 2;
} else if((ptr = strstr(depstring, "<="))) {
depend->mod = ALPM_DEP_MOD_LE;
version = ptr + 2;
} else if((ptr = strstr(depstring, "="))) {
if((ptr = memchr(depstring, '<', deplen))) {
if(ptr[1] == '=') {
depend->mod = ALPM_DEP_MOD_LE;
version = ptr + 2;
} else {
depend->mod = ALPM_DEP_MOD_LT;
version = ptr + 1;
}
} else if((ptr = memchr(depstring, '>', deplen))) {
if(ptr[1] == '=') {
depend->mod = ALPM_DEP_MOD_GE;
version = ptr + 2;
} else {
depend->mod = ALPM_DEP_MOD_GT;
version = ptr + 1;
}
} else if((ptr = memchr(depstring, '=', deplen))) {
/* Note: we must do =,<,> checks after <=, >= checks */
depend->mod = ALPM_DEP_MOD_EQ;
version = ptr + 1;
} else if((ptr = strstr(depstring, "<"))) {
depend->mod = ALPM_DEP_MOD_LT;
version = ptr + 1;
} else if((ptr = strstr(depstring, ">"))) {
depend->mod = ALPM_DEP_MOD_GT;
version = ptr + 1;
} else {
/* no version specified, leave version and ptr NULL */
depend->mod = ALPM_DEP_MOD_ANY;
}
/* copy the right parts to the right places */
STRNDUP(depend->name, depstring, ptr - depstring, return NULL);
if(ptr) {
STRNDUP(depend->name, depstring, ptr - depstring, return NULL);
} else {
STRDUP(depend->name, depstring, return NULL);
}
depend->name_hash = _alpm_hash_sdbm(depend->name);
if(version) {
STRDUP(depend->version, version, return NULL);
@@ -515,13 +522,14 @@ static int can_remove_package(alpm_db_t *db, alpm_pkg_t *pkg,
* @param db package database to do dependency tracing in
* @param *targs pointer to a list of packages
* @param include_explicit if 0, explicitly installed packages are not included
* @return 0 on success, -1 on errors
*/
void _alpm_recursedeps(alpm_db_t *db, alpm_list_t *targs, int include_explicit)
int _alpm_recursedeps(alpm_db_t *db, alpm_list_t *targs, int include_explicit)
{
alpm_list_t *i, *j;
if(db == NULL || targs == NULL) {
return;
return -1;
}
for(i = targs; i; i = i->next) {
@@ -530,13 +538,18 @@ void _alpm_recursedeps(alpm_db_t *db, alpm_list_t *targs, int include_explicit)
alpm_pkg_t *deppkg = j->data;
if(_alpm_dep_edge(pkg, deppkg)
&& can_remove_package(db, deppkg, targs, include_explicit)) {
alpm_pkg_t *copy;
_alpm_log(db->handle, ALPM_LOG_DEBUG, "adding '%s' to the targets\n",
deppkg->name);
/* add it to the target list */
targs = alpm_list_add(targs, _alpm_pkg_dup(deppkg));
if(_alpm_pkg_dup(deppkg, &copy)) {
return -1;
}
targs = alpm_list_add(targs, copy);
}
}
}
return 0;
}
/**
@@ -564,14 +577,16 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
/* 1. literals */
for(i = dbs; i; i = i->next) {
alpm_pkg_t *pkg = _alpm_db_get_pkgfromcache(i->data, dep->name);
if(pkg && _alpm_depcmp(pkg, dep) && !_alpm_pkg_find(excluding, pkg->name)) {
if(pkg && _alpm_depcmp_literal(pkg, dep)
&& !_alpm_pkg_find(excluding, pkg->name)) {
if(_alpm_pkg_should_ignore(handle, pkg)) {
int install = 0;
if(prompt) {
QUESTION(handle->trans, ALPM_TRANS_CONV_INSTALL_IGNOREPKG, pkg,
QUESTION(handle, ALPM_QUESTION_INSTALL_IGNOREPKG, pkg,
NULL, NULL, &install);
} else {
_alpm_log(handle, ALPM_LOG_WARNING, _("ignoring package %s-%s\n"), pkg->name, pkg->version);
_alpm_log(handle, ALPM_LOG_WARNING, _("ignoring package %s-%s\n"),
pkg->name, pkg->version);
}
if(!install) {
ignored = 1;
@@ -585,15 +600,18 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
for(i = dbs; i; i = i->next) {
for(j = _alpm_db_get_pkgcache(i->data); j; j = j->next) {
alpm_pkg_t *pkg = j->data;
if(_alpm_depcmp(pkg, dep) && strcmp(pkg->name, dep->name) != 0 &&
!_alpm_pkg_find(excluding, pkg->name)) {
/* with hash != hash, we can even skip the strcmp() as we know they can't
* possibly be the same string */
if(pkg->name_hash != dep->name_hash && _alpm_depcmp(pkg, dep)
&& !_alpm_pkg_find(excluding, pkg->name)) {
if(_alpm_pkg_should_ignore(handle, pkg)) {
int install = 0;
if(prompt) {
QUESTION(handle->trans, ALPM_TRANS_CONV_INSTALL_IGNOREPKG,
QUESTION(handle, ALPM_QUESTION_INSTALL_IGNOREPKG,
pkg, NULL, NULL, &install);
} else {
_alpm_log(handle, ALPM_LOG_WARNING, _("ignoring package %s-%s\n"), pkg->name, pkg->version);
_alpm_log(handle, ALPM_LOG_WARNING, _("ignoring package %s-%s\n"),
pkg->name, pkg->version);
}
if(!install) {
ignored = 1;
@@ -622,11 +640,12 @@ static alpm_pkg_t *resolvedep(alpm_handle_t *handle, alpm_depend_t *dep,
int index = 0;
if(count > 1) {
/* if there is more than one provider, we ask the user */
QUESTION(handle->trans, ALPM_TRANS_CONV_SELECT_PROVIDER,
QUESTION(handle, ALPM_QUESTION_SELECT_PROVIDER,
providers, dep, NULL, &index);
}
if(index >= 0 && index < count) {
alpm_pkg_t *pkg = alpm_list_getdata(alpm_list_nth(providers, index));
alpm_list_t *nth = alpm_list_nth(providers, index);
alpm_pkg_t *pkg = nth->data;
alpm_list_free(providers);
return pkg;
}

View File

@@ -31,11 +31,12 @@ void _alpm_dep_free(alpm_depend_t *dep);
alpm_depend_t *_alpm_dep_dup(const alpm_depend_t *dep);
void _alpm_depmiss_free(alpm_depmissing_t *miss);
alpm_list_t *_alpm_sortbydeps(alpm_handle_t *handle, alpm_list_t *targets, int reverse);
void _alpm_recursedeps(alpm_db_t *db, alpm_list_t *targs, int include_explicit);
int _alpm_recursedeps(alpm_db_t *db, alpm_list_t *targs, int include_explicit);
int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t *localpkgs, alpm_pkg_t *pkg,
alpm_list_t *preferred, alpm_list_t **packages, alpm_list_t *remove,
alpm_list_t **data);
alpm_depend_t *_alpm_splitdep(const char *depstring);
int _alpm_depcmp_literal(alpm_pkg_t *pkg, alpm_depend_t *dep);
int _alpm_depcmp(alpm_pkg_t *pkg, alpm_depend_t *dep);
#endif /* _ALPM_DEPS_H */

View File

@@ -104,7 +104,7 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle)
}
for(; entries-- > 0; fsp++) {
CALLOC(mp, 1, sizeof(alpm_mountpoint_t), RET_ERR(ALPM_ERR_MEMORY, NULL));
CALLOC(mp, 1, sizeof(alpm_mountpoint_t), RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
mp->mount_dir = strdup(fsp->f_mntonname);
mp->mount_dir_len = strlen(mp->mount_dir);
memcpy(&(mp->fsp), fsp, sizeof(FSSTATSTYPE));
@@ -179,7 +179,7 @@ static int calculate_removed_size(alpm_handle_t *handle,
/* the addition of (divisor - 1) performs ceil() with integer division */
mp->blocks_needed -=
(st.st_size + mp->fsp.f_bsize - 1l) / mp->fsp.f_bsize;
(st.st_size + mp->fsp.f_bsize - 1) / mp->fsp.f_bsize;
mp->used |= USED_REMOVE;
}
@@ -211,7 +211,7 @@ static int calculate_installed_size(alpm_handle_t *handle,
/* approximate space requirements for db entries */
if(filename[0] == '.') {
filename = alpm_option_get_dbpath(handle);
filename = handle->dbpath;
}
snprintf(path, PATH_MAX, "%s%s", handle->root, filename);
@@ -225,7 +225,7 @@ static int calculate_installed_size(alpm_handle_t *handle,
/* the addition of (divisor - 1) performs ceil() with integer division */
mp->blocks_needed +=
(file->size + mp->fsp.f_bsize - 1l) / mp->fsp.f_bsize;
(file->size + mp->fsp.f_bsize - 1) / mp->fsp.f_bsize;
mp->used |= USED_INSTALL;
}
@@ -251,7 +251,8 @@ int _alpm_check_diskspace(alpm_handle_t *handle)
if(root_mp == NULL) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not determine root mount point %s\n"),
handle->root);
return -1;
error = 1;
goto finish;
}
replaces = alpm_list_count(trans->remove);
@@ -260,7 +261,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle)
for(targ = trans->remove; targ; targ = targ->next, current++) {
alpm_pkg_t *local_pkg;
int percent = (current * 100) / numtargs;
PROGRESS(trans, ALPM_TRANS_PROGRESS_DISKSPACE_START, "", percent,
PROGRESS(handle, ALPM_PROGRESS_DISKSPACE_START, "", percent,
numtargs, current);
local_pkg = targ->data;
@@ -271,7 +272,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle)
for(targ = trans->add; targ; targ = targ->next, current++) {
alpm_pkg_t *pkg, *local_pkg;
int percent = (current * 100) / numtargs;
PROGRESS(trans, ALPM_TRANS_PROGRESS_DISKSPACE_START, "", percent,
PROGRESS(handle, ALPM_PROGRESS_DISKSPACE_START, "", percent,
numtargs, current);
pkg = targ->data;
@@ -282,7 +283,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle)
}
calculate_installed_size(handle, mount_points, pkg);
for(i = mount_points; i; i = alpm_list_next(i)) {
for(i = mount_points; i; i = i->next) {
alpm_mountpoint_t *data = i->data;
if(data->blocks_needed > data->max_blocks_needed) {
data->max_blocks_needed = data->blocks_needed;
@@ -290,10 +291,10 @@ int _alpm_check_diskspace(alpm_handle_t *handle)
}
}
PROGRESS(trans, ALPM_TRANS_PROGRESS_DISKSPACE_START, "", 100,
PROGRESS(handle, ALPM_PROGRESS_DISKSPACE_START, "", 100,
numtargs, current);
for(i = mount_points; i; i = alpm_list_next(i)) {
for(i = mount_points; i; i = i->next) {
alpm_mountpoint_t *data = i->data;
if(data->used && data->read_only) {
_alpm_log(handle, ALPM_LOG_ERROR, _("Partition %s is mounted read only\n"),
@@ -301,24 +302,26 @@ int _alpm_check_diskspace(alpm_handle_t *handle)
error = 1;
} else if(data->used & USED_INSTALL) {
/* cushion is roughly min(5% capacity, 20MiB) */
long fivepc = ((long)data->fsp.f_blocks / 20) + 1;
long twentymb = (20 * 1024 * 1024 / (long)data->fsp.f_bsize) + 1;
long cushion = fivepc < twentymb ? fivepc : twentymb;
fsblkcnt_t fivepc = (data->fsp.f_blocks / 20) + 1;
fsblkcnt_t twentymb = (20 * 1024 * 1024 / data->fsp.f_bsize) + 1;
fsblkcnt_t cushion = fivepc < twentymb ? fivepc : twentymb;
blkcnt_t needed = data->max_blocks_needed + cushion;
_alpm_log(handle, ALPM_LOG_DEBUG, "partition %s, needed %ld, cushion %ld, free %ld\n",
data->mount_dir, data->max_blocks_needed, cushion,
(unsigned long)data->fsp.f_bfree);
if(data->max_blocks_needed + cushion >= 0 &&
(unsigned long)(data->max_blocks_needed + cushion) > data->fsp.f_bfree) {
_alpm_log(handle, ALPM_LOG_ERROR, _("Partition %s too full: %ld blocks needed, %ld blocks free\n"),
data->mount_dir, data->max_blocks_needed + cushion,
(unsigned long)data->fsp.f_bfree);
_alpm_log(handle, ALPM_LOG_DEBUG,
"partition %s, needed %jd, cushion %ju, free %ju\n",
data->mount_dir, (intmax_t)data->max_blocks_needed,
(uintmax_t)cushion, (uintmax_t)data->fsp.f_bfree);
if(needed >= 0 && (fsblkcnt_t)needed > data->fsp.f_bfree) {
_alpm_log(handle, ALPM_LOG_ERROR,
_("Partition %s too full: %jd blocks needed, %jd blocks free\n"),
data->mount_dir, (intmax_t)needed, (uintmax_t)data->fsp.f_bfree);
error = 1;
}
}
}
for(i = mount_points; i; i = alpm_list_next(i)) {
finish:
for(i = mount_points; i; i = i->next) {
alpm_mountpoint_t *data = i->data;
FREE(data->mount_dir);
}

View File

@@ -26,6 +26,9 @@
#if defined(HAVE_SYS_STATVFS_H)
#include <sys/statvfs.h>
#endif
#if defined(HAVE_SYS_TYPES_H)
#include <sys/types.h>
#endif
#include "alpm.h"
@@ -39,8 +42,8 @@ typedef struct __alpm_mountpoint_t {
char *mount_dir;
size_t mount_dir_len;
/* storage for additional disk usage calculations */
long blocks_needed;
long max_blocks_needed;
blkcnt_t blocks_needed;
blkcnt_t max_blocks_needed;
enum mount_used_level used;
int read_only;
FSSTATSTYPE fsp;

View File

@@ -43,7 +43,7 @@
#include "handle.h"
#ifdef HAVE_LIBCURL
static double prevprogress; /* last download amount */
static off_t prevprogress; /* last download amount */
static const char *get_filename(const char *url)
{
@@ -66,45 +66,54 @@ static char *get_fullpath(const char *path, const char *filename,
return filepath;
}
#define check_stop() if(dload_interrupted) { ret = -1; goto cleanup; }
enum sighandlers { OLD = 0, NEW = 1 };
enum {
ABORT_SIGINT = 1,
ABORT_OVER_MAXFILESIZE
};
static int dload_interrupted;
static void inthandler(int UNUSED signum)
{
dload_interrupted = 1;
dload_interrupted = ABORT_SIGINT;
}
static int curl_progress(void *file, double dltotal, double dlnow,
double UNUSED ultotal, double UNUSED ulnow)
{
struct dload_payload *payload = (struct dload_payload *)file;
double current_size, total_size;
off_t current_size, total_size;
/* SIGINT sent, abort by alerting curl */
if(dload_interrupted) {
return 1;
}
current_size = payload->initial_size + (off_t)dlnow;
/* is our filesize still under any set limit? */
if(payload->max_size && current_size > payload->max_size) {
dload_interrupted = ABORT_OVER_MAXFILESIZE;
return 1;
}
/* none of what follows matters if the front end has no callback */
if(payload->handle->dlcb == NULL) {
return 0;
}
current_size = payload->initial_size + dlnow;
total_size = payload->initial_size + dltotal;
total_size = payload->initial_size + (off_t)dltotal;
if(DOUBLE_EQ(dltotal, 0) || DOUBLE_EQ(prevprogress, total_size)) {
if(DOUBLE_EQ(dltotal, 0.0) || prevprogress == total_size) {
return 0;
}
/* initialize the progress bar here to avoid displaying it when
* a repo is up to date and nothing gets downloaded */
if(DOUBLE_EQ(prevprogress, 0)) {
payload->handle->dlcb(payload->filename, 0, (long)dltotal);
if(prevprogress == 0) {
payload->handle->dlcb(payload->remote_name, 0, (off_t)dltotal);
}
payload->handle->dlcb(payload->filename, (long)current_size, (long)total_size);
payload->handle->dlcb(payload->remote_name, current_size, total_size);
prevprogress = current_size;
@@ -114,7 +123,7 @@ static int curl_progress(void *file, double dltotal, double dlnow,
static int curl_gethost(const char *url, char *buffer)
{
size_t hostlen;
char *p;
char *p, *q;
if(strncmp(url, "file://", 7) == 0) {
strcpy(buffer, _("disk"));
@@ -125,6 +134,20 @@ static int curl_gethost(const char *url, char *buffer)
}
p += 2; /* jump over the found // */
hostlen = strcspn(p, "/");
/* there might be a user:pass@ on the URL. hide it. avoid using memrchr()
* for portability concerns. */
q = p + hostlen;
while(--q > p) {
if(*q == '@') {
break;
}
}
if(*q == '@' && p != q) {
hostlen -= q - p + 1;
p = q + 1;
}
if(hostlen > 255) {
/* buffer overflow imminent */
return 1;
@@ -169,7 +192,7 @@ static size_t parse_headers(void *ptr, size_t size, size_t nmemb, void *user)
endptr--;
}
STRNDUP(payload->cd_filename, fptr, endptr - fptr + 1,
STRNDUP(payload->content_disp_name, fptr, endptr - fptr + 1,
RET_ERR(payload->handle, ALPM_ERR_MEMORY, realsize));
}
}
@@ -177,65 +200,15 @@ static size_t parse_headers(void *ptr, size_t size, size_t nmemb, void *user)
return realsize;
}
static int curl_download_internal(struct dload_payload *payload,
const char *localpath, char **final_file)
static void curl_set_handle_opts(struct dload_payload *payload,
char *error_buffer)
{
int ret = -1, should_unlink = 0;
FILE *localf = NULL;
const char *useragent;
const char *open_mode = "wb";
char *destfile = NULL, *tempfile = NULL, *effective_url;
/* RFC1123 states applications should support this length */
char hostname[256];
char error_buffer[CURL_ERROR_SIZE];
struct stat st;
long timecond, remote_time = -1;
double remote_size, bytes_dl;
struct sigaction sig_pipe[2], sig_int[2];
/* shortcut to our handle within the payload */
alpm_handle_t *handle = payload->handle;
if(!payload->filename) {
payload->filename = get_filename(payload->fileurl);
}
if(!payload->filename || curl_gethost(payload->fileurl, hostname) != 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("url '%s' is invalid\n"), payload->fileurl);
RET_ERR(handle, ALPM_ERR_SERVER_BAD_URL, -1);
}
if(strlen(payload->filename) > 0 && strcmp(payload->filename, ".sig") != 0) {
destfile = get_fullpath(localpath, payload->filename, "");
tempfile = get_fullpath(localpath, payload->filename, ".part");
if(!destfile || !tempfile) {
goto cleanup;
}
} else {
/* URL isn't to a file and ended with a slash */
int fd;
char randpath[PATH_MAX];
/* we can't support resuming this kind of download, so a partial transfer
* will be destroyed */
should_unlink = 1;
/* create a random filename, which is opened with O_EXCL */
snprintf(randpath, PATH_MAX, "%salpmtmp.XXXXXX", localpath);
if((fd = mkstemp(randpath)) == -1 || !(localf = fdopen(fd, open_mode))) {
unlink(randpath);
close(fd);
_alpm_log(handle, ALPM_LOG_ERROR,
_("failed to create temporary file for download\n"));
goto cleanup;
}
/* localf now points to our alpmtmp.XXXXXX */
STRDUP(tempfile, randpath, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
payload->filename = strrchr(randpath, '/') + 1;
}
error_buffer[0] = '\0';
const char *useragent = getenv("HTTP_USER_AGENT");
struct stat st;
/* the curl_easy handle is initialized with the alpm handle, so we only need
* to reset the curl handle set parameters for each time it's used. */
* to reset the handle's parameters for each time it's used. */
curl_easy_reset(handle->curl);
curl_easy_setopt(handle->curl, CURLOPT_URL, payload->fileurl);
curl_easy_setopt(handle->curl, CURLOPT_FAILONERROR, 1L);
@@ -250,51 +223,144 @@ static int curl_download_internal(struct dload_payload *payload,
curl_easy_setopt(handle->curl, CURLOPT_LOW_SPEED_TIME, 10L);
curl_easy_setopt(handle->curl, CURLOPT_HEADERFUNCTION, parse_headers);
curl_easy_setopt(handle->curl, CURLOPT_WRITEHEADER, (void *)payload);
curl_easy_setopt(handle->curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
_alpm_log(handle, ALPM_LOG_DEBUG, "url: %s\n", payload->fileurl);
if(payload->max_size) {
curl_easy_setopt(handle->curl, CURLOPT_MAXFILESIZE, payload->max_size);
_alpm_log(handle, ALPM_LOG_DEBUG, "maxsize: %jd\n",
(intmax_t)payload->max_size);
curl_easy_setopt(handle->curl, CURLOPT_MAXFILESIZE_LARGE,
(curl_off_t)payload->max_size);
}
useragent = getenv("HTTP_USER_AGENT");
if(useragent != NULL) {
curl_easy_setopt(handle->curl, CURLOPT_USERAGENT, useragent);
}
if(!payload->allow_resume && !payload->force && stat(destfile, &st) == 0) {
if(!payload->allow_resume && !payload->force && payload->destfile_name &&
stat(payload->destfile_name, &st) == 0) {
/* start from scratch, but only download if our local is out of date. */
curl_easy_setopt(handle->curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE);
curl_easy_setopt(handle->curl, CURLOPT_TIMEVALUE, (long)st.st_mtime);
} else if(stat(tempfile, &st) == 0 && payload->allow_resume) {
_alpm_log(handle, ALPM_LOG_DEBUG,
"using time condition: %lu\n", (long)st.st_mtime);
} else if(stat(payload->tempfile_name, &st) == 0 && payload->allow_resume) {
/* a previous partial download exists, resume from end of file. */
open_mode = "ab";
curl_easy_setopt(handle->curl, CURLOPT_RESUME_FROM, (long)st.st_size);
_alpm_log(handle, ALPM_LOG_DEBUG, "tempfile found, attempting continuation\n");
payload->initial_size = (double)st.st_size;
payload->tempfile_openmode = "ab";
curl_easy_setopt(handle->curl, CURLOPT_RESUME_FROM_LARGE,
(curl_off_t)st.st_size);
_alpm_log(handle, ALPM_LOG_DEBUG,
"tempfile found, attempting continuation from %jd bytes\n",
(intmax_t)st.st_size);
payload->initial_size = st.st_size;
}
}
static void mask_signal(int signal, void (*handler)(int),
struct sigaction *origaction)
{
struct sigaction newaction;
newaction.sa_handler = handler;
sigemptyset(&newaction.sa_mask);
newaction.sa_flags = 0;
sigaction(signal, NULL, origaction);
sigaction(signal, &newaction, NULL);
}
static void unmask_signal(int signal, struct sigaction sa)
{
sigaction(signal, &sa, NULL);
}
static FILE *create_tempfile(struct dload_payload *payload, const char *localpath)
{
int fd;
FILE *fp;
char randpath[PATH_MAX];
alpm_handle_t *handle = payload->handle;
/* create a random filename, which is opened with O_EXCL */
snprintf(randpath, PATH_MAX, "%salpmtmp.XXXXXX", localpath);
if((fd = mkstemp(randpath)) == -1 ||
!(fp = fdopen(fd, payload->tempfile_openmode))) {
unlink(randpath);
close(fd);
_alpm_log(handle, ALPM_LOG_ERROR,
_("failed to create temporary file for download\n"));
return NULL;
}
/* fp now points to our alpmtmp.XXXXXX */
STRDUP(payload->tempfile_name, randpath, RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
payload->remote_name = strrchr(randpath, '/') + 1;
return fp;
}
static int curl_download_internal(struct dload_payload *payload,
const char *localpath, char **final_file)
{
int ret = -1;
FILE *localf = NULL;
char *effective_url;
/* RFC1123 states applications should support this length */
char hostname[256];
char error_buffer[CURL_ERROR_SIZE] = {0};
struct stat st;
long timecond, respcode = 0, remote_time = -1;
double remote_size, bytes_dl;
struct sigaction orig_sig_pipe, orig_sig_int;
/* shortcut to our handle within the payload */
alpm_handle_t *handle = payload->handle;
handle->pm_errno = 0;
payload->tempfile_openmode = "wb";
if(!payload->remote_name) {
payload->remote_name = get_filename(payload->fileurl);
}
if(!payload->remote_name || curl_gethost(payload->fileurl, hostname) != 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("url '%s' is invalid\n"), payload->fileurl);
RET_ERR(handle, ALPM_ERR_SERVER_BAD_URL, -1);
}
if(localf == NULL) {
localf = fopen(tempfile, open_mode);
if(strlen(payload->remote_name) > 0 && strcmp(payload->remote_name, ".sig") != 0) {
payload->destfile_name = get_fullpath(localpath, payload->remote_name, "");
payload->tempfile_name = get_fullpath(localpath, payload->remote_name, ".part");
if(!payload->destfile_name || !payload->tempfile_name) {
goto cleanup;
}
} else {
/* URL doesn't contain a filename, so make a tempfile. We can't support
* resuming this kind of download; partial transfers will be destroyed */
payload->unlink_on_fail = 1;
localf = create_tempfile(payload, localpath);
if(localf == NULL) {
goto cleanup;
}
}
curl_set_handle_opts(payload, error_buffer);
if(localf == NULL) {
localf = fopen(payload->tempfile_name, payload->tempfile_openmode);
if(localf == NULL) {
goto cleanup;
}
}
_alpm_log(handle, ALPM_LOG_DEBUG,
"opened tempfile for download: %s (%s)\n", payload->tempfile_name,
payload->tempfile_openmode);
curl_easy_setopt(handle->curl, CURLOPT_WRITEDATA, localf);
/* ignore any SIGPIPE signals- these may occur if our FTP socket dies or
* something along those lines. Store the old signal handler first. */
sig_pipe[NEW].sa_handler = SIG_IGN;
sigemptyset(&sig_pipe[NEW].sa_mask);
sig_pipe[NEW].sa_flags = 0;
sigaction(SIGPIPE, NULL, &sig_pipe[OLD]);
sigaction(SIGPIPE, &sig_pipe[NEW], NULL);
dload_interrupted = 0;
sig_int[NEW].sa_handler = &inthandler;
sigemptyset(&sig_int[NEW].sa_mask);
sig_int[NEW].sa_flags = 0;
sigaction(SIGINT, NULL, &sig_int[OLD]);
sigaction(SIGINT, &sig_int[NEW], NULL);
mask_signal(SIGPIPE, SIG_IGN, &orig_sig_pipe);
mask_signal(SIGINT, &inthandler, &orig_sig_int);
/* Progress 0 - initialize */
prevprogress = 0;
@@ -306,19 +372,42 @@ static int curl_download_internal(struct dload_payload *payload,
curl_easy_setopt(handle->curl, CURLOPT_NOPROGRESS, 1L);
/* was it a success? */
if(handle->curlerr == CURLE_ABORTED_BY_CALLBACK) {
goto cleanup;
} else if(handle->curlerr != CURLE_OK) {
if(!payload->errors_ok) {
handle->pm_errno = ALPM_ERR_LIBCURL;
_alpm_log(handle, ALPM_LOG_ERROR, _("failed retrieving file '%s' from %s : %s\n"),
payload->filename, hostname, error_buffer);
} else {
_alpm_log(handle, ALPM_LOG_DEBUG, "failed retrieving file '%s' from %s : %s\n",
payload->filename, hostname, error_buffer);
}
unlink(tempfile);
goto cleanup;
switch(handle->curlerr) {
case CURLE_OK:
/* get http/ftp response code */
curl_easy_getinfo(handle->curl, CURLINFO_RESPONSE_CODE, &respcode);
if(respcode >=400) {
payload->unlink_on_fail = 1;
goto cleanup;
}
break;
case CURLE_ABORTED_BY_CALLBACK:
/* handle the interrupt accordingly */
if(dload_interrupted == ABORT_OVER_MAXFILESIZE) {
handle->curlerr = CURLE_FILESIZE_EXCEEDED;
handle->pm_errno = ALPM_ERR_LIBCURL;
/* the hardcoded 'size exceeded' message is same as libcurl's normal */
_alpm_log(handle, ALPM_LOG_ERROR,
_("failed retrieving file '%s' from %s : %s\n"),
payload->remote_name, hostname, "Maximum file size exceeded");
}
goto cleanup;
default:
/* delete zero length downloads */
if(stat(payload->tempfile_name, &st) == 0 && st.st_size == 0) {
payload->unlink_on_fail = 1;
}
if(!payload->errors_ok) {
handle->pm_errno = ALPM_ERR_LIBCURL;
_alpm_log(handle, ALPM_LOG_ERROR,
_("failed retrieving file '%s' from %s : %s\n"),
payload->remote_name, hostname, error_buffer);
} else {
_alpm_log(handle, ALPM_LOG_DEBUG,
"failed retrieving file '%s' from %s : %s\n",
payload->remote_name, hostname, error_buffer);
}
goto cleanup;
}
/* retrieve info about the state of the transfer */
@@ -331,8 +420,9 @@ static int curl_download_internal(struct dload_payload *payload,
/* time condition was met and we didn't download anything. we need to
* clean up the 0 byte .part file that's left behind. */
if(timecond == 1 && DOUBLE_EQ(bytes_dl, 0)) {
_alpm_log(handle, ALPM_LOG_DEBUG, "file met time condition\n");
ret = 1;
unlink(tempfile);
unlink(payload->tempfile_name);
goto cleanup;
}
@@ -343,26 +433,27 @@ static int curl_download_internal(struct dload_payload *payload,
!DOUBLE_EQ(bytes_dl, remote_size)) {
handle->pm_errno = ALPM_ERR_RETRIEVE;
_alpm_log(handle, ALPM_LOG_ERROR, _("%s appears to be truncated: %jd/%jd bytes\n"),
payload->filename, (intmax_t)bytes_dl, (intmax_t)remote_size);
payload->remote_name, (intmax_t)bytes_dl, (intmax_t)remote_size);
goto cleanup;
}
if(payload->cd_filename) {
if(payload->content_disp_name) {
/* content-disposition header has a better name for our file */
free(destfile);
destfile = get_fullpath(localpath, payload->cd_filename, "");
free(payload->destfile_name);
payload->destfile_name = get_fullpath(localpath, payload->content_disp_name, "");
} else {
const char *effective_filename = strrchr(effective_url, '/');
if(effective_filename) {
if(effective_filename && strlen(effective_filename) > 2) {
effective_filename++;
/* if destfile was never set, we wrote to a tempfile. even if destfile is
* set, we may have followed some redirects and the effective url may
* have a better suggestion as to what to name our file. in either case,
* refactor destfile to this newly derived name. */
if(!destfile || strcmp(effective_filename, strrchr(destfile, '/') + 1) != 0) {
free(destfile);
destfile = get_fullpath(localpath, effective_filename, "");
if(!payload->destfile_name || strcmp(effective_filename,
strrchr(payload->destfile_name, '/') + 1) != 0) {
free(payload->destfile_name);
payload->destfile_name = get_fullpath(localpath, effective_filename, "");
}
}
}
@@ -372,29 +463,33 @@ static int curl_download_internal(struct dload_payload *payload,
cleanup:
if(localf != NULL) {
fclose(localf);
utimes_long(tempfile, remote_time);
utimes_long(payload->tempfile_name, remote_time);
}
if(ret == 0) {
if(rename(tempfile, destfile)) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not rename %s to %s (%s)\n"),
tempfile, destfile, strerror(errno));
ret = -1;
} else if(final_file) {
*final_file = strdup(strrchr(destfile, '/') + 1);
const char *realname = payload->tempfile_name;
if(payload->destfile_name) {
realname = payload->destfile_name;
if(rename(payload->tempfile_name, payload->destfile_name)) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not rename %s to %s (%s)\n"),
payload->tempfile_name, payload->destfile_name, strerror(errno));
ret = -1;
}
}
if(ret != -1 && final_file) {
STRDUP(*final_file, strrchr(realname, '/') + 1,
RET_ERR(handle, ALPM_ERR_MEMORY, -1));
}
}
if(dload_interrupted && should_unlink) {
unlink(tempfile);
if((ret == -1 || dload_interrupted) && payload->unlink_on_fail &&
payload->tempfile_name) {
unlink(payload->tempfile_name);
}
FREE(tempfile);
FREE(destfile);
/* restore the old signal handlers */
sigaction(SIGINT, &sig_int[OLD], NULL);
sigaction(SIGPIPE, &sig_pipe[OLD], NULL);
unmask_signal(SIGINT, orig_sig_int);
unmask_signal(SIGPIPE, orig_sig_pipe);
/* if we were interrupted, trip the old handler */
if(dload_interrupted) {
raise(SIGINT);
@@ -441,13 +536,14 @@ char SYMEXPORT *alpm_fetch_pkgurl(alpm_handle_t *handle, const char *url)
int ret;
CHECK_HANDLE(handle, return NULL);
ASSERT(url, RET_ERR(handle, ALPM_ERR_WRONG_ARGS, NULL));
/* find a valid cache dir to download to */
cachedir = _alpm_filecache_setup(handle);
CALLOC(payload, 1, sizeof(*payload), RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
payload->handle = handle;
payload->fileurl = strdup(url);
STRDUP(payload->fileurl, url, RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
payload->allow_resume = 1;
/* download the file */
@@ -496,8 +592,11 @@ void _alpm_dload_payload_free(struct dload_payload *payload) {
ASSERT(payload, return);
FREE(payload->fileurl);
FREE(payload->cd_filename);
FREE(payload->content_disp_name);
FREE(payload->tempfile_name);
FREE(payload->destfile_name);
FREE(payload);
}
/* vim: set ts=2 sw=2 noet: */

View File

@@ -27,14 +27,18 @@
struct dload_payload {
alpm_handle_t *handle;
const char *filename;
char *cd_filename;
const char *remote_name;
const char *tempfile_openmode;
char *tempfile_name;
char *destfile_name;
char *content_disp_name;
char *fileurl;
double initial_size;
long max_size;
off_t initial_size;
off_t max_size;
int force;
int allow_resume;
int errors_ok;
int unlink_on_fail;
};
void _alpm_dload_payload_free(struct dload_payload *payload);

View File

@@ -39,17 +39,12 @@
#include "trans.h"
#include "alpm.h"
alpm_handle_t *_alpm_handle_new()
alpm_handle_t *_alpm_handle_new(void)
{
alpm_handle_t *handle;
CALLOC(handle, 1, sizeof(alpm_handle_t), return NULL);
#ifdef HAVE_LIBGPGME
handle->siglevel = ALPM_SIG_PACKAGE | ALPM_SIG_PACKAGE_OPTIONAL |
ALPM_SIG_DATABASE | ALPM_SIG_DATABASE_OPTIONAL;
#endif
return handle;
}
@@ -115,7 +110,7 @@ int _alpm_handle_lock(alpm_handle_t *handle)
do {
fd = open(handle->lockfile, O_WRONLY | O_CREAT | O_EXCL, 0000);
} while(fd == -1 && errno == EINTR);
if(fd > 0) {
if(fd >= 0) {
FILE *f = fdopen(fd, "w");
fprintf(f, "%ld\n", (long)getpid());
fflush(f);
@@ -132,10 +127,9 @@ int _alpm_handle_unlock(alpm_handle_t *handle)
ASSERT(handle->lockfile != NULL, return -1);
ASSERT(handle->lckstream != NULL, return 0);
if(handle->lckstream != NULL) {
fclose(handle->lckstream);
handle->lckstream = NULL;
}
fclose(handle->lckstream);
handle->lckstream = NULL;
if(unlink(handle->lockfile) && errno != ENOENT) {
return -1;
}
@@ -167,6 +161,24 @@ alpm_cb_totaldl SYMEXPORT alpm_option_get_totaldlcb(alpm_handle_t *handle)
return handle->totaldlcb;
}
alpm_cb_event SYMEXPORT alpm_option_get_eventcb(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->eventcb;
}
alpm_cb_question SYMEXPORT alpm_option_get_questioncb(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->questioncb;
}
alpm_cb_progress SYMEXPORT alpm_option_get_progresscb(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
return handle->progresscb;
}
const char SYMEXPORT *alpm_option_get_root(alpm_handle_t *handle)
{
CHECK_HANDLE(handle, return NULL);
@@ -291,6 +303,27 @@ int SYMEXPORT alpm_option_set_totaldlcb(alpm_handle_t *handle, alpm_cb_totaldl c
return 0;
}
int SYMEXPORT alpm_option_set_eventcb(alpm_handle_t *handle, alpm_cb_event cb)
{
CHECK_HANDLE(handle, return -1);
handle->eventcb = cb;
return 0;
}
int SYMEXPORT alpm_option_set_questioncb(alpm_handle_t *handle, alpm_cb_question cb)
{
CHECK_HANDLE(handle, return -1);
handle->questioncb = cb;
return 0;
}
int SYMEXPORT alpm_option_set_progresscb(alpm_handle_t *handle, alpm_cb_progress cb)
{
CHECK_HANDLE(handle, return -1);
handle->progresscb = cb;
return 0;
}
static char *canonicalize_path(const char *path) {
char *new_path;
size_t len;

View File

@@ -30,6 +30,25 @@
#include <curl/curl.h>
#endif
#define EVENT(h, e, d1, d2) \
do { \
if((h)->eventcb) { \
(h)->eventcb(e, d1, d2); \
} \
} while(0)
#define QUESTION(h, q, d1, d2, d3, r) \
do { \
if((h)->questioncb) { \
(h)->questioncb(q, d1, d2, d3, r); \
} \
} while(0)
#define PROGRESS(h, e, p, per, n, r) \
do { \
if((h)->progresscb) { \
(h)->progresscb(e, p, per, n, r); \
} \
} while(0)
struct __alpm_handle_t {
/* internal usage */
alpm_db_t *db_local; /* local db pointer */
@@ -48,7 +67,10 @@ struct __alpm_handle_t {
alpm_cb_log logcb; /* Log callback function */
alpm_cb_download dlcb; /* Download callback function */
alpm_cb_totaldl totaldlcb; /* Total download callback function */
alpm_cb_fetch fetchcb; /* Download file callback function */
alpm_cb_fetch fetchcb; /* Download file callback function */
alpm_cb_event eventcb;
alpm_cb_question questioncb;
alpm_cb_progress progresscb;
/* filesystem paths */
char *root; /* Root path, default '/' */

View File

@@ -1,7 +1,12 @@
/*
* RFC 1321 compliant MD5 implementation
*
* Copyright (C) 2006-2007 Christophe Devine
* Copyright (C) 2006-2010, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,29 +29,19 @@
/*
* Pacman Notes:
*
* Taken from the XySSL project at www.xyssl.org under terms of the
* GPL. This is from version 0.9 of the library, and has been modified
* Taken from the PolarSSL project at http://polarssl.org under terms of the
* GPL. This is from version 1.0.0 of the library, and has been modified
* as following, which may be helpful for future updates:
* * remove "xyssl/config.h" include
* * change include from "xyssl/md5.h" to "md5.h"
* * remove "polarssl/config.h" include
* * change include from "polarssl/sha2.h" to "sha2.h"
* * removal of HMAC code
* * removal of SELF_TEST code
* * removal of ipad and opad from the md5_context struct in md5.h
* * change of md5_file prototype from
* int md5_file( char *path, unsigned char *output )
* to
* int md5_file( const char *path, unsigned char *output )
* * use a dynamically-allocated buffer in md5_file, and increase the size
* for performance reasons
* * various static/inline changes
*
* NOTE: XySSL has been renamed to PolarSSL, which is available at
* www.polarssl.org. If we update, we should get it from there.
* * removal of ipad and opad from the md5_context struct in sha2.h
* * increase the size of buffer for performance reasons
* * various static changes
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "md5.h"
@@ -76,7 +71,7 @@
/*
* MD5 context setup
*/
static inline void md5_starts( md5_context *ctx )
static void md5_starts( md5_context *ctx )
{
ctx->total[0] = 0;
ctx->total[1] = 0;
@@ -87,7 +82,7 @@ static inline void md5_starts( md5_context *ctx )
ctx->state[3] = 0x10325476;
}
static inline void md5_process( md5_context *ctx, unsigned char data[64] )
static void md5_process( md5_context *ctx, const unsigned char data[64] )
{
unsigned long X[16], A, B, C, D;
@@ -161,7 +156,7 @@ static inline void md5_process( md5_context *ctx, unsigned char data[64] )
P( B, C, D, A, 12, 20, 0x8D2A4C8A );
#undef F
#define F(x,y,z) (x ^ y ^ z)
P( A, B, C, D, 5, 4, 0xFFFA3942 );
@@ -213,9 +208,9 @@ static inline void md5_process( md5_context *ctx, unsigned char data[64] )
/*
* MD5 process buffer
*/
static inline void md5_update( md5_context *ctx, unsigned char *input, int ilen )
static void md5_update( md5_context *ctx, const unsigned char *input, size_t ilen )
{
int fill;
size_t fill;
unsigned long left;
if( ilen <= 0 )
@@ -224,7 +219,7 @@ static inline void md5_update( md5_context *ctx, unsigned char *input, int ilen
left = ctx->total[0] & 0x3F;
fill = 64 - left;
ctx->total[0] += ilen;
ctx->total[0] += (unsigned long) ilen;
ctx->total[0] &= 0xFFFFFFFF;
if( ctx->total[0] < (unsigned long) ilen )
@@ -254,7 +249,7 @@ static inline void md5_update( md5_context *ctx, unsigned char *input, int ilen
}
}
static unsigned char md5_padding[64] =
static const unsigned char md5_padding[64] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -265,7 +260,7 @@ static unsigned char md5_padding[64] =
/*
* MD5 final digest
*/
static inline void md5_finish( md5_context *ctx, unsigned char output[16] )
static void md5_finish( md5_context *ctx, unsigned char output[16] )
{
unsigned long last, padn;
unsigned long high, low;
@@ -293,7 +288,7 @@ static inline void md5_finish( md5_context *ctx, unsigned char output[16] )
/*
* output = MD5( input buffer )
*/
void md5( unsigned char *input, int ilen, unsigned char output[16] )
void md5( const unsigned char *input, size_t ilen, unsigned char output[16] )
{
md5_context ctx;
@@ -312,25 +307,19 @@ int md5_file( const char *path, unsigned char output[16] )
FILE *f;
size_t n;
md5_context ctx;
unsigned char *buf;
unsigned char buf[4096];
if( ( buf = calloc(8192, sizeof(unsigned char)) ) == NULL )
if( ( f = fopen( path, "rb" ) ) == NULL )
return( 1 );
if( ( f = fopen( path, "rb" ) ) == NULL ) {
free( buf );
return( 1 );
}
md5_starts( &ctx );
while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
md5_update( &ctx, buf, (int) n );
md5_update( &ctx, buf, n );
md5_finish( &ctx, output );
memset( &ctx, 0, sizeof( md5_context ) );
free( buf );
if( ferror( f ) != 0 )
{

View File

@@ -1,7 +1,12 @@
/*
* RFC 1321 compliant MD5 implementation
*
* Copyright (C) 2006-2007 Christophe Devine
* Copyright (C) 2006-2010, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,10 +21,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MD5_H
#define _MD5_H
#include <string.h>
/**
* \brief MD5 context structure
*/
@@ -38,7 +44,7 @@ md5_context;
* \param ilen length of the input data
* \param output MD5 checksum result
*/
void md5( unsigned char *input, int ilen, unsigned char output[16] );
void md5( const unsigned char *input, size_t ilen, unsigned char output[16] );
/**
* \brief Output = MD5( file contents )

View File

@@ -67,9 +67,9 @@ int SYMEXPORT alpm_pkg_checkmd5sum(alpm_pkg_t *pkg)
ASSERT(pkg->origin == PKG_FROM_SYNCDB,
RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1));
fpath = _alpm_filecache_find(pkg->handle, alpm_pkg_get_filename(pkg));
fpath = _alpm_filecache_find(pkg->handle, pkg->filename);
retval = _alpm_test_md5sum(fpath, alpm_pkg_get_md5sum(pkg));
retval = _alpm_test_checksum(fpath, pkg->md5sum, ALPM_CSUM_MD5);
if(retval == 0) {
return 0;
@@ -85,15 +85,12 @@ int SYMEXPORT alpm_pkg_checkmd5sum(alpm_pkg_t *pkg)
* backend logic that needs lazy access, such as the local database through
* a lazy-load cache. However, the defaults will work just fine for fully-
* populated package structures. */
static const char *_pkg_get_filename(alpm_pkg_t *pkg) { return pkg->filename; }
static const char *_pkg_get_desc(alpm_pkg_t *pkg) { return pkg->desc; }
static const char *_pkg_get_url(alpm_pkg_t *pkg) { return pkg->url; }
static time_t _pkg_get_builddate(alpm_pkg_t *pkg) { return pkg->builddate; }
static time_t _pkg_get_installdate(alpm_pkg_t *pkg) { return pkg->installdate; }
static const char *_pkg_get_packager(alpm_pkg_t *pkg) { return pkg->packager; }
static const char *_pkg_get_md5sum(alpm_pkg_t *pkg) { return pkg->md5sum; }
static const char *_pkg_get_arch(alpm_pkg_t *pkg) { return pkg->arch; }
static off_t _pkg_get_size(alpm_pkg_t *pkg) { return pkg->size; }
static off_t _pkg_get_isize(alpm_pkg_t *pkg) { return pkg->isize; }
static alpm_pkgreason_t _pkg_get_reason(alpm_pkg_t *pkg) { return pkg->reason; }
static int _pkg_has_scriptlet(alpm_pkg_t *pkg) { return pkg->scriptlet; }
@@ -105,7 +102,6 @@ static alpm_list_t *_pkg_get_optdepends(alpm_pkg_t *pkg) { return pkg->optdepend
static alpm_list_t *_pkg_get_conflicts(alpm_pkg_t *pkg) { return pkg->conflicts; }
static alpm_list_t *_pkg_get_provides(alpm_pkg_t *pkg) { return pkg->provides; }
static alpm_list_t *_pkg_get_replaces(alpm_pkg_t *pkg) { return pkg->replaces; }
static alpm_list_t *_pkg_get_deltas(alpm_pkg_t *pkg) { return pkg->deltas; }
static alpm_filelist_t *_pkg_get_files(alpm_pkg_t *pkg) { return &(pkg->files); }
static alpm_list_t *_pkg_get_backup(alpm_pkg_t *pkg) { return pkg->backup; }
@@ -115,7 +111,7 @@ static void *_pkg_changelog_open(alpm_pkg_t UNUSED *pkg)
}
static size_t _pkg_changelog_read(void UNUSED *ptr, size_t UNUSED size,
const alpm_pkg_t UNUSED *pkg, const UNUSED void *fp)
const alpm_pkg_t UNUSED *pkg, UNUSED void *fp)
{
return 0;
}
@@ -132,15 +128,12 @@ static int _pkg_force_load(alpm_pkg_t UNUSED *pkg) { return 0; }
* struct itself with no abstraction layer or any type of lazy loading.
*/
struct pkg_operations default_pkg_ops = {
.get_filename = _pkg_get_filename,
.get_desc = _pkg_get_desc,
.get_url = _pkg_get_url,
.get_builddate = _pkg_get_builddate,
.get_installdate = _pkg_get_installdate,
.get_packager = _pkg_get_packager,
.get_md5sum = _pkg_get_md5sum,
.get_arch = _pkg_get_arch,
.get_size = _pkg_get_size,
.get_isize = _pkg_get_isize,
.get_reason = _pkg_get_reason,
.has_scriptlet = _pkg_has_scriptlet,
@@ -152,7 +145,6 @@ struct pkg_operations default_pkg_ops = {
.get_conflicts = _pkg_get_conflicts,
.get_provides = _pkg_get_provides,
.get_replaces = _pkg_get_replaces,
.get_deltas = _pkg_get_deltas,
.get_files = _pkg_get_files,
.get_backup = _pkg_get_backup,
@@ -170,7 +162,7 @@ const char SYMEXPORT *alpm_pkg_get_filename(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return NULL);
pkg->handle->pm_errno = 0;
return pkg->ops->get_filename(pkg);
return pkg->filename;
}
const char SYMEXPORT *alpm_pkg_get_name(alpm_pkg_t *pkg)
@@ -187,6 +179,13 @@ const char SYMEXPORT *alpm_pkg_get_version(alpm_pkg_t *pkg)
return pkg->version;
}
alpm_pkgfrom_t SYMEXPORT alpm_pkg_get_origin(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return -1);
pkg->handle->pm_errno = 0;
return pkg->origin;
}
const char SYMEXPORT *alpm_pkg_get_desc(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return NULL);
@@ -226,7 +225,21 @@ const char SYMEXPORT *alpm_pkg_get_md5sum(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return NULL);
pkg->handle->pm_errno = 0;
return pkg->ops->get_md5sum(pkg);
return pkg->md5sum;
}
const char SYMEXPORT *alpm_pkg_get_sha256sum(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return NULL);
pkg->handle->pm_errno = 0;
return pkg->sha256sum;
}
const char SYMEXPORT *alpm_pkg_get_base64_sig(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return NULL);
pkg->handle->pm_errno = 0;
return pkg->base64_sig;
}
const char SYMEXPORT *alpm_pkg_get_arch(alpm_pkg_t *pkg)
@@ -240,7 +253,7 @@ off_t SYMEXPORT alpm_pkg_get_size(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return -1);
pkg->handle->pm_errno = 0;
return pkg->ops->get_size(pkg);
return pkg->size;
}
off_t SYMEXPORT alpm_pkg_get_isize(alpm_pkg_t *pkg)
@@ -310,7 +323,7 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_deltas(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return NULL);
pkg->handle->pm_errno = 0;
return pkg->ops->get_deltas(pkg);
return pkg->deltas;
}
alpm_filelist_t SYMEXPORT *alpm_pkg_get_files(alpm_pkg_t *pkg)
@@ -347,20 +360,13 @@ void SYMEXPORT *alpm_pkg_changelog_open(alpm_pkg_t *pkg)
/** Read data from an open changelog 'file stream'. */
size_t SYMEXPORT alpm_pkg_changelog_read(void *ptr, size_t size,
const alpm_pkg_t *pkg, const void *fp)
const alpm_pkg_t *pkg, void *fp)
{
ASSERT(pkg != NULL, return 0);
pkg->handle->pm_errno = 0;
return pkg->ops->changelog_read(ptr, size, pkg, fp);
}
/*
int SYMEXPORT alpm_pkg_changelog_feof(const alpm_pkg_t *pkg, void *fp)
{
return pkg->ops->changelog_feof(pkg, fp);
}
*/
/** Close a package changelog for reading. */
int SYMEXPORT alpm_pkg_changelog_close(const alpm_pkg_t *pkg, void *fp)
{
@@ -412,7 +418,7 @@ alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(alpm_pkg_t *pkg)
/* We have a DB package. if it is a local package, then we should
* only search the local DB; else search all known sync databases. */
db = pkg->origin_data.db;
if(db->is_local) {
if(db->status & DB_STATUS_LOCAL) {
find_requiredby(pkg, db, &reqs);
} else {
for(i = pkg->handle->dbs_sync; i; i = i->next) {
@@ -455,13 +461,32 @@ alpm_pkg_t *_alpm_pkg_new(void)
return pkg;
}
alpm_pkg_t *_alpm_pkg_dup(alpm_pkg_t *pkg)
/**
* Duplicate a package data struct.
* @param pkg the package to duplicate
* @param new_ptr location to store duplicated package pointer
* @return 0 on success, -1 on fatal error, 1 on non-fatal error
*/
int _alpm_pkg_dup(alpm_pkg_t *pkg, alpm_pkg_t **new_ptr)
{
alpm_pkg_t *newpkg;
alpm_list_t *i;
int ret = 0;
if(!pkg || !pkg->handle) {
return -1;
}
if(!new_ptr) {
RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1);
}
if(pkg->ops->force_load(pkg)) {
return NULL;
_alpm_log(pkg->handle, ALPM_LOG_WARNING,
_("could not fully load metadata for package %s-%s\n"),
pkg->name, pkg->version);
ret = 1;
pkg->handle->pm_errno = ALPM_ERR_PKG_INVALID;
}
CALLOC(newpkg, 1, sizeof(alpm_pkg_t), goto cleanup);
@@ -476,6 +501,7 @@ alpm_pkg_t *_alpm_pkg_dup(alpm_pkg_t *pkg)
newpkg->installdate = pkg->installdate;
STRDUP(newpkg->packager, pkg->packager, goto cleanup);
STRDUP(newpkg->md5sum, pkg->md5sum, goto cleanup);
STRDUP(newpkg->sha256sum, pkg->md5sum, goto cleanup);
STRDUP(newpkg->arch, pkg->arch, goto cleanup);
newpkg->size = pkg->size;
newpkg->isize = pkg->isize;
@@ -483,7 +509,9 @@ alpm_pkg_t *_alpm_pkg_dup(alpm_pkg_t *pkg)
newpkg->reason = pkg->reason;
newpkg->licenses = alpm_list_strdup(pkg->licenses);
newpkg->replaces = alpm_list_strdup(pkg->replaces);
for(i = pkg->replaces; i; i = i->next) {
newpkg->replaces = alpm_list_add(newpkg->replaces, _alpm_dep_dup(i->data));
}
newpkg->groups = alpm_list_strdup(pkg->groups);
if(pkg->files.count) {
size_t filenum;
@@ -497,16 +525,20 @@ alpm_pkg_t *_alpm_pkg_dup(alpm_pkg_t *pkg)
}
newpkg->files.count = pkg->files.count;
}
for(i = pkg->backup; i; i = alpm_list_next(i)) {
for(i = pkg->backup; i; i = i->next) {
newpkg->backup = alpm_list_add(newpkg->backup, _alpm_backup_dup(i->data));
}
for(i = pkg->depends; i; i = alpm_list_next(i)) {
for(i = pkg->depends; i; i = i->next) {
newpkg->depends = alpm_list_add(newpkg->depends, _alpm_dep_dup(i->data));
}
newpkg->optdepends = alpm_list_strdup(pkg->optdepends);
newpkg->conflicts = alpm_list_strdup(pkg->conflicts);
newpkg->provides = alpm_list_strdup(pkg->provides);
for(i = pkg->deltas; i; i = alpm_list_next(i)) {
for(i = pkg->conflicts; i; i = i->next) {
newpkg->conflicts = alpm_list_add(newpkg->conflicts, _alpm_dep_dup(i->data));
}
for(i = pkg->provides; i; i = i->next) {
newpkg->provides = alpm_list_add(newpkg->provides, _alpm_dep_dup(i->data));
}
for(i = pkg->deltas; i; i = i->next) {
newpkg->deltas = alpm_list_add(newpkg->deltas, _alpm_delta_dup(i->data));
}
@@ -521,11 +553,12 @@ alpm_pkg_t *_alpm_pkg_dup(alpm_pkg_t *pkg)
newpkg->ops = pkg->ops;
newpkg->handle = pkg->handle;
return newpkg;
*new_ptr = newpkg;
return ret;
cleanup:
_alpm_pkg_free(newpkg);
return NULL;
RET_ERR(pkg->handle, ALPM_ERR_MEMORY, -1);
}
void _alpm_pkg_free(alpm_pkg_t *pkg)
@@ -541,10 +574,13 @@ void _alpm_pkg_free(alpm_pkg_t *pkg)
FREE(pkg->url);
FREE(pkg->packager);
FREE(pkg->md5sum);
FREE(pkg->sha256sum);
FREE(pkg->base64_sig);
FREE(pkg->arch);
FREELIST(pkg->licenses);
FREELIST(pkg->replaces);
alpm_list_free_inner(pkg->replaces, (alpm_list_fn_free)_alpm_dep_free);
alpm_list_free(pkg->replaces);
FREELIST(pkg->groups);
if(pkg->files.count) {
size_t i;
@@ -558,8 +594,10 @@ void _alpm_pkg_free(alpm_pkg_t *pkg)
alpm_list_free_inner(pkg->depends, (alpm_list_fn_free)_alpm_dep_free);
alpm_list_free(pkg->depends);
FREELIST(pkg->optdepends);
FREELIST(pkg->conflicts);
FREELIST(pkg->provides);
alpm_list_free_inner(pkg->conflicts, (alpm_list_fn_free)_alpm_dep_free);
alpm_list_free(pkg->conflicts);
alpm_list_free_inner(pkg->provides, (alpm_list_fn_free)_alpm_dep_free);
alpm_list_free(pkg->provides);
alpm_list_free_inner(pkg->deltas, (alpm_list_fn_free)_alpm_delta_free);
alpm_list_free(pkg->deltas);
alpm_list_free(pkg->delta_path);
@@ -594,8 +632,7 @@ void _alpm_pkg_free_trans(alpm_pkg_t *pkg)
/* Is spkg an upgrade for localpkg? */
int _alpm_pkg_compare_versions(alpm_pkg_t *spkg, alpm_pkg_t *localpkg)
{
return alpm_pkg_vercmp(alpm_pkg_get_version(spkg),
alpm_pkg_get_version(localpkg));
return alpm_pkg_vercmp(spkg->version, localpkg->version);
}
/* Helper function for comparing packages
@@ -653,13 +690,13 @@ int _alpm_pkg_should_ignore(alpm_handle_t *handle, alpm_pkg_t *pkg)
alpm_list_t *groups = NULL;
/* first see if the package is ignored */
if(alpm_list_find_str(handle->ignorepkg, alpm_pkg_get_name(pkg))) {
if(alpm_list_find_str(handle->ignorepkg, pkg->name)) {
return 1;
}
/* next see if the package is in a group that is ignored */
for(groups = handle->ignoregroup; groups; groups = alpm_list_next(groups)) {
char *grp = (char *)alpm_list_getdata(groups);
for(groups = handle->ignoregroup; groups; groups = groups->next) {
char *grp = groups->data;
if(alpm_list_find_str(alpm_pkg_get_groups(pkg), grp)) {
return 1;
}

View File

@@ -34,12 +34,6 @@
#include "db.h"
#include "signing.h"
typedef enum _alpm_pkgfrom_t {
PKG_FROM_FILE = 1,
PKG_FROM_LOCALDB,
PKG_FROM_SYNCDB
} alpm_pkgfrom_t;
/** Package operations struct. This struct contains function pointers to
* all methods used to access data in a package to allow for things such
* as lazy package intialization (such as used by the file backend). Each
@@ -48,15 +42,12 @@ typedef enum _alpm_pkgfrom_t {
* defined default_pkg_ops struct to work just fine for their needs.
*/
struct pkg_operations {
const char *(*get_filename) (alpm_pkg_t *);
const char *(*get_desc) (alpm_pkg_t *);
const char *(*get_url) (alpm_pkg_t *);
time_t (*get_builddate) (alpm_pkg_t *);
time_t (*get_installdate) (alpm_pkg_t *);
const char *(*get_packager) (alpm_pkg_t *);
const char *(*get_md5sum) (alpm_pkg_t *);
const char *(*get_arch) (alpm_pkg_t *);
off_t (*get_size) (alpm_pkg_t *);
off_t (*get_isize) (alpm_pkg_t *);
alpm_pkgreason_t (*get_reason) (alpm_pkg_t *);
int (*has_scriptlet) (alpm_pkg_t *);
@@ -68,20 +59,14 @@ struct pkg_operations {
alpm_list_t *(*get_conflicts) (alpm_pkg_t *);
alpm_list_t *(*get_provides) (alpm_pkg_t *);
alpm_list_t *(*get_replaces) (alpm_pkg_t *);
alpm_list_t *(*get_deltas) (alpm_pkg_t *);
alpm_filelist_t *(*get_files) (alpm_pkg_t *);
alpm_list_t *(*get_backup) (alpm_pkg_t *);
void *(*changelog_open) (alpm_pkg_t *);
size_t (*changelog_read) (void *, size_t, const alpm_pkg_t *, const void *);
size_t (*changelog_read) (void *, size_t, const alpm_pkg_t *, void *);
int (*changelog_close) (const alpm_pkg_t *, void *);
int (*force_load) (alpm_pkg_t *);
/* still to add:
* checkmd5sum() ?
* compute_requiredby()
*/
};
/** The standard package operations struct. get fields directly from the
@@ -100,6 +85,7 @@ struct __alpm_pkg_t {
char *url;
char *packager;
char *md5sum;
char *sha256sum;
char *base64_sig;
char *arch;
@@ -144,14 +130,15 @@ alpm_file_t *_alpm_file_copy(alpm_file_t *dest, const alpm_file_t *src);
int _alpm_files_cmp(const void *f1, const void *f2);
alpm_pkg_t* _alpm_pkg_new(void);
alpm_pkg_t *_alpm_pkg_dup(alpm_pkg_t *pkg);
int _alpm_pkg_dup(alpm_pkg_t *pkg, alpm_pkg_t **new_ptr);
void _alpm_pkg_free(alpm_pkg_t *pkg);
void _alpm_pkg_free_trans(alpm_pkg_t *pkg);
alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile,
int full, const char *md5sum, const char *base64_sig,
alpm_siglevel_t level);
int _alpm_pkg_validate_internal(alpm_handle_t *handle,
const char *pkgfile, alpm_pkg_t *syncpkg, alpm_siglevel_t level,
alpm_siglist_t **sigdata);
alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
const char *pkgfile, int full);
int _alpm_pkg_cmp(const void *p1, const void *p2);
int _alpm_pkg_compare_versions(alpm_pkg_t *local_pkg, alpm_pkg_t *pkg);

View File

@@ -11,6 +11,7 @@ fr
hu
it
kk
lt
nb
pl
pt
@@ -24,3 +25,4 @@ sv
tr
uk
zh_CN
zh_TW

View File

@@ -2,14 +2,15 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Hector Mtz-Seara <hseara@gmail.com>, 2011.
# Translators:
# Dan McGee <dpmcgee@gmail.com>, 2011.
# Hector Mtz-Seara <hseara@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Catalan (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/ca/)\n"
@@ -83,6 +84,10 @@ msgstr "no es pot obtenir el directori de treball actual\n"
msgid "could not change directory to %s (%s)\n"
msgstr "no s'ha pogut canviar el directori a %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "no es pot obtenir el directori de treball actual\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "ha ocorregut un problema en actualitzar %s\n"
@@ -211,8 +216,8 @@ msgstr "no s'ha pogut determinar punt de muntatge de root %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "La partició %s està muntat només en mode lectura\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"La partició %s està molt plena: nombre de blocs requerits %ld, nombre de "
"blocs lliures %ld\n"
@@ -221,14 +226,14 @@ msgstr ""
msgid "disk"
msgstr "disc"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "l'url '%s' és invàlid\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "l'url '%s' és invàlid\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "ha fallat en recuperar el fitxer '%s' des de %s : %s\n"
@@ -366,9 +371,9 @@ msgstr "no s'ha pogut trobar o llegir el paquet"
msgid "operation cancelled due to ignorepkg"
msgstr "operació cancel·lada degut a ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "delta invàlid o corrupte"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -454,6 +459,10 @@ msgstr "error en invocar el baixador extern"
msgid "unexpected error"
msgstr "error inesperat"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "no s'ha pogut trobar o llegir el paquet"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "no s'ha pogut trobar %s en la base de dades -- s'està ometent\n"
@@ -568,6 +577,6 @@ msgstr "l'ordre a fallat a executar-se correctament\n"
msgid "no %s cache exists, creating...\n"
msgstr "no existeix memòria cau %s, s'està creant...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "no s'ha pogut crear la memòria cau del paquet, s'usarà /tmp\n"

View File

@@ -2,15 +2,16 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Vojtěch Gondžala <vojtech.gondzala@gmail.com>, 2011.
# David Kolibáč <david@kolibac.cz>, 2011.
# Translators:
# Dan McGee <dpmcgee@gmail.com>, 2011.
# David Kolibáč <david@kolibac.cz>, 2011.
# Vojtěch Gondžala <vojtech.gondzala@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/cs/)\n"
@@ -84,6 +85,10 @@ msgstr "nelze určit aktuální pracovní adresář\n"
msgid "could not change directory to %s (%s)\n"
msgstr "nelze změnit adresář na %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "nelze určit aktuální pracovní adresář\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "nastal problém při aktualizaci %s\n"
@@ -212,8 +217,8 @@ msgstr "nepodařilo se určit kořen přípojného bodu %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "Diskový oddíl %s je připojen jen pro čtení\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"Diskový oddíl %s je příliš plný: je potřeba %ld bloků, %ld bloků je volných\n"
@@ -221,14 +226,14 @@ msgstr ""
msgid "disk"
msgstr "disk"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "URL '%s' je chybná\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "URL '%s' je chybná\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "selhalo získání souboru '%s' z %s: %s\n"
@@ -365,9 +370,9 @@ msgstr "nelze nalézt nebo přečíst balíček"
msgid "operation cancelled due to ignorepkg"
msgstr "operace byla zrušena kvůli ignorovanému balíčku"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "neplatný nebo poškozený delta rozdíl"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -453,6 +458,10 @@ msgstr "chyba volání externího programu pro stahování souborů"
msgid "unexpected error"
msgstr "neočekávaná chyba"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "nelze nalézt nebo přečíst balíček"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "nelze nalézt %s v databázi -- vynechat\n"
@@ -565,6 +574,6 @@ msgstr "příkaz se nepodařilo spustit správně\n"
msgid "no %s cache exists, creating...\n"
msgstr "neexistuje mezipaměť %s, vytváří se...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "nelze vytvořit mezipaměť balíčků, používá se /tmp\n"

View File

@@ -2,13 +2,14 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Joe Hansen <joedalton2@yahoo.dk>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Danish (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/da/)\n"
@@ -82,6 +83,10 @@ msgstr "kunne ikke hente aktuelt arbejdsmappe\n"
msgid "could not change directory to %s (%s)\n"
msgstr "kunne ikke ændre mappe til %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "kunne ikke hente aktuelt arbejdsmappe\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "der opstod et problem under opgradering %s\n"
@@ -211,21 +216,21 @@ msgid "Partition %s is mounted read only\n"
msgstr ""
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
#, c-format
msgid "disk"
msgstr "disk"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "adressen »%s« er ugyldig\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "adressen »%s« er ugyldig\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "fejlede i indhentning af fil »%s« fra %s: %s\n"
@@ -362,9 +367,9 @@ msgstr "kunne ikke finde eller læse pakke"
msgid "operation cancelled due to ignorepkg"
msgstr "handling afbrudt på grund af igonrepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "ugyldig eller ødelagt delta"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -450,6 +455,10 @@ msgstr "fejl under opstart af ekstern hentningsprogram"
msgid "unexpected error"
msgstr "uventet fejl"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "kunne ikke finde eller læse pakke"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "kunne ikke finde %s i database - springer over\n"
@@ -562,6 +571,6 @@ msgstr "kommando kunne ikke udføres korrekt\n"
msgid "no %s cache exists, creating...\n"
msgstr "intet %s-mellemlager findes, opretter...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "kunne ikke oprette pakkemellemlager, bruger /tmp i steden for\n"

View File

@@ -2,15 +2,16 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Matthias Gorissen <matthias@archlinux.de>, 2011.
# Translators:
# Dan McGee <dpmcgee@gmail.com>, 2011.
# Matthias Gorissen <matthias@archlinux.de>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-11 22:23+0000\n"
"Last-Translator: jakob <jakob.matthes@gmail.com>\n"
"Language-Team: German (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/de/)\n"
"Language: de\n"
@@ -83,6 +84,10 @@ msgstr "Konnte aktuelles Arbeitsverzeichnis nicht ermitteln\n"
msgid "could not change directory to %s (%s)\n"
msgstr "Konnte nicht zu Verzeichnis %s wechseln (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "Konnte aktuelles Arbeitsverzeichnis nicht ermitteln\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "Fehler traten auf, während %s aktualisiert wurde\n"
@@ -166,6 +171,7 @@ msgstr "Konnte Sperrdatei %s nicht entfernen\n"
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr ""
"Konnte Paket-Beschreibungsdatei '%s' der Datenbank '%s' nicht analysieren\n"
#, c-format
msgid "database path is undefined\n"
@@ -215,8 +221,8 @@ msgstr "Konnte den Root-Einhängepunkt %s nicht ermitteln\n"
msgid "Partition %s is mounted read only\n"
msgstr "Die Partition %s ist so eingehängt, daß sie nur gelesen werden kann\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"Partition %s überfüllt: %ld Blöcke werden benötigt, %ld Blöcke sind frei\n"
@@ -225,12 +231,12 @@ msgid "disk"
msgstr "Platte"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "URL '%s' ist ungültig\n"
msgid "failed to create temporary file for download\n"
msgstr "Konnte temporäre Datei für den Download nicht anlegen\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
msgid "url '%s' is invalid\n"
msgstr "URL '%s' ist ungültig\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
@@ -306,11 +312,11 @@ msgstr "Konnte Datenbank nicht finden"
#, c-format
msgid "invalid or corrupted database"
msgstr ""
msgstr "Ungültige oder beschädigte Datenbank"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr ""
msgstr "Ungültige oder beschädigte Datenbank (PGP-Signatur)"
#, c-format
msgid "database is incorrect version"
@@ -369,17 +375,17 @@ msgstr "Konnte Paket nicht finden oder lesen"
msgid "operation cancelled due to ignorepkg"
msgstr "Vorgang abgebrochen auf Grund von IgnorePkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "Ungültiges oder beschädigtes Delta"
msgstr "Ungültiges oder beschädigtes Paket"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr ""
msgstr "Ungültiges oder beschädigtes Paket (Prüfsumme)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr ""
msgstr "Ungültiges oder beschädigtes Paket (PGP-Signatur)"
#, c-format
msgid "cannot open package file"
@@ -403,11 +409,11 @@ msgstr "Konnte kein Repositorium für das Ziel finden"
#, c-format
msgid "missing PGP signature"
msgstr ""
msgstr "Fehlende PGP-Signatur"
#, c-format
msgid "invalid PGP signature"
msgstr ""
msgstr "Ungültige PGP-Signatur"
#, c-format
msgid "invalid or corrupted delta"
@@ -447,7 +453,7 @@ msgstr "Fehler in der Bibliothek für Downloads"
#, c-format
msgid "gpgme error"
msgstr ""
msgstr "gpgme-Fehler"
#, c-format
msgid "error invoking external downloader"
@@ -457,6 +463,10 @@ msgstr "Fehler beim Aufruf eines externen Downloaders"
msgid "unexpected error"
msgstr "Unerwarteter Fehler"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "Konnte Paket nicht finden oder lesen"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "Konnte %s nicht in Datenbank finden -- Überspringe\n"
@@ -471,7 +481,7 @@ msgstr "Kann Datei '%s' nicht entfernen: %s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr ""
msgstr "Konnte %s nicht entfernen (%s)\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
@@ -569,6 +579,6 @@ msgstr "Befehl konnte nicht korrekt ausgeführt werden\n"
msgid "no %s cache exists, creating...\n"
msgstr "Es existiert kein %s-Puffer. Erstelle... \n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "Konnte Paketpuffer nicht erstellen, benutze stattdessen /tmp\n"

View File

@@ -2,15 +2,16 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# nous <nous@archlinux.us>, 2011.
# Translators:
# Dan McGee <dpmcgee@gmail.com>, 2011.
# nous <nous@archlinux.us>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-15 00:07+0000\n"
"Last-Translator: nous <nous@archlinux.us>\n"
"Language-Team: Greek (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/el/)\n"
"Language: el\n"
@@ -83,6 +84,10 @@ msgstr "αδυναμία χρήσης τρέχοντος καταλόγου\n"
msgid "could not change directory to %s (%s)\n"
msgstr "αδυναμία μετάβασης στον κατάλογο %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "αδυναμία χρήσης τρέχοντος καταλόγου\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "πρόβλημα κατά την αναβάθμιση του %s\n"
@@ -161,7 +166,7 @@ msgstr "αδυναμία διαγραφής αρχείου κλειδώματο
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr ""
msgstr "αδυναμία ανάλυσης αρχείου περιγραφής πακέτου '%s' βάσης '%s'\n"
#, c-format
msgid "database path is undefined\n"
@@ -211,8 +216,8 @@ msgstr "αδυναμία καθορισμού ριζικού σημείου πρ
msgid "Partition %s is mounted read only\n"
msgstr "Kατάτμηση %s: προσαρτημένη μόνο για ανάγνωση\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr "Kατάτμηση %s πλήρης: %ld blocks απαιτούνται, %ld ελεύθερα\n"
#, c-format
@@ -220,12 +225,12 @@ msgid "disk"
msgstr "δίσκο"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "άκυρη διεύθυνση '%s'\n"
msgid "failed to create temporary file for download\n"
msgstr "αποτυχία δημιουργίας προσωρινού αρχείου λήψης\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
msgid "url '%s' is invalid\n"
msgstr "άκυρη διεύθυνση '%s'\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
@@ -301,11 +306,11 @@ msgstr "αδυναμία εύρεσης βάσης"
#, c-format
msgid "invalid or corrupted database"
msgstr ""
msgstr "άκυρη ή κατεστραμμένη βάση"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr ""
msgstr "άκυρη ή κατεστραμμένη βάση (υπογραφή PGP)"
#, c-format
msgid "database is incorrect version"
@@ -363,17 +368,17 @@ msgstr "αδυναμία εύρεσης ή ανάγνωσης πακέτου"
msgid "operation cancelled due to ignorepkg"
msgstr "ακύρωση λειτουργίας λόγω ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "άκυρο ή κατεστραμμένο delta"
msgstr "άκυρο ή κατεστραμμένο πακέτο"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr ""
msgstr "άκυρο ή κατεστραμμένο πακέτο (άθροισμα ελέγχου)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr ""
msgstr "άκυρο ή κατεστραμμένο πακέτο (υπογραφή PGP)"
#, c-format
msgid "cannot open package file"
@@ -397,11 +402,11 @@ msgstr "αδυναμία εύρεσης αποθήκης για διεκπερα
#, c-format
msgid "missing PGP signature"
msgstr ""
msgstr "απούσα υπογραφή PGP"
#, c-format
msgid "invalid PGP signature"
msgstr ""
msgstr "άκυρη υπογραφή PGP"
#, c-format
msgid "invalid or corrupted delta"
@@ -441,7 +446,7 @@ msgstr "σφάλμα βιβλιοθήκης λήψης"
#, c-format
msgid "gpgme error"
msgstr ""
msgstr "σφάλμα gpgme"
#, c-format
msgid "error invoking external downloader"
@@ -451,6 +456,10 @@ msgstr "σφάλμα κλήσης προγράμματος λήψης"
msgid "unexpected error"
msgstr "απροσδόκητο σφάλμα"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "αδυναμία εύρεσης ή ανάγνωσης πακέτου"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "δεν βρέθηκε το %s στη βάση -- παράλειψη\n"
@@ -465,11 +474,11 @@ msgstr "αδυναμία διαγραφής αρχείου '%s': %s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr ""
msgstr "αδυναμία διαγραφής %s (%s)\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
msgstr "αδυναμία διαγραφής εγγραφής βάσης %s-%s\n"
msgstr "αδυναμία κατάργησης εγγραφής βάσης %s-%s\n"
#, c-format
msgid "could not remove entry '%s' from cache\n"
@@ -564,6 +573,6 @@ msgstr "αποτυχία σωστής εκτέλεσης εντολής\n"
msgid "no %s cache exists, creating...\n"
msgstr "δημιουργία κρύπτης %s...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "αδυναμία δημιουργίας κρύπτης πακέτων, χρήση /tmp\n"

View File

@@ -2,13 +2,14 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Dan McGee <dpmcgee@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-09 01:00+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:08+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: en_GB\n"
@@ -81,6 +82,10 @@ msgstr "could not get current working directory\n"
msgid "could not change directory to %s (%s)\n"
msgstr "could not change directory to %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "could not get current working directory\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "problem occurred while upgrading %s\n"
@@ -209,22 +214,22 @@ msgstr "could not determine root mount point %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "Partition %s is mounted read only\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, c-format
msgid "disk"
msgstr "disk"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "URL '%s' is invalid\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr "failed to create temporary file for download\n"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "URL '%s' is invalid\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "failed retrieving file '%s' from %s : %s\n"
@@ -361,9 +366,9 @@ msgstr "could not find or read package"
msgid "operation cancelled due to ignorepkg"
msgstr "operation cancelled due to ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "invalid or corrupted database"
msgstr "invalid or corrupted package"
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -449,6 +454,10 @@ msgstr "error invoking external downloader"
msgid "unexpected error"
msgstr "unexpected error"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "could not find or read package"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "could not find %s in database -- skipping\n"
@@ -561,6 +570,6 @@ msgstr "command failed to execute correctly\n"
msgid "no %s cache exists, creating...\n"
msgstr "no %s cache exists, creating...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "couldn't create package cache, using /tmp instead\n"

View File

@@ -2,17 +2,18 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# neiko <neikokz+tsfx@gmail.com>, 2011.
# Juan Antonio Cánovas Pérez <traumness@gmail.com>, 2011.
# Translators:
# Angel Velasquez <angvp@archlinux.org>, 2011.
# Dan McGee <dpmcgee@gmail.com>, 2011.
# Juan Antonio Cánovas Pérez <traumness@gmail.com>, 2011.
# neiko <neikokz+tsfx@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-09-02 18:19+0000\n"
"Last-Translator: neiko <neikokz+tsfx@gmail.com>\n"
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/"
"archlinux-pacman/team/es/)\n"
"Language: es\n"
@@ -85,6 +86,10 @@ msgstr "no se pudo obtener el directorio de trabajo actual\n"
msgid "could not change directory to %s (%s)\n"
msgstr "no se pudo cambiar el directorio a %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "no se pudo obtener el directorio de trabajo actual\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "ocurrió un error durante la actualización de %s\n"
@@ -139,7 +144,7 @@ msgstr "no se pudo crear el directorio %s: %s\n"
#, c-format
msgid "could not parse package description file in %s\n"
msgstr "no se pudo interpretar el archivo de descripción en %s\n"
msgstr "no se pudo leer el archivo de descripción en %s\n"
#, c-format
msgid "missing package name in %s\n"
@@ -168,6 +173,8 @@ msgstr "no se pudo eliminar el archivo de bloqueo %s\n"
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr ""
"error al leer el archivo de descripción '%s' del paquete de la base de datos "
"'%s'\n"
#, c-format
msgid "database path is undefined\n"
@@ -175,7 +182,7 @@ msgstr "la ruta de la base de datos no está definida\n"
#, c-format
msgid "dependency cycle detected:\n"
msgstr "ciclo de dependencias detectado:\n"
msgstr "bucle de dependencias detectado:\n"
#, c-format
msgid "%s will be removed after its %s dependency\n"
@@ -183,7 +190,7 @@ msgstr "%s será eliminado después de su dependencia %s\n"
#, c-format
msgid "%s will be installed before its %s dependency\n"
msgstr "%s será instalado antes de su dependencia %s\n"
msgstr "%s será instalado antes que su dependencia %s\n"
#, c-format
msgid "ignoring package %s-%s\n"
@@ -219,8 +226,8 @@ msgstr "no se pudo determinar el punto de montaje de la raiz %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "La partición %s está montada como sólo lectura\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"La partición %s está muy llena: %ld bloques necesarios, %ld bloques "
"disponibles\n"
@@ -229,17 +236,17 @@ msgstr ""
msgid "disk"
msgstr "disco"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr "error al crear un archivo temporal para la descarga\n"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "la dirección %s no es válida\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "fallo al obtener archivo '%s' desde %s: %s\n"
msgstr "error al obtener archivo '%s' desde %s: %s\n"
#, c-format
msgid "%s appears to be truncated: %jd/%jd bytes\n"
@@ -311,11 +318,11 @@ msgstr "no se pudo encontrar la base de datos"
#, c-format
msgid "invalid or corrupted database"
msgstr ""
msgstr "base de datos no válida o dañada"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr ""
msgstr "base de datos no válida o dañada (firma PGP)"
#, c-format
msgid "database is incorrect version"
@@ -374,17 +381,17 @@ msgstr "no se pudo encontrar o leer el paquete"
msgid "operation cancelled due to ignorepkg"
msgstr "operación cancelada debido a ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "no válido o diferencial dañado"
msgstr "paquete no válido o dañado"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr ""
msgstr "paquete no válido o dañado (suma de verificación)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr ""
msgstr "paquete no válido o dañado (firma PGP)"
#, c-format
msgid "cannot open package file"
@@ -408,11 +415,11 @@ msgstr "no pudo encontrarse un repositorio para el objetivo"
#, c-format
msgid "missing PGP signature"
msgstr ""
msgstr "falta la firma PGP"
#, c-format
msgid "invalid PGP signature"
msgstr ""
msgstr "firma PGP no válida"
#, c-format
msgid "invalid or corrupted delta"
@@ -452,7 +459,7 @@ msgstr "error de descarga de biblioteca"
#, c-format
msgid "gpgme error"
msgstr ""
msgstr "error de gpgme"
#, c-format
msgid "error invoking external downloader"
@@ -462,6 +469,10 @@ msgstr "error invocando el descargador externo"
msgid "unexpected error"
msgstr "error inesperado"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "no se pudo encontrar o leer el paquete"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "no se pudo encontrar %s en la base de datos -- saltando\n"
@@ -476,7 +487,7 @@ msgstr "no se pudo quitar el archivo '%s': %s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr ""
msgstr "error al eliminar %s (%s)\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
@@ -576,6 +587,6 @@ msgstr "el comando falló al ejecutarse\n"
msgid "no %s cache exists, creating...\n"
msgstr "no existe la caché %s, creando...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "no se pudo crear la cache de paquetes, usando /tmp en su lugar\n"

View File

@@ -2,18 +2,20 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# <larso@gmx.com>, 2011.
# Larso <larso@gmx.com>, 2011.
# Jesse Jaara <jesse.jaara@gmail.com>, 2011.
# Translators:
# apuasi <kaannokset.hellberg@gmail.com>, 2011.
# Dan McGee <dpmcgee@gmail.com>, 2011.
# Jesse Jaara <jesse.jaara@gmail.com>, 2011.
# <larso@gmx.com>, 2011.
# Larso <larso@gmx.com>, 2011.
# Lasse Liehu <lasse.liehu@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-15 20:31+0000\n"
"Last-Translator: Larso <larso@gmx.com>\n"
"Language-Team: Finnish (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/fi/)\n"
"Language: fi\n"
@@ -52,7 +54,7 @@ msgstr ""
#, c-format
msgid "extract: not overwriting dir with file %s\n"
msgstr "purku: kansiota ei ylikirjoiteta tiedostolla %s\n"
msgstr "purku: kansiota ei korvata tiedostolla %s\n"
#, c-format
msgid "extract: symlink %s does not point to dir\n"
@@ -86,6 +88,10 @@ msgstr "nykyisen kansion sijaintia ei voitu määrittää\n"
msgid "could not change directory to %s (%s)\n"
msgstr "ei voitu vaihtaa kansioon %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "nykyisen kansion sijaintia ei voitu määrittää\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "pakettia %s päivitettäessä tapahtui virhe\n"
@@ -124,11 +130,11 @@ msgstr "tiedostoa %s ei voitu avata: %s\n"
#, c-format
msgid "%s database is inconsistent: name mismatch on package %s\n"
msgstr ""
msgstr "tietokanta %s on epäyhtenäinen: paketin %s nimi ei täsmää\n"
#, c-format
msgid "%s database is inconsistent: version mismatch on package %s\n"
msgstr ""
msgstr "tietokanta %s on epäyhtenäinen: paketin %s versio ei täsmää\n"
#, c-format
msgid "could not create directory %s: %s\n"
@@ -136,7 +142,7 @@ msgstr "kansiota %s ei voitu luoda: %s\n"
#, c-format
msgid "could not parse package description file in %s\n"
msgstr "paketin kuvausta tiedostossa %s ei voitu jäsentää\n"
msgstr "paketin kuvaustiedostoa %s ei voitu jäsentää\n"
#, c-format
msgid "missing package name in %s\n"
@@ -164,7 +170,7 @@ msgstr "lukkotiedostoa %s ei voitu poistaa\n"
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr ""
msgstr "paketin kuvaustiedostoa '%s' ei voitu jäsentää tietokannassa '%s'\n"
#, c-format
msgid "database path is undefined\n"
@@ -188,7 +194,7 @@ msgstr "ohitetaan paketti %s-%s\n"
#, c-format
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "ei voida selvittää paketin \"%s\", riippuvuutta \"%s\"\n"
msgstr "pakettia '%s' ei voida selvittää, paketin '%s' riippuvuus\n"
#, c-format
msgid "could not get filesystem information\n"
@@ -214,8 +220,8 @@ msgstr "juuren %s liitospistettä ei voitu selvittää\n"
msgid "Partition %s is mounted read only\n"
msgstr "Osio %s on liitetty vain lukutilassa\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr "osio %s on liian täynnä: %ld lohkoa tarvitaan, %ld lohkoa vapaana\n"
#, c-format
@@ -223,12 +229,12 @@ msgid "disk"
msgstr "levy"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "osoite '%s' on virheellinen\n"
msgid "failed to create temporary file for download\n"
msgstr "väliaikaistiedoston luonti lataamista varten epäonnistui\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
msgid "url '%s' is invalid\n"
msgstr "osoite '%s' on virheellinen\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
@@ -304,11 +310,11 @@ msgstr "tietokantaa ei löytynyt"
#, c-format
msgid "invalid or corrupted database"
msgstr ""
msgstr "virheellinen tai vahingoittunut tietokanta"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr ""
msgstr "virheellinen tai vahingoittunut tietokanta (PGP-allekirjoitus)"
#, c-format
msgid "database is incorrect version"
@@ -366,17 +372,17 @@ msgstr "pakettia ei löytynyt tai voitu lukea"
msgid "operation cancelled due to ignorepkg"
msgstr "operaatio peruutettiin ignorepkg:n takia"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "delta ei kelvollinen tai vahingoittunut"
msgstr "virheellinen tai vahingoittunut paketti"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr ""
msgstr "virheellinen tai vahingoittunut paketti (tarkistussumma)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr ""
msgstr "virheellinen tai vahingoittunut paketti (PGP-allekirjoitus)"
#, c-format
msgid "cannot open package file"
@@ -400,15 +406,15 @@ msgstr "kohteen varastoa ei löytynyt"
#, c-format
msgid "missing PGP signature"
msgstr ""
msgstr "puuttuva PGP-allekirjoitus"
#, c-format
msgid "invalid PGP signature"
msgstr ""
msgstr "virheellinen PGP-allekirjoitus"
#, c-format
msgid "invalid or corrupted delta"
msgstr "delta ei kelvollinen tai vahingoittunut"
msgstr "virheellinen tai vahingoittunut delta"
#, c-format
msgid "delta patch failed"
@@ -444,7 +450,7 @@ msgstr "latauskirjaston virhe"
#, c-format
msgid "gpgme error"
msgstr ""
msgstr "gpgme-virhe"
#, c-format
msgid "error invoking external downloader"
@@ -454,6 +460,10 @@ msgstr "virhe kutsuttaessa ulkoista latausohjelmaa"
msgid "unexpected error"
msgstr "odottamaton virhe"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "pakettia ei löytynyt tai voitu lukea"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "%s ei löytynyt tietokannasta -- ohitetaan\n"
@@ -468,7 +478,7 @@ msgstr "tiedostoa '%s' ei voitu poistaa: %s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr ""
msgstr "tiedostoa %s ei voida poistaa (%s)\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
@@ -568,6 +578,6 @@ msgstr "komento päättyi virheeseen\n"
msgid "no %s cache exists, creating...\n"
msgstr "välimuistia %s ei ole olemassa, luodaan...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "pakettivälimuistia ei voitu luoda, käytetään /tmp:tä sen sijasta\n"

View File

@@ -2,15 +2,17 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# shining <chantry.xavier@gmail.com>, 2011.
# Translators:
# Dan McGee <dpmcgee@gmail.com>, 2011.
# <ma.jiehong@gmail.com>, 2011.
# shining <chantry.xavier@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-09-06 05:55+0000\n"
"Last-Translator: jiehong <ma.jiehong@gmail.com>\n"
"Language-Team: French (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/fr/)\n"
"Language: fr\n"
@@ -45,15 +47,15 @@ msgid ""
"filesystem: %o package: %o\n"
msgstr ""
"Les permissions pour le répertoire %s sont différentes\n"
"système de fichier: %o paquet : %o\n"
"système de fichier : %o paquet : %o\n"
#, c-format
msgid "extract: not overwriting dir with file %s\n"
msgstr "extraction: n'écrase pas le répertoire par le fichier %s\n"
msgstr "extraction : n'écrase pas le répertoire par le fichier %s\n"
#, c-format
msgid "extract: symlink %s does not point to dir\n"
msgstr "extraction: le lien %s ne pointe pas vers un répertoire\n"
msgstr "extraction : le lien %s ne pointe pas vers un répertoire\n"
#, c-format
msgid "could not rename %s to %s (%s)\n"
@@ -83,6 +85,10 @@ msgstr "déterminer le répertoire courant a échoué\n"
msgid "could not change directory to %s (%s)\n"
msgstr "changer de répertoire vers %s a échoué (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "déterminer le répertoire courant a échoué\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "des erreurs sont survenues pendant la mise à jour de %s\n"
@@ -101,7 +107,7 @@ msgstr "l'ajout au cache de l'entrée '%s' a échoué\n"
#, c-format
msgid "removing invalid database: %s\n"
msgstr "suppression d'une base de données invalide: %s\n"
msgstr "suppression d'une base de données invalide : %s\n"
#, c-format
msgid "invalid name for database entry '%s'\n"
@@ -117,19 +123,20 @@ msgstr "l'entrée '%s' de la base de données est corrompue\n"
#, c-format
msgid "could not open file %s: %s\n"
msgstr "l'ouverture du fichier %s a échoué: %s\n"
msgstr "l'ouverture du fichier %s a échoué : %s\n"
#, c-format
msgid "%s database is inconsistent: name mismatch on package %s\n"
msgstr "Le dépôt %s est inconsistant: noms différents pour le paquet %s\n"
msgstr "Le dépôt %s est inconsistant : noms différents pour le paquet %s\n"
#, c-format
msgid "%s database is inconsistent: version mismatch on package %s\n"
msgstr "Le dépôt %s est inconsistant: versions différentes pour le paquet %s\n"
msgstr ""
"Le dépôt %s est inconsistant : versions différentes pour le paquet %s\n"
#, c-format
msgid "could not create directory %s: %s\n"
msgstr "la création du répertoire %s a échoué: %s\n"
msgstr "la création du répertoire %s a échoué : %s\n"
#, c-format
msgid "could not parse package description file in %s\n"
@@ -145,7 +152,7 @@ msgstr "version de paquet manquante dans %s\n"
#, c-format
msgid "error while reading package %s: %s\n"
msgstr "erreur lors de la lecture du paquet %s: %s\n"
msgstr "erreur lors de la lecture du paquet %s : %s\n"
#, c-format
msgid "missing package metadata in %s\n"
@@ -153,7 +160,7 @@ msgstr "méta-données du paquet manquantes dans %s\n"
#, c-format
msgid "removing invalid file: %s\n"
msgstr "suppression du fichier invalide: %s\n"
msgstr "suppression du fichier invalide : %s\n"
#, c-format
msgid "could not remove lock file %s\n"
@@ -162,6 +169,8 @@ msgstr "la suppression du fichier de verrouillage %s a échoué\n"
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr ""
"impossible d'analyser le fichier '%s' de description du paquet depuis la "
"base de données '%s'\n"
#, c-format
msgid "database path is undefined\n"
@@ -169,7 +178,7 @@ msgstr "base de données non initialisée\n"
#, c-format
msgid "dependency cycle detected:\n"
msgstr "cycle de dépendances détecté:\n"
msgstr "cycle de dépendances détecté :\n"
#, c-format
msgid "%s will be removed after its %s dependency\n"
@@ -194,7 +203,7 @@ msgstr "impossible de récupérer les informations du système de fichier\n"
#, c-format
msgid "could not get filesystem information for %s: %s\n"
msgstr ""
"impossible de récupérer les informations du système de fichier pour %s: %s\n"
"impossible de récupérer les informations du système de fichier pour %s : %s\n"
#, c-format
msgid "could not determine mount point for file %s\n"
@@ -212,8 +221,8 @@ msgstr "impossible de déterminer le point de montage de la racine %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "La partition %s est en lecture seule\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"La partition %s n'a pas assez d'espace libre : besoin de %ld blocs mais "
"seulement %ld libres\n"
@@ -223,12 +232,12 @@ msgid "disk"
msgstr "disque"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "l'url '%s' est invalide\n"
msgid "failed to create temporary file for download\n"
msgstr "échec de création d'un fichier temporaire pour le téléchargement\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
msgid "url '%s' is invalid\n"
msgstr "l'url '%s' est invalide\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
@@ -236,7 +245,7 @@ msgstr "échec de récupération du fichier '%s' depuis %s : %s\n"
#, c-format
msgid "%s appears to be truncated: %jd/%jd bytes\n"
msgstr "%s est apparemment tronqué: %jd/%jd bytes\n"
msgstr "%s est apparemment tronqué : %jd/%jd bytes\n"
#, c-format
msgid "failed to download %s\n"
@@ -244,7 +253,7 @@ msgstr "le fichier %s n'a pas pu être téléchargé\n"
#, c-format
msgid "out of memory!"
msgstr "dépassement de mémoire!"
msgstr "dépassement de mémoire !"
#, c-format
msgid "unexpected system error"
@@ -304,11 +313,11 @@ msgstr "trouver la base de données a échoué"
#, c-format
msgid "invalid or corrupted database"
msgstr ""
msgstr "base de données invalide ou corrompue"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr ""
msgstr "base de données invalide ou corrompue (Signature PGP)"
#, c-format
msgid "database is incorrect version"
@@ -368,17 +377,17 @@ msgstr "impossible de trouver ou de lire le paquet"
msgid "operation cancelled due to ignorepkg"
msgstr "opération annulée à cause d'un paquet à ignorer (IgnorePkg)"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "delta invalide ou corrompu"
msgstr "paquet invalide ou corrompu"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr ""
msgstr "paquet invalide ou corrompu (somme de contrôle)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr ""
msgstr "paquet invalide ou corrompu (signature PGP)"
#, c-format
msgid "cannot open package file"
@@ -402,11 +411,11 @@ msgstr "impossible de trouver le dépôt pour la cible"
#, c-format
msgid "missing PGP signature"
msgstr ""
msgstr "signature PGP manquante"
#, c-format
msgid "invalid PGP signature"
msgstr ""
msgstr "siganture PGP invalide"
#, c-format
msgid "invalid or corrupted delta"
@@ -446,7 +455,7 @@ msgstr "erreur de la bibliothèque de téléchargement"
#, c-format
msgid "gpgme error"
msgstr ""
msgstr "erreur de gpgme"
#, c-format
msgid "error invoking external downloader"
@@ -456,6 +465,10 @@ msgstr "erreur en invoquant le client externe de téléchargement"
msgid "unexpected error"
msgstr "erreur non prévue"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "impossible de trouver ou de lire le paquet"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "trouver %s dans la base de données a échoué -- ignoré\n"
@@ -466,11 +479,11 @@ msgstr "supprime %s de la liste de cible\n"
#, c-format
msgid "cannot remove file '%s': %s\n"
msgstr "suppression du fichier '%s' impossible: %s\n"
msgstr "suppression du fichier '%s' impossible : %s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr ""
msgstr "impossible de supprimer %s (%s)\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
@@ -482,19 +495,19 @@ msgstr "la suppression du cache de l'entrée '%s' a échoué\n"
#, c-format
msgid "%s: ignoring package upgrade (%s => %s)\n"
msgstr "%s: ignore la mise à jour du paquet (%s => %s)\n"
msgstr "%s : ignore la mise à jour du paquet (%s => %s)\n"
#, c-format
msgid "%s: ignoring package downgrade (%s => %s)\n"
msgstr "%s: ignore le retour à la version antérieure (%s => %s)\n"
msgstr "%s : ignore le retour à la version antérieure (%s => %s)\n"
#, c-format
msgid "%s: downgrading from version %s to version %s\n"
msgstr "%s: retourne à la version antérieure (%s => %s)\n"
msgstr "%s : retourne à la version antérieure (%s => %s)\n"
#, c-format
msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr "%s: la version locale (%s) est plus récente que %s (%s)\n"
msgstr "%s : la version locale (%s) est plus récente que %s (%s)\n"
#, c-format
msgid "ignoring package replacement (%s-%s => %s-%s)\n"
@@ -566,8 +579,8 @@ msgstr "la commande n'a pas pu être exécutée correctement\n"
#, c-format
msgid "no %s cache exists, creating...\n"
msgstr "le cache %s n'existe pas, création...\n"
msgstr "le cache %s n'existe pas, création\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "n'a pas pu créer le cache de paquets, /tmp sera utilisé à la place\n"

View File

@@ -2,13 +2,14 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# ngaba <ngaba@bibl.u-szeged.hu>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Hungarian (http://www.transifex.net/projects/p/archlinux-"
"pacman/team/hu/)\n"
@@ -82,6 +83,10 @@ msgstr "a jelenlegi munkakönyvtár nem kapható meg\n"
msgid "could not change directory to %s (%s)\n"
msgstr "nem sikerült a könyvtárváltás ide: %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "a jelenlegi munkakönyvtár nem kapható meg\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "hiba történt a(z) %s frissítése közben\n"
@@ -210,8 +215,8 @@ msgstr "nem sikerült meghatározni a %s gyökérkönyvtár csatolási pontját\
msgid "Partition %s is mounted read only\n"
msgstr "A %s partíció csak olvashatóként van csatolva\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"Nincs elég szabad hely a %s partíción: %ld blokk szükséges, %ld blokk "
"szabad\n"
@@ -220,14 +225,14 @@ msgstr ""
msgid "disk"
msgstr "diszk"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "a '%s' URL hibás\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "a '%s' URL hibás\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "nem sikerült a(z) '%s' fájlt letölteni a %s helyről : %s\n"
@@ -364,9 +369,9 @@ msgstr "nem található vagy nem olvasható a csomag"
msgid "operation cancelled due to ignorepkg"
msgstr "művelet megszakítva ignorepkg miatt"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "hibás vagy sérült delta"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -452,6 +457,10 @@ msgstr "hiba a külső letöltő meghívásakor"
msgid "unexpected error"
msgstr "nemvárt hiba"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "nem található vagy nem olvasható a csomag"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "nem található a(z) %s az adatbázisban -- kihagyás\n"
@@ -564,6 +573,6 @@ msgstr "a parancs nem futott le sikeresen\n"
msgid "no %s cache exists, creating...\n"
msgstr "nem létezik a(z) %s gyorsítótár. létrehozás...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "nem sikerült létrehozni a csomaggyorsítótárat, a /tmp használata\n"

View File

@@ -2,15 +2,16 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Giovanni Scafora <giovanni@archlinux.org>, 2011.
# Translators:
# Dan McGee <dpmcgee@gmail.com>, 2011.
# Giovanni Scafora <giovanni@archlinux.org>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-13 09:41+0000\n"
"Last-Translator: bash <andrea@archlinux.org>\n"
"Language-Team: Italian (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/it/)\n"
"Language: it\n"
@@ -85,6 +86,10 @@ msgstr "impossibile determinare la directory corrente\n"
msgid "could not change directory to %s (%s)\n"
msgstr "impossibile spostarsi nella directory %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "impossibile determinare la directory corrente\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "si sono verificati degli errori durante l'aggiornamento di %s\n"
@@ -166,7 +171,7 @@ msgstr "impossibile rimuovere il file di lock %s\n"
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr ""
msgstr "impossibile analizzare il file di descrizione '%s' del database '%s'\n"
#, c-format
msgid "database path is undefined\n"
@@ -217,8 +222,8 @@ msgstr "impossibile determinare il mount point di root %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "La partizione %s è montata in sola lettura\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"La partizione %s è troppo piena: sono necessari %ld blocchi e ci sono solo "
"%ld blocchi liberi\n"
@@ -228,12 +233,12 @@ msgid "disk"
msgstr "disco"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "l'url '%s' non è esatto\n"
msgid "failed to create temporary file for download\n"
msgstr "impossibile creare la directory temporanea\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
msgid "url '%s' is invalid\n"
msgstr "l'url '%s' non è esatto\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
@@ -309,11 +314,11 @@ msgstr "impossibile trovare il database"
#, c-format
msgid "invalid or corrupted database"
msgstr ""
msgstr "il database non è valido oppure è corrotto"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr ""
msgstr "il database non è valido oppure è corrotto (firma PGP)"
#, c-format
msgid "database is incorrect version"
@@ -371,17 +376,17 @@ msgstr "impossibile trovare o leggere il pacchetto"
msgid "operation cancelled due to ignorepkg"
msgstr "l'operazione è stata ignorata a causa di ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "il delta non è valido oppure è corrotto"
msgstr "il pacchetto non è valido oppure è corrotto"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr ""
msgstr "il pacchetto non è valido oppure è corrotto (controllo integrità)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr ""
msgstr "il pacchetto non è valido oppure è corrotto (firma PGP)"
#, c-format
msgid "cannot open package file"
@@ -405,15 +410,15 @@ msgstr "impossibile trovare un repository contenente questo pacchetto"
#, c-format
msgid "missing PGP signature"
msgstr ""
msgstr "firma PGP mancante"
#, c-format
msgid "invalid PGP signature"
msgstr ""
msgstr "firma PGP non valida"
#, c-format
msgid "invalid or corrupted delta"
msgstr "il delta non è valido oppure è corrotto"
msgstr "file delta non valido oppure corrotto"
#, c-format
msgid "delta patch failed"
@@ -449,7 +454,7 @@ msgstr "si è verificato un errore della libreria di download"
#, c-format
msgid "gpgme error"
msgstr ""
msgstr "errore di gpgme"
#, c-format
msgid "error invoking external downloader"
@@ -459,6 +464,10 @@ msgstr "si è verificato un errore lanciando il downloader esterno"
msgid "unexpected error"
msgstr "errore inaspettato"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "impossibile trovare o leggere il pacchetto"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "impossibile trovare %s nel database, sarà ignorato\n"
@@ -473,7 +482,7 @@ msgstr "impossibile rimuovere il file '%s': %s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr ""
msgstr "impossibile rimuovere %s (%s)\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
@@ -573,7 +582,7 @@ msgstr "l'esecuzione del comando non è riuscita correttamente\n"
msgid "no %s cache exists, creating...\n"
msgstr "la cache di %s non esiste, creazione in corso...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr ""
"impossibile creare la cache del pacchetto, al suo posto sarà usata /tmp\n"

View File

@@ -2,14 +2,15 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Dan McGee <dpmcgee@gmail.com>, 2011.
# Translators:
# Baurzhan Muftakhidinov <baurthefirst@gmail.com>, 2011.
# Dan McGee <dpmcgee@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Kazakh (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/kk/)\n"
@@ -83,6 +84,10 @@ msgstr "ағымдағы жұмыс бумасын анықтау мүмкін
msgid "could not change directory to %s (%s)\n"
msgstr "%s бумасына ауысу мүмкін емес (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "ағымдағы жұмыс бумасын анықтау мүмкін емес\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "%s жаңарту кезінде қате кетті\n"
@@ -211,22 +216,22 @@ msgstr ""
msgid "Partition %s is mounted read only\n"
msgstr "%s бөлімі тек оқу үшін тіркелген\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr "%s бөлімі тым толық: %ld блок керек, %ld блок бос\n"
#, c-format
msgid "disk"
msgstr "дискі"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "'%s' сілтемесі қате\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "'%s' сілтемесі қате\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "'%s' файлын %s адресінен алу қатемен аяқталды : %s\n"
@@ -363,9 +368,9 @@ msgstr "дестені табу не оқу мүмкін емес"
msgid "operation cancelled due to ignorepkg"
msgstr "әрекет ignorepkg салдарынан тоқтатылды"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "дельта файлы қате не зақымдалған"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -451,6 +456,10 @@ msgstr "сыртқы жүктемелер менеджерін шақыру қа
msgid "unexpected error"
msgstr "күтпеген қате кетті"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "дестені табу не оқу мүмкін емес"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "дерекқор ішінде %s табылмады -- өткізіп жібереміз\n"
@@ -564,6 +573,6 @@ msgstr "команда дұрыс орындалмады\n"
msgid "no %s cache exists, creating...\n"
msgstr "%s кэші жоқ болып тұр, құрылады...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "дестелер кэшін құру мүмкін емес, оның орнына /tmp қолданылады\n"

View File

@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: pacman 3.5.3\n"
"Project-Id-Version: pacman 4.0.0rc1\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -79,6 +79,10 @@ msgstr ""
msgid "could not change directory to %s (%s)\n"
msgstr ""
#, c-format
msgid "could not restore working directory (%s)\n"
msgstr ""
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr ""
@@ -208,7 +212,7 @@ msgid "Partition %s is mounted read only\n"
msgstr ""
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
#, c-format
@@ -216,11 +220,11 @@ msgid "disk"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "failed to create temporary file for download\n"
msgid "url '%s' is invalid\n"
msgstr ""
#, c-format
@@ -447,6 +451,10 @@ msgstr ""
msgid "unexpected error"
msgstr ""
#, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr ""
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr ""
@@ -560,5 +568,5 @@ msgid "no %s cache exists, creating...\n"
msgstr ""
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
msgid "couldn't find or create package cache, using %s instead\n"
msgstr ""

579
lib/libalpm/po/lt.po Normal file
View File

@@ -0,0 +1,579 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Algimantas Margevičius <gymka@mail.ru>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-22 15:52+0000\n"
"Last-Translator: gymka_ltu <gymka@mail.ru>\n"
"Language-Team: Lithuanian (http://www.transifex.net/projects/p/archlinux-"
"pacman/team/lt/)\n"
"Language: lt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
"%100<10 || n%100>=20) ? 1 : 2)\n"
#, c-format
msgid "%s-%s is up to date -- skipping\n"
msgstr "%s-%s yra naujausias -- praleidžiama\n"
#, c-format
msgid "%s-%s is up to date -- reinstalling\n"
msgstr "%s-%s yra naujausias -- perrašoma\n"
#, c-format
msgid "downgrading package %s (%s => %s)\n"
msgstr "pasendinamas paketas %s (%s => %s)\n"
#, c-format
msgid "warning given when extracting %s (%s)\n"
msgstr "bandant išskleisti gautas įspėjimas %s (%s)\n"
#, c-format
msgid "could not extract %s (%s)\n"
msgstr "nepavyko išskleisti %s (%s)\n"
#, c-format
msgid ""
"directory permissions differ on %s\n"
"filesystem: %o package: %o\n"
msgstr ""
"%s aplanko leidimai skiriasi\n"
"failų sistema: %o paketas: %o\n"
#, c-format
msgid "extract: not overwriting dir with file %s\n"
msgstr "išskleidimas: nepakeistas aplankas failu %s\n"
#, c-format
msgid "extract: symlink %s does not point to dir\n"
msgstr "išskleidimas: nuoroda %s neveda į aplanką\n"
#, c-format
msgid "could not rename %s to %s (%s)\n"
msgstr "nepavyko pervadint %s į %s (%s)\n"
#, c-format
msgid "%s saved as %s\n"
msgstr "%s išsaugota kaip %s\n"
#, c-format
msgid "could not install %s as %s (%s)\n"
msgstr "nepavyko įdiegti %s kaip %s (%s)\n"
#, c-format
msgid "%s installed as %s\n"
msgstr "%s įdiegtas kaip %s\n"
#, c-format
msgid "extracting %s as %s.pacnew\n"
msgstr "%s išskleidžiamas kaip %s.pacnew\n"
#, c-format
msgid "could not get current working directory\n"
msgstr "nepavyko nustatyt dabartinio aplanko\n"
#, c-format
msgid "could not change directory to %s (%s)\n"
msgstr "nepavyko pakeist aplanko į %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "nepavyko nustatyt dabartinio aplanko\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "kilo bėdų atnaujinant %s\n"
#, c-format
msgid "problem occurred while installing %s\n"
msgstr "kilo bėdų diegiant %s\n"
#, c-format
msgid "could not update database entry %s-%s\n"
msgstr "nepavyko atnaujint duomenų bazės įrašo %s-%s\n"
#, c-format
msgid "could not add entry '%s' in cache\n"
msgstr "nepavyko pridėti '%s' podėlin\n"
#, c-format
msgid "removing invalid database: %s\n"
msgstr "šalinama neteisinga duomenų bazė: %s\n"
#, c-format
msgid "invalid name for database entry '%s'\n"
msgstr "neteisingas duomenų bazės įrašo pavadinimas '%s'\n"
#, c-format
msgid "duplicated database entry '%s'\n"
msgstr "toks pavadinimas jau yra '%s'\n"
#, c-format
msgid "corrupted database entry '%s'\n"
msgstr "duomenų bazės įrašas sugadintas '%s'\n"
#, c-format
msgid "could not open file %s: %s\n"
msgstr "nepavyko atverti failo %s: %s\n"
#, c-format
msgid "%s database is inconsistent: name mismatch on package %s\n"
msgstr ""
"%s duomenų bazės nesuderinamumas: pavadinimas neatitinka nurodyto pakete %s\n"
#, c-format
msgid "%s database is inconsistent: version mismatch on package %s\n"
msgstr ""
"%s duomenų bazės nesuderinamumas: versija neatitinka nurodytos pakete %s\n"
#, c-format
msgid "could not create directory %s: %s\n"
msgstr "nepavyko sukurti aplanko %s: %s\n"
#, c-format
msgid "could not parse package description file in %s\n"
msgstr "nepavyko perskaityt aprašymo failo %s\n"
#, c-format
msgid "missing package name in %s\n"
msgstr "trūksta paketo pavadinimo %s\n"
#, c-format
msgid "missing package version in %s\n"
msgstr "trūksta paketo versijos %s\n"
#, c-format
msgid "error while reading package %s: %s\n"
msgstr "klaida skaitant paketą %s: %s\n"
#, c-format
msgid "missing package metadata in %s\n"
msgstr "trūksta paketo meta duomenų %s\n"
#, c-format
msgid "removing invalid file: %s\n"
msgstr "šalinamas neteisingas failas: %s\n"
#, c-format
msgid "could not remove lock file %s\n"
msgstr "nepavyko pašalinti užrakinto failo %s\n"
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr "nepavyko perskaityt paketo aprašymo failo %s iš duomenų bazės '%s'\n"
#, c-format
msgid "database path is undefined\n"
msgstr "nenurodytas duomenų bazės kelias\n"
#, c-format
msgid "dependency cycle detected:\n"
msgstr "rastas priklausomybių ciklas:\n"
#, c-format
msgid "%s will be removed after its %s dependency\n"
msgstr "%s bus pašalintas kai bus pašalinta jo priklausomybė %s\n"
#, c-format
msgid "%s will be installed before its %s dependency\n"
msgstr "%s bus įdiegta prieš jo priklausomybę %s\n"
#, c-format
msgid "ignoring package %s-%s\n"
msgstr "ignoruojamas paketas %s-%s\n"
#, c-format
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "negaliu išspręsti \"%s\", \"%s\" priklausomybė\n"
#, c-format
msgid "could not get filesystem information\n"
msgstr "nepavyko gauti failų sistemos informacijos\n"
#, c-format
msgid "could not get filesystem information for %s: %s\n"
msgstr "nepavyko gauti failų sistemos informacijos %s: %s\n"
#, c-format
msgid "could not determine mount point for file %s\n"
msgstr "nepavyko nustatyti prijungimo taško failui %s\n"
#, c-format
msgid "could not determine filesystem mount points\n"
msgstr "nepavyko nustatyt failų sistemos prijungimo taškų\n"
#, c-format
msgid "could not determine root mount point %s\n"
msgstr "nepavyko nustatyt šakninio prijungimo taško %s\n"
#, c-format
msgid "Partition %s is mounted read only\n"
msgstr "Skirsnis %s prijungtas tik skaitymui\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr "Skirsnis %s perpildytas: reikia %ld blokų, laisvi %ld\n"
#, c-format
msgid "disk"
msgstr "diskas"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr "nepavyko sukurti laikino failo parsiuntimui\n"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "neteisingas url '%s'\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "nepavyko gauti failo '%s' iš %s : %s\n"
#, c-format
msgid "%s appears to be truncated: %jd/%jd bytes\n"
msgstr "%s atrodo apkarpyta: %jd/%jd baitai\n"
#, c-format
msgid "failed to download %s\n"
msgstr "nepavyko parsiųsti %s\n"
#, c-format
msgid "out of memory!"
msgstr "nebėra atminties!"
#, c-format
msgid "unexpected system error"
msgstr "netikėta sistemos klaida"
#, c-format
msgid "insufficient privileges"
msgstr "nepakankamos teisės"
#, c-format
msgid "could not find or read file"
msgstr "nepavyko rasti ar perskaityti failo"
#, c-format
msgid "could not find or read directory"
msgstr "nepavyko rasti ar perskaityti aplanko"
#, c-format
msgid "wrong or NULL argument passed"
msgstr "neteisingi arba nepateikti argumentai"
#, c-format
msgid "not enough free disk space"
msgstr "nepakanka laisvos vietos"
#, c-format
msgid "library not initialized"
msgstr "biblioteka neprijungta"
#, c-format
msgid "library already initialized"
msgstr "biblioteka jau prijungta"
#, c-format
msgid "unable to lock database"
msgstr "nepavyko užrakinti duomenų bazės"
#, c-format
msgid "could not open database"
msgstr "nepavyko atverti duomenų bazės"
#, c-format
msgid "could not create database"
msgstr "nepavyko sukurti duomenų bazės"
#, c-format
msgid "database not initialized"
msgstr "duomenų bazė neprijungta"
#, c-format
msgid "database already registered"
msgstr "duomenų bazė jau užregistruota"
#, c-format
msgid "could not find database"
msgstr "nepavyko rasti duomenų bazės"
#, c-format
msgid "invalid or corrupted database"
msgstr "neteisinga arba sugadinta duomenų bazė"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr "neteisinga arba sugadinta duomenų bazė (PGP parašas)"
#, c-format
msgid "database is incorrect version"
msgstr "neteisinga duomenų bazės versija"
#, c-format
msgid "could not update database"
msgstr "nepavyko atnaujinti duomenų bazės"
#, c-format
msgid "could not remove database entry"
msgstr "nepavyko pašalinti duomenų bazės įrašo"
#, c-format
msgid "invalid url for server"
msgstr "neteisingas serverio url"
#, c-format
msgid "no servers configured for repository"
msgstr "saugyklai nenurodytas joks serveris "
#, c-format
msgid "transaction already initialized"
msgstr "perdavimas jau pradėtas"
#, c-format
msgid "transaction not initialized"
msgstr "perdavimas nepradėtas"
#, c-format
msgid "duplicate target"
msgstr "objektas jau yra"
#, c-format
msgid "transaction not prepared"
msgstr "perdavimas neparuoštas"
#, c-format
msgid "transaction aborted"
msgstr "perdavimas atšauktas"
#, c-format
msgid "operation not compatible with the transaction type"
msgstr "operacija nesuderinama su perdavimo tipu"
#, c-format
msgid "transaction commit attempt when database is not locked"
msgstr "bandoma perduoti kol duomenų bazė neužrakinta"
#, c-format
msgid "could not find or read package"
msgstr "nepavyko rasti ar perskaityti paketo"
#, c-format
msgid "operation cancelled due to ignorepkg"
msgstr "veiksmas atšauktas dėl ignorepkg"
#, c-format
msgid "invalid or corrupted package"
msgstr "neteisingas arba sugadintas paketas"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr "neteisingas arba sugadintas paketas (kontrolinė suma)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr "neteisingas arba sugadintas paketas (PGP parašas)"
#, c-format
msgid "cannot open package file"
msgstr "nepavyko atverti paketo failo"
#, c-format
msgid "cannot remove all files for package"
msgstr "negalima pašalinti visų paketo failų"
#, c-format
msgid "package filename is not valid"
msgstr "paketo vardas neteisingas"
#, c-format
msgid "package architecture is not valid"
msgstr "paketo architektūra neteisinga"
#, c-format
msgid "could not find repository for target"
msgstr "nepavyko rasti saugyklos objektui"
#, c-format
msgid "missing PGP signature"
msgstr "trūksta PGP parašo"
#, c-format
msgid "invalid PGP signature"
msgstr "neteisingas PGP parašas"
#, c-format
msgid "invalid or corrupted delta"
msgstr "neteisinga arba sugadinta delta"
#, c-format
msgid "delta patch failed"
msgstr "nepavyko ištaisyti delta"
#, c-format
msgid "could not satisfy dependencies"
msgstr "nepavyko patenkinti priklausomybių"
#, c-format
msgid "conflicting dependencies"
msgstr "nesuderinamos priklausomybės"
#, c-format
msgid "conflicting files"
msgstr "nesuderinami failai"
#, c-format
msgid "failed to retrieve some files"
msgstr "nepavyko gauti kai kurių failų"
#, c-format
msgid "invalid regular expression"
msgstr "neteisinga regular expression"
#, c-format
msgid "libarchive error"
msgstr "libarchive klaida"
#, c-format
msgid "download library error"
msgstr "parsiuntimo bibliotekos klaida"
#, c-format
msgid "gpgme error"
msgstr "gpgme klaida"
#, c-format
msgid "error invoking external downloader"
msgstr "klaida iškviečiant išorinį parsiuntėją"
#, c-format
msgid "unexpected error"
msgstr "netikėta klaida"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "nepavyko rasti ar perskaityti paketo"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "duomenų bazėj nepavyko rasti %s -- praleidžiama\n"
#, c-format
msgid "removing %s from target list\n"
msgstr "šalinamas %s iš objektų sąrašo\n"
#, c-format
msgid "cannot remove file '%s': %s\n"
msgstr "nepavyko pašalinti failo '%s': %s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr "nepavyko pašalinti %s (%s)\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
msgstr "nepavyko pašalinti duomenų bazės įrašo %s-%s\n"
#, c-format
msgid "could not remove entry '%s' from cache\n"
msgstr "iš podėlio nepavyko pašalinti įrašo '%s'\n"
#, c-format
msgid "%s: ignoring package upgrade (%s => %s)\n"
msgstr "%s: ignoruojamas paketo atnaujinimas (%s => %s)\n"
#, c-format
msgid "%s: ignoring package downgrade (%s => %s)\n"
msgstr "%s: ignoruojamas paketo sendinimas (%s => %s)\n"
#, c-format
msgid "%s: downgrading from version %s to version %s\n"
msgstr "%s: sendinama iš versijos %s į versiją %s\n"
#, c-format
msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr "%s: vietinis (%s) yra naujesnis nei %s (%s)\n"
#, c-format
msgid "ignoring package replacement (%s-%s => %s-%s)\n"
msgstr "ignoruojamas paketų keitimas (%s-%s => %s-%s)\n"
#, c-format
msgid "cannot replace %s by %s\n"
msgstr "negalima pakeisti %s failu %s\n"
#, c-format
msgid "unresolvable package conflicts detected\n"
msgstr "aptikti neišsprendžiami paketų nesuderinamumai\n"
#, c-format
msgid "removing '%s' from target list because it conflicts with '%s'\n"
msgstr "iš objektų sąrašo šalinamas '%s' dėl konfliktų su '%s'\n"
#, c-format
msgid "failed to retrieve some files from %s\n"
msgstr "nepavyko gauti kai kurių failų iš %s\n"
#, c-format
msgid "could not commit removal transaction\n"
msgstr "nepavyko įvykdyt šalinimo perdavimo\n"
#, c-format
msgid "could not commit transaction\n"
msgstr "nepavyko įvykdyt perdavimo\n"
#, c-format
msgid "could not create temp directory\n"
msgstr "nepavyko sukurti lakino aplanko\n"
#, c-format
msgid "could not copy tempfile to %s (%s)\n"
msgstr "negaliu nukopijuoti laikiną failą į %s (%s)\n"
#, c-format
msgid "could not remove tmpdir %s\n"
msgstr "nepavyko pašalinti tmpdir %s\n"
#, c-format
msgid "could not create pipe (%s)\n"
msgstr "nepavyko sukurti pipe (%s)\n"
#, c-format
msgid "could not fork a new process (%s)\n"
msgstr "nepavyko iššakoti naujo proceso (%s)\n"
#, c-format
msgid "could not change the root directory (%s)\n"
msgstr "nepavyko pakeisti šakninio aplanko (%s)\n"
#, c-format
msgid "call to execv failed (%s)\n"
msgstr "nepavyko iškviesti execv (%s)\n"
#, c-format
msgid "call to waitpid failed (%s)\n"
msgstr "nepavyko iškviesti waitpid (%s)\n"
#, c-format
msgid "could not open pipe (%s)\n"
msgstr "nepavyko atverti pipe (%s)\n"
#, c-format
msgid "command failed to execute correctly\n"
msgstr "nepavyko teisingai įvykdyti komandos\n"
#, c-format
msgid "no %s cache exists, creating...\n"
msgstr "%s podėlis neegzistuoja, kuriamas...\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "nepavyko sukurti paketo podėlio. vietoj jo naudojama /tmp\n"

View File

@@ -2,13 +2,14 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Jon Gjengset <jon@thesquareplanet.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Norwegian Bokmål (http://www.transifex.net/projects/p/"
"archlinux-pacman/team/nb/)\n"
@@ -82,6 +83,10 @@ msgstr "kunne ikke motta nåværende mappe\n"
msgid "could not change directory to %s (%s)\n"
msgstr "kunne ikke endre mappe til %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "kunne ikke motta nåværende mappe\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "problem oppstod under oppgradering av %s\n"
@@ -210,8 +215,8 @@ msgstr "kunne ikke avgjøre rotmonteringspunkt %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "Partisjonen %s er kun tilgjengelig for skriving\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"Partisjonen %s er for full: %ld blokker trengs, %ld blokker tilgjengelig\n"
@@ -219,14 +224,14 @@ msgstr ""
msgid "disk"
msgstr "disk"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' er ugyldig\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' er ugyldig\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "mottakelse av fil '%s' fra %s : %s feilet\n"
@@ -363,9 +368,9 @@ msgstr "kunne ikke finne eller lese pakke"
msgid "operation cancelled due to ignorepkg"
msgstr "operasjon avsluttet grunnet ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "invalid"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -451,6 +456,10 @@ msgstr "påkalling av ekstern nedlaster feilet"
msgid "unexpected error"
msgstr "uforventet feil"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "kunne ikke finne eller lese pakke"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "kunne ikke finne %s i database -- hopper over\n"
@@ -563,6 +572,6 @@ msgstr "kommando feilet å kjøre korrekt\n"
msgid "no %s cache exists, creating...\n"
msgstr "ingen %s cache eksisterer, lager en ...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "kunne ikke danne pakke-cache, bruker /tmp istedenfor\n"

View File

@@ -2,13 +2,14 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Bartek Piotrowski <barthalion@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Polish (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/pl/)\n"
@@ -83,6 +84,10 @@ msgstr "nie można znaleźć obecnego katalogu\n"
msgid "could not change directory to %s (%s)\n"
msgstr "nie udało się zmienić katalogu na %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "nie można znaleźć obecnego katalogu\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "wystąpiły błędy podczas aktualizacji %s\n"
@@ -211,8 +216,8 @@ msgstr "nie można określić punktu montowania partycji systemowej %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "Partycja %s jest zamontowana tylko do odczytu\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"Partycja %s jest zapełniona: %ld potrzebnych bloków, %ld wolnych bloków\n"
@@ -220,14 +225,14 @@ msgstr ""
msgid "disk"
msgstr "dysk"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' jest błędny\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' jest błędny\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "nie udało się pobrać pliku '%s' z %s : %s\n"
@@ -364,9 +369,9 @@ msgstr "nie udało się znaleźć bądź odczytać pakietu"
msgid "operation cancelled due to ignorepkg"
msgstr "operacja anulowana przez ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "nieprawidłowy bądź uszkodzony pakiet przyrostowy"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -453,6 +458,10 @@ msgstr ""
msgid "unexpected error"
msgstr "niespodziewany błąd"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "nie udało się znaleźć bądź odczytać pakietu"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "nie udało się odnaleźć %s w bazie danych -- pomijanie\n"
@@ -565,7 +574,7 @@ msgstr "komenda nie wykonała się poprawnie\n"
msgid "no %s cache exists, creating...\n"
msgstr "brak pamięci podręcznej dla %s, tworzenie...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr ""
"nie udało się stworzyć pamięci podręcznej pakietu, używanie /tmp w zamian\n"

View File

@@ -2,13 +2,14 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Gaspar Santos <omeuviolino@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Portuguese (http://www.transifex.net/projects/p/archlinux-"
"pacman/team/pt/)\n"
@@ -82,6 +83,10 @@ msgstr "não foi possível obter o diretório de trabalho actual\n"
msgid "could not change directory to %s (%s)\n"
msgstr "não foi possível mudar o diretório para %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "não foi possível obter o diretório de trabalho actual\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "ocorreram erros durante a actualização de %s\n"
@@ -213,8 +218,8 @@ msgstr "não é possível determinar o ponto de montagem do \"root\" %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "A partição %s está montada somente para leitura\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"A partição %s está cheia: são necessários %ld blocos, estão livres %ld "
"blocos\n"
@@ -223,14 +228,14 @@ msgstr ""
msgid "disk"
msgstr "disco"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' é inválida\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' é inválida\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "falha ao obter ficheiro '%s' de %s : %s\n"
@@ -367,9 +372,9 @@ msgstr "não foi possível ler ou escrever o pacote"
msgid "operation cancelled due to ignorepkg"
msgstr "operação cancelada devido a ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "delta inválido ou corrompido"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -455,6 +460,10 @@ msgstr "erro ao invocar o programa de descargas externo"
msgid "unexpected error"
msgstr "erro inesperado"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "não foi possível ler ou escrever o pacote"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "não foi possível encontrar %s na base de dados - a ignorar\n"
@@ -567,7 +576,7 @@ msgstr "comando não executado corretamente\n"
msgid "no %s cache exists, creating...\n"
msgstr "cache %s não existe, a criar...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr ""
"não foi possível criar cache de pacotes, a usar /tmp como alternativa\n"

View File

@@ -2,16 +2,18 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Sandro <sandrossv@hotmail.com>, 2011.
# Translators:
# ambaratti <ambaratti.listas@gmail.com>, 2011.
# Dan McGee <dpmcgee@gmail.com>, 2011.
# Rafael <rafael.f.f1@gmail.com>, 2011.
# Sandro <sandrossv@hotmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-09-06 16:45+0000\n"
"Last-Translator: rafaelff1 <rafael.f.f1@gmail.com>\n"
"Language-Team: Portuguese (Brazilian) (http://www.transifex.net/projects/p/"
"archlinux-pacman/team/pt_BR/)\n"
"Language: pt_BR\n"
@@ -84,6 +86,10 @@ msgstr "não foi possível obter o diretório de trabalho atual\n"
msgid "could not change directory to %s (%s)\n"
msgstr "não foi possível mudar para o diretório %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "não foi possível obter o diretório de trabalho atual\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "ocorreram problemas durante a atualização de %s\n"
@@ -165,6 +171,8 @@ msgstr "não foi possível remover o arquivo de trava %s\n"
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr ""
"não foi possível analisar arquivo de descrição de pacote '%s' do banco de "
"dados '%s'\n"
#, c-format
msgid "database path is undefined\n"
@@ -172,7 +180,7 @@ msgstr "caminho da base de dados não definido\n"
#, c-format
msgid "dependency cycle detected:\n"
msgstr "dependência cíclica detetada:\n"
msgstr "dependência cíclica detectada:\n"
#, c-format
msgid "%s will be removed after its %s dependency\n"
@@ -216,8 +224,8 @@ msgstr "não foi possível determinar o ponto de montagem da raiz %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "Partição %s está montada somente para leitura\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"A partição %s está cheia: %ld bloco(s) necessário(s), %ld bloco(s) livre(s)\n"
@@ -226,12 +234,12 @@ msgid "disk"
msgstr "disco"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "a url '%s' é inválida\n"
msgid "failed to create temporary file for download\n"
msgstr "falha em criar arquivo temporário para download\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
msgid "url '%s' is invalid\n"
msgstr "a url '%s' é inválida\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
@@ -307,11 +315,11 @@ msgstr "não foi possível encontrar a base de dados"
#, c-format
msgid "invalid or corrupted database"
msgstr ""
msgstr "banco de dados inválido ou corrompido"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr ""
msgstr "banco de dados inválido ou corrompido (assinatura PGP)"
#, c-format
msgid "database is incorrect version"
@@ -369,17 +377,17 @@ msgstr "não foi possível ler ou escrever o pacote"
msgid "operation cancelled due to ignorepkg"
msgstr "operação cancelada devido a ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "delta inválido ou corrompido"
msgstr "pacote inválido ou corrompido"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr ""
msgstr "pacote inválido ou corrompido (checksum)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr ""
msgstr "pacote inválido ou corrompido (assinatura PGP)"
#, c-format
msgid "cannot open package file"
@@ -403,11 +411,11 @@ msgstr "não foi possível encontrar o repositório para o pacote"
#, c-format
msgid "missing PGP signature"
msgstr ""
msgstr "assinatura PGP faltando"
#, c-format
msgid "invalid PGP signature"
msgstr ""
msgstr "assinatura PGP inválida"
#, c-format
msgid "invalid or corrupted delta"
@@ -447,7 +455,7 @@ msgstr "erro na biblioteca de download"
#, c-format
msgid "gpgme error"
msgstr ""
msgstr "erro no gpgme"
#, c-format
msgid "error invoking external downloader"
@@ -457,6 +465,10 @@ msgstr "erro ao chamar o programa de download externo"
msgid "unexpected error"
msgstr "erro inesperado"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "não foi possível ler ou escrever o pacote"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "não foi possível encontrar %s na base de dados -- ignorando\n"
@@ -467,11 +479,11 @@ msgstr "removendo \"%s\" da lista de pacotes a serem atualizados\n"
#, c-format
msgid "cannot remove file '%s': %s\n"
msgstr "não foi possível remover o arquivo '%s': %s\n"
msgstr "não foi possível remover o arquivo \"%s\": %s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr ""
msgstr "Não pude remover %s (%s)\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
@@ -479,7 +491,7 @@ msgstr "não foi possível remover o registro da base de dados %s-%s\n"
#, c-format
msgid "could not remove entry '%s' from cache\n"
msgstr "não foi possível remover a entrada '%s' do cache\n"
msgstr "não foi possível remover a entrada \"%s\" do cache\n"
#, c-format
msgid "%s: ignoring package upgrade (%s => %s)\n"
@@ -507,11 +519,11 @@ msgstr "não foi possível substituir %s por %s\n"
#, c-format
msgid "unresolvable package conflicts detected\n"
msgstr "conflito de pacotes não solucionável detetado\n"
msgstr "conflito de pacotes não solucionável detectado\n"
#, c-format
msgid "removing '%s' from target list because it conflicts with '%s'\n"
msgstr "removendo '%s' da lista de pacotes porque ele conflita com '%s'\n"
msgstr "removendo \"%s\" da lista de pacotes porque ele conflita com \"%s\"\n"
#, c-format
msgid "failed to retrieve some files from %s\n"
@@ -569,6 +581,6 @@ msgstr "comando não executado corretamente\n"
msgid "no %s cache exists, creating...\n"
msgstr "cache %s não existe, criando...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "não foi possível criar cache de pacotes, usando /tmp em seu lugar\n"

View File

@@ -2,17 +2,18 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# cantabile <cantabile.desu@gmail.com>, 2011.
# Mihai Coman <mihai@m1x.ro>, 2011.
# Ionut Biru <ibiru@archlinux.org>, 2011.
# Dan McGee <dpmcgee@gmail.com>, 2011.
# Ionut Biru <ibiru@archlinux.org>, 2011.
# Mihai Coman <mihai@m1x.ro>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-10 13:54+0000\n"
"Last-Translator: z0id <mihai@m1x.ro>\n"
"Language-Team: Romanian (http://www.transifex.net/projects/p/archlinux-"
"pacman/team/ro/)\n"
"Language: ro\n"
@@ -88,6 +89,10 @@ msgstr ""
"nu s-a putut intra în directorul %s (%s)\n"
"\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "nu s-a putut determina directorul de lucru curent\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "problemă apărută la actualizarea %s\n"
@@ -170,6 +175,8 @@ msgstr "nu poate fi eliminat fișierul de blocare %s\n"
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr ""
"nu s-a putut analiza fișierul '%s' de descriere a pachetului din db '%s'\n"
"\n"
#, c-format
msgid "database path is undefined\n"
@@ -220,8 +227,8 @@ msgstr "nu s-a putut determina locul de montare al partiției root %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "partiția %s este montată numai citire\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr "Partiția %s e plină: %ld blocuri necesare, %ld blocuri disponibile\n"
#, c-format
@@ -229,12 +236,12 @@ msgid "disk"
msgstr "disc"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "URL '%s' este nevalid\n"
msgid "failed to create temporary file for download\n"
msgstr "eșec la crearea fișierului temporar pentru descărcare\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
msgid "url '%s' is invalid\n"
msgstr "URL '%s' este nevalid\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
@@ -310,11 +317,11 @@ msgstr "nu poate fi găsită baza de date"
#, c-format
msgid "invalid or corrupted database"
msgstr ""
msgstr "bază de date coruptă sau nevalidă"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr ""
msgstr "bază de date coruptă sau nevalidă (semnătura PGP)"
#, c-format
msgid "database is incorrect version"
@@ -372,17 +379,17 @@ msgstr "pachetul nu poate fi găsit sau citit"
msgid "operation cancelled due to ignorepkg"
msgstr "operație abandonată datorită ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "delta invalid sau corupt"
msgstr "pachet corupt sau nevalid"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr ""
msgstr "pachet corupt sau nevalid (sumă de control)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr ""
msgstr "pachet corupt sau nevalid (semnătură PGP)"
#, c-format
msgid "cannot open package file"
@@ -406,11 +413,11 @@ msgstr "depozitul pentru țintă nu poate fi găsit"
#, c-format
msgid "missing PGP signature"
msgstr ""
msgstr "semnătură PGP lipsă"
#, c-format
msgid "invalid PGP signature"
msgstr ""
msgstr "semnătură PGP nevalidă"
#, c-format
msgid "invalid or corrupted delta"
@@ -450,7 +457,7 @@ msgstr "eroare în biblioteca de descărcare"
#, c-format
msgid "gpgme error"
msgstr ""
msgstr "eroare gpgme"
#, c-format
msgid "error invoking external downloader"
@@ -460,6 +467,10 @@ msgstr "eroare la invocarea descărcătorului extern"
msgid "unexpected error"
msgstr "eroare neașteptată"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "pachetul nu poate fi găsit sau citit"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "nu poate fi găsit %s în baza de date -- se omite\n"
@@ -474,7 +485,7 @@ msgstr "nu poate fi eliminat fișierul '%s': %s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr ""
msgstr "nu se poate elimina %s (%s)\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
@@ -572,6 +583,6 @@ msgstr "executarea corectă a comenzii a eșuat\n"
msgid "no %s cache exists, creating...\n"
msgstr "nu există cache %s, se crează...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "nu se poate crea cache pachet, se folosește /tmp în schimb\n"

View File

@@ -2,15 +2,16 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Dan McGee <dpmcgee@gmail.com>, 2011.
# Ivan Yurasov <vdk@gmx.us>, 2011.
# partizan <serg.partizan@gmail.com>, 2011.
# Dan McGee <dpmcgee@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Russian (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/ru/)\n"
@@ -85,6 +86,10 @@ msgstr "не удалось определить текущий рабочий
msgid "could not change directory to %s (%s)\n"
msgstr "не удалось изменить каталог на %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "не удалось определить текущий рабочий каталог\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "обнаружена проблема во время обновления %s\n"
@@ -215,8 +220,8 @@ msgstr "не удалось определить точку монтирован
msgid "Partition %s is mounted read only\n"
msgstr "Раздел %s смонтирован только для чтения\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"Раздел %s заполнен полностью: необходимо %ld блоков, доступно %ld блоков\n"
"\n"
@@ -225,14 +230,14 @@ msgstr ""
msgid "disk"
msgstr "диск"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "ссылка '%s' некорректна\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "ссылка '%s' некорректна\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "не удалось получить файл '%s' из %s : %s\n"
@@ -369,9 +374,9 @@ msgstr "не удалось найти или прочитать пакет"
msgid "operation cancelled due to ignorepkg"
msgstr "операция прервана из-за ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "ошибка или повреждение в дельте"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -457,6 +462,10 @@ msgstr "ошибка вызова внешнего менеджера загру
msgid "unexpected error"
msgstr "непредвиденная ошибка"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "не удалось найти или прочитать пакет"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "не удалось найти %s в базе данных -- пропускается\n"
@@ -569,6 +578,6 @@ msgstr "не удалось корректно выполнить команду
msgid "no %s cache exists, creating...\n"
msgstr "кэш %s не существует, создается...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "не удалось создать кэш пакетов, будет использован /tmp\n"

View File

@@ -2,13 +2,14 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# jose1711 <jose1711@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Slovak (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/sk/)\n"
@@ -82,6 +83,10 @@ msgstr "nie je možné zistiť aktuálny pracovný adresár\n"
msgid "could not change directory to %s (%s)\n"
msgstr "nie je možné prepnúť sa do adresára %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "nie je možné zistiť aktuálny pracovný adresár\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "nastal problém pri aktualizácii %s\n"
@@ -210,8 +215,8 @@ msgstr "nepodarilo sa určiť bod pripojenia pre koreň %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "Partícia %s je pripojená iba v režime na čítanie\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"Partícia %s je príliš plná: %ld blokov potrebných, %ld blokov voľných\n"
@@ -219,14 +224,14 @@ msgstr ""
msgid "disk"
msgstr "disk"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "URL '%s' je neplatná\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "URL '%s' je neplatná\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "chyba pri získavaní súboru '%s' z %s: %s\n"
@@ -363,9 +368,9 @@ msgstr "nie je možné nájsť alebo prečítať balíček"
msgid "operation cancelled due to ignorepkg"
msgstr "operácia bola zrušená kvôli ignorovanému balíčku"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "neplatný alebo poškodený delta rozdiel"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -451,6 +456,10 @@ msgstr "chyba volania externého programu pre sťahovanie súborov"
msgid "unexpected error"
msgstr "neočakávaná chyba"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "nie je možné nájsť alebo prečítať balíček"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "nie je možné nájsť %s v databáze -- preskakujem\n"
@@ -563,6 +572,6 @@ msgstr "príkaz sa nepodarilo spustiť správne\n"
msgid "no %s cache exists, creating...\n"
msgstr "neexistuje cache %s, vytváram...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "nie je možné vytvoriť cache balíčkov, použijem /tmp\n"

View File

@@ -2,13 +2,14 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Slobodan Terzić <githzerai06@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Serbian (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/sr/)\n"
@@ -83,6 +84,10 @@ msgstr "не могу да одредим радну фасциклу\n"
msgid "could not change directory to %s (%s)\n"
msgstr "не могу да променим фасциклу у %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "не могу да одредим радну фасциклу\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "дошло је до грешке при надоградњи %s\n"
@@ -211,8 +216,8 @@ msgstr "не могу да утврдим корену тачку монтира
msgid "Partition %s is mounted read only\n"
msgstr "Партиција %s је монтирана само за читање\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"Партиција %s је препуна: потребно је %ld блокова, али је %ld слободно\n"
@@ -220,14 +225,14 @@ msgstr ""
msgid "disk"
msgstr "диск"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "„%s“ је нисправан урл\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "„%s“ је нисправан урл\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "неуспешно преузимање фајла „%s“ са „%s“: %s\n"
@@ -364,9 +369,9 @@ msgstr "не могу да нађем или прочитам пакет"
msgid "operation cancelled due to ignorepkg"
msgstr "радња је отказана због игнорисаног пакета"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "неисправна или покварена делта"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -452,6 +457,10 @@ msgstr "грешка при покретању спољног програма
msgid "unexpected error"
msgstr "неочекивана грешка"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "не могу да нађем или прочитам пакет"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "не могу да нађем %s у бази — прескачем\n"
@@ -564,6 +573,6 @@ msgstr "неуспешно правилно извршавање наредбе\
msgid "no %s cache exists, creating...\n"
msgstr "не постоји кеш за %s; правим....\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "не могу да направим кеш пакета; користим /tmp као замену\n"

View File

@@ -2,13 +2,14 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Slobodan Terzić <githzerai06@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Serbian (Latin) (http://www.transifex.net/projects/p/"
"archlinux-pacman/team/sr@latin/)\n"
@@ -83,6 +84,10 @@ msgstr "ne mogu da odredim radnu fasciklu\n"
msgid "could not change directory to %s (%s)\n"
msgstr "ne mogu da promenim fasciklu u %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "ne mogu da odredim radnu fasciklu\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "došlo je do greške pri nadogradnji %s\n"
@@ -211,8 +216,8 @@ msgstr "ne mogu da utvrdim korenu tačku montiranja %s\n"
msgid "Partition %s is mounted read only\n"
msgstr "Particija %s je montirana samo za čitanje\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
"Particija %s je prepuna: potrebno je %ld blokova, ali je %ld slobodno\n"
@@ -220,14 +225,14 @@ msgstr ""
msgid "disk"
msgstr "disk"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "„%s“ je nispravan url\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "„%s“ je nispravan url\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "neuspešno preuzimanje fajla „%s“ sa „%s“: %s\n"
@@ -364,9 +369,9 @@ msgstr "ne mogu da nađem ili pročitam paket"
msgid "operation cancelled due to ignorepkg"
msgstr "radnja je otkazana zbog ignorisanog paketa"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "neispravna ili pokvarena delta"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -452,6 +457,10 @@ msgstr "greška pri pokretanju spoljnog programa za preuzimanje"
msgid "unexpected error"
msgstr "neočekivana greška"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "ne mogu da nađem ili pročitam paket"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "ne mogu da nađem %s u bazi — preskačem\n"
@@ -564,6 +573,6 @@ msgstr "neuspešno pravilno izvršavanje naredbe\n"
msgid "no %s cache exists, creating...\n"
msgstr "ne postoji keš za %s; pravim....\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "ne mogu da napravim keš paketa; koristim /tmp kao zamenu\n"

View File

@@ -2,14 +2,16 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language-Team: Swedish (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/sv/)\n"
"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -80,6 +82,10 @@ msgstr "kunde inte hitta nuvarande sökväg\n"
msgid "could not change directory to %s (%s)\n"
msgstr "kunde inte byta katalog till %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "kunde inte hitta nuvarande sökväg\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "problem uppstod under uppgraderingen %s\n"
@@ -209,21 +215,21 @@ msgid "Partition %s is mounted read only\n"
msgstr ""
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr ""
#, c-format
msgid "disk"
msgstr "disk"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' är ogiltigt\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' är ogiltigt\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "misslyckades hämta filen '%s' från %s : %s\n"
@@ -360,9 +366,9 @@ msgstr "kunde inte hitta eller förbereda paket"
msgid "operation cancelled due to ignorepkg"
msgstr "operationen avbryten på grund av ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "ogiltig eller korrupt delta"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -448,6 +454,10 @@ msgstr "fel vid anrop av extern nerladdare"
msgid "unexpected error"
msgstr "oväntat fel"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "kunde inte hitta eller förbereda paket"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "kunde inte hitta %s i databasen -- hoppar över\n"
@@ -560,6 +570,6 @@ msgstr "kommando misslyckades att exekveras korrekt\n"
msgid "no %s cache exists, creating...\n"
msgstr "ingen %s cache existerar, skapar...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "kunde inte skapa paket-cache, använder /tmp istället\n"

View File

@@ -2,14 +2,15 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Samed Beyribey <ras0ir@eventualis.org>, 2011.
# Translators:
# Dan McGee <dpmcgee@gmail.com>, 2011.
# Samed Beyribey <ras0ir@eventualis.org>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Turkish (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/tr/)\n"
@@ -83,6 +84,10 @@ msgstr "üzerinde çalışılan dizin algılanamadı\n"
msgid "could not change directory to %s (%s)\n"
msgstr "%s dizinine geçilemedi (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "üzerinde çalışılan dizin algılanamadı\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "%s güncellenirken bir sorun meydana geldi\n"
@@ -211,22 +216,22 @@ msgstr "%s kök bağlama noktası belirlenemedi\n"
msgid "Partition %s is mounted read only\n"
msgstr "%s bölümü salt okunur olarak bağlandı\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr "%s bölümü dolu: %ld blok gerekiyor, %ld blok boş\n"
#, c-format
msgid "disk"
msgstr "disk"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "'%s' adresi geçersiz\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "'%s' adresi geçersiz\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "%3$s hatası nedeniyle '%1$s' dosyası %2$s adresinden alınamadı\n"
@@ -363,9 +368,9 @@ msgstr "paket bulunamadı veya okunamadı"
msgid "operation cancelled due to ignorepkg"
msgstr "ignorepkg nedeniyle işlem iptal edildi"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "geçersiz ya da bozuk veri"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -451,6 +456,10 @@ msgstr "harici indiriciyi çağırırken hata oluştu"
msgid "unexpected error"
msgstr "beklenmedik hata"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "paket bulunamadı veya okunamadı"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "%s veritabanında bulunamadı -- atlanıyor\n"
@@ -564,6 +573,6 @@ msgstr "komut düzgün çalıştırılamadı\n"
msgid "no %s cache exists, creating...\n"
msgstr "%s önbelleği yok, oluşturuluyor...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "paket önbelleği oluşturulamadı, /tmp kullanılacak\n"

View File

@@ -2,14 +2,17 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Данило Коростіль <ted.korostiled@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-17 21:05+0000\n"
"Last-Translator: Wiseacre <ted.korostiled@gmail.com>\n"
"Language-Team: Ukrainian (http://www.transifex.net/projects/p/archlinux-"
"pacman/team/uk/)\n"
"Language: uk\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,11 +22,11 @@ msgstr ""
#, c-format
msgid "%s-%s is up to date -- skipping\n"
msgstr "%s-%s не потребує оновлення -- пропущено\n"
msgstr "%s-%s не потребує оновлення пропущено\n"
#, c-format
msgid "%s-%s is up to date -- reinstalling\n"
msgstr "%s-%s не потребує оновлення -- перевстановлюється\n"
msgstr "%s-%s не потребує оновлення перевстановлюється\n"
#, c-format
msgid "downgrading package %s (%s => %s)\n"
@@ -31,7 +34,7 @@ msgstr "пониження версії пакунку %s (%s => %s)\n"
#, c-format
msgid "warning given when extracting %s (%s)\n"
msgstr ""
msgstr "Видається попередження протягом розпакування %s (%s)\n"
#, c-format
msgid "could not extract %s (%s)\n"
@@ -42,12 +45,12 @@ msgid ""
"directory permissions differ on %s\n"
"filesystem: %o package: %o\n"
msgstr ""
"права каталога відрізняються на\n"
"права каталогу відрізняються у\n"
"файловій системі %s: %o пакунок: %o\n"
#, c-format
msgid "extract: not overwriting dir with file %s\n"
msgstr "розпакування: каталог не було перезаписано файлом %s\n"
msgstr "розпакування: каталог не перезаписано файлом %s\n"
#, c-format
msgid "extract: symlink %s does not point to dir\n"
@@ -75,19 +78,23 @@ msgstr "розпакування %s як %s.pacnew\n"
#, c-format
msgid "could not get current working directory\n"
msgstr "неможливо отримати поточний робочий каталог\n"
msgstr "неможливо одержати поточний робочий каталог\n"
#, c-format
msgid "could not change directory to %s (%s)\n"
msgstr "неможливо змінити каталог на %s (%s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "неможливо одержати поточний робочий каталог\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "з'явилась проблема при оновленні %s\n"
msgstr "виникла проблема протягом оновлення %s\n"
#, c-format
msgid "problem occurred while installing %s\n"
msgstr "з'явилась проблема при встановленні %s\n"
msgstr "виникла проблема протягом установлення %s\n"
#, c-format
msgid "could not update database entry %s-%s\n"
@@ -95,23 +102,23 @@ msgstr "неможливо оновити запис бази даних %s-%s\n
#, c-format
msgid "could not add entry '%s' in cache\n"
msgstr "неможливо додати запис '%s' у кеш\n"
msgstr "неможливо додати запис «%s» у кеш\n"
#, c-format
msgid "removing invalid database: %s\n"
msgstr "вилучення невірної бази даних: %s\n"
msgstr "вилучення неправильної бази даних: %s\n"
#, c-format
msgid "invalid name for database entry '%s'\n"
msgstr "невірне ім'я для запису бази даних '%s'\n"
msgstr "неправильна назва для запису бази даних «%s»\n"
#, c-format
msgid "duplicated database entry '%s'\n"
msgstr "дублікат у базі даних '%s'\n"
msgstr "дублікат у базі даних «%s»\n"
#, c-format
msgid "corrupted database entry '%s'\n"
msgstr "пошкоджений запис у базі даних '%s'\n"
msgstr "пошкоджений запис у базі даних «%s»\n"
#, c-format
msgid "could not open file %s: %s\n"
@@ -119,11 +126,11 @@ msgstr "неможливо відкрити файл %s: %s\n"
#, c-format
msgid "%s database is inconsistent: name mismatch on package %s\n"
msgstr "база даних %s неоднорідна: неспівпадіння назви для пакунка %s\n"
msgstr "база даних %s неоднорідна: не збігаються назви для пакунка %s\n"
#, c-format
msgid "%s database is inconsistent: version mismatch on package %s\n"
msgstr "база даних %s неоднорідна: неспівпадіння версій для пакунка %s\n"
msgstr "база даних %s неоднорідна: не збігаються версії для пакунка %s\n"
#, c-format
msgid "could not create directory %s: %s\n"
@@ -135,23 +142,23 @@ msgstr "неможливо розібрати файл опису пакунка
#, c-format
msgid "missing package name in %s\n"
msgstr "бракує імені пакунку в %s\n"
msgstr "бракує назви пакунка в %s\n"
#, c-format
msgid "missing package version in %s\n"
msgstr "бракує версії пакунку в %s\n"
msgstr "бракує версії пакунка в %s\n"
#, c-format
msgid "error while reading package %s: %s\n"
msgstr "помилка при читанні пакунку %s: %s\n"
msgstr "помилка при читанні пакунка %s: %s\n"
#, c-format
msgid "missing package metadata in %s\n"
msgstr "бракує метаданих пакунку в %s\n"
msgstr "бракує метаданих пакунка в %s\n"
#, c-format
msgid "removing invalid file: %s\n"
msgstr ""
msgstr "вилучення неправильного файла : %s\n"
#, c-format
msgid "could not remove lock file %s\n"
@@ -159,7 +166,7 @@ msgstr "неможливо вилучити файл блокування %s\n"
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr ""
msgstr "неможливо розібрати файла опису пакунка «%s» з бази даних «%s»\n"
#, c-format
msgid "database path is undefined\n"
@@ -175,7 +182,7 @@ msgstr "%s буде вилучено після його залежності %s
#, c-format
msgid "%s will be installed before its %s dependency\n"
msgstr "%s буде встановлено перед його %s залежністю\n"
msgstr "%s буде встановлено перед його залежністю %s\n"
#, c-format
msgid "ignoring package %s-%s\n"
@@ -183,59 +190,59 @@ msgstr "ігнорування пакунка %s-%s\n"
#, c-format
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "неможливо розв'язати \"%s\", залежність \"%s\"\n"
msgstr "неможливо розв'язати «%s», залежність від «%s»\n"
#, c-format
msgid "could not get filesystem information\n"
msgstr ""
msgstr "неможливо одержати інформації про файлову систему\n"
#, c-format
msgid "could not get filesystem information for %s: %s\n"
msgstr ""
msgstr "неможливо одержати інформації про файлову систему для %s: %s\n"
#, c-format
msgid "could not determine mount point for file %s\n"
msgstr ""
msgstr "неможливо визначити точки монтування для файла %s\n"
#, c-format
msgid "could not determine filesystem mount points\n"
msgstr ""
msgstr "неможливо визначити файлові системи точок монтування\n"
#, c-format
msgid "could not determine root mount point %s\n"
msgstr ""
msgstr "неможливо визначити корінь точки монтування %s\n"
#, c-format
msgid "Partition %s is mounted read only\n"
msgstr ""
msgstr "Розділ %s змонтовано лише для читання\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
msgstr ""
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr "Розділ %s переповнений: потрібно %ld блоків, %ld блоків вільно\n"
#, c-format
msgid "disk"
msgstr "диск"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "посилання '%s' невірне\n"
msgid "failed to create temporary file for download\n"
msgstr "не вдалось створити тимчасово файла для звантаження\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
msgid "url '%s' is invalid\n"
msgstr "посилання «%s» неправильне\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "не вдалося отримати файл '%s' з %s : %s\n"
msgstr "не вдалось одержати файл «%s» з %s : %s\n"
#, c-format
msgid "%s appears to be truncated: %jd/%jd bytes\n"
msgstr "здається %s обрізаний: %jd/%jd байтів\n"
msgstr "здається, %s обрізаний: %jd/%jd байтів\n"
#, c-format
msgid "failed to download %s\n"
msgstr "не вдалося завантажити %s\n"
msgstr "не вдалось звантажити %s\n"
#, c-format
msgid "out of memory!"
@@ -259,19 +266,19 @@ msgstr "неможливо знайти чи прочитати каталог"
#, c-format
msgid "wrong or NULL argument passed"
msgstr "передано невірний аргумент чи NULL"
msgstr "передано неправильний аргумент або NULL"
#, c-format
msgid "not enough free disk space"
msgstr ""
msgstr "недостатньо вільного місця на диску "
#, c-format
msgid "library not initialized"
msgstr "бібліотека не ініціалізована"
msgstr "бібліотеку не запущено"
#, c-format
msgid "library already initialized"
msgstr "бібліотека вже ініціалізована"
msgstr "бібліотеку вже запущено"
#, c-format
msgid "unable to lock database"
@@ -287,11 +294,11 @@ msgstr "неможливо створити базу даних"
#, c-format
msgid "database not initialized"
msgstr "база даних не ініціалізована"
msgstr "базу даних не запущено"
#, c-format
msgid "database already registered"
msgstr "база даних вже зареєстрована"
msgstr "базу даних уже зареєстровано"
#, c-format
msgid "could not find database"
@@ -299,15 +306,15 @@ msgstr "неможливо знайти базу даних"
#, c-format
msgid "invalid or corrupted database"
msgstr ""
msgstr "неправильна або пошкоджена база даних"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr ""
msgstr "неправильна або пошкоджена база даних (підпис PGP)"
#, c-format
msgid "database is incorrect version"
msgstr ""
msgstr "база даних має неправильну версію"
#, c-format
msgid "could not update database"
@@ -319,19 +326,19 @@ msgstr "неможливо вилучити запис з бази даних"
#, c-format
msgid "invalid url for server"
msgstr "невірне посилання чи сервер"
msgstr "неправильне посилання чи сервер"
#, c-format
msgid "no servers configured for repository"
msgstr "для репозиторія не налаштовано жодного сервера"
msgstr "не налаштовано жодного сервера для сховища"
#, c-format
msgid "transaction already initialized"
msgstr "транзакція вже ініціалізована"
msgstr "транзакцію вже запущено"
#, c-format
msgid "transaction not initialized"
msgstr "транзакція не ініціалізована"
msgstr "транзакцію не запущено"
#, c-format
msgid "duplicate target"
@@ -339,11 +346,11 @@ msgstr "продубльований цільовий пакунок"
#, c-format
msgid "transaction not prepared"
msgstr "транзакція не підготовлена"
msgstr "транзакцію не підготовлено"
#, c-format
msgid "transaction aborted"
msgstr "транзакцію перервано"
msgstr "транзакцію скасовано"
#, c-format
msgid "operation not compatible with the transaction type"
@@ -351,7 +358,7 @@ msgstr "операція несумісна з типом транзакції"
#, c-format
msgid "transaction commit attempt when database is not locked"
msgstr "спроба здійснити транзакцію в той час як база даних не є замкненою"
msgstr "спроба здійснити транзакцію, коли базу даних не замкнено"
#, c-format
msgid "could not find or read package"
@@ -359,55 +366,55 @@ msgstr "неможливо знайти чи прочитати пакунок"
#, c-format
msgid "operation cancelled due to ignorepkg"
msgstr "операцію відмінено через ignorepkg"
msgstr "операцію скасовано через ignorepkg"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "невірний чи пошкоджений дельта-патч"
msgstr "неправильний або пошкоджений пакунок"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr ""
msgstr "неправильний або пошкоджений пакунок (контрольна сума)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr ""
msgstr "неправильний або пошкоджений пакунок ("
#, c-format
msgid "cannot open package file"
msgstr "неможливо відкрити файл пакунку"
msgstr "неможливо відкрити файл пакунка"
#, c-format
msgid "cannot remove all files for package"
msgstr "неможливо вилучити всі файли для пакунку"
msgstr "неможливо вилучити всі файли для пакунка"
#, c-format
msgid "package filename is not valid"
msgstr "ім'я файлу пакунку невірне"
msgstr "назва файла пакунку неправильна"
#, c-format
msgid "package architecture is not valid"
msgstr "архітектура пакунку невірна"
msgstr "архітектура пакунка неправильна"
#, c-format
msgid "could not find repository for target"
msgstr "неможливо знайти репозиторій з пакунком"
msgstr "неможливо знайти сховища з пакунком"
#, c-format
msgid "missing PGP signature"
msgstr ""
msgstr "немає підпису "
#, c-format
msgid "invalid PGP signature"
msgstr ""
msgstr "неправильний підпис "
#, c-format
msgid "invalid or corrupted delta"
msgstr "невірний чи пошкоджений дельта-патч"
msgstr "неправильна або пошкоджена різниця"
#, c-format
msgid "delta patch failed"
msgstr "накладення дельта-патчу невдале"
msgstr "Не вдалось накласти різницю"
#, c-format
msgid "could not satisfy dependencies"
@@ -415,19 +422,19 @@ msgstr "неможливо забезпечити залежності"
#, c-format
msgid "conflicting dependencies"
msgstr "конфліктуючі залежності"
msgstr "конфлікті залежності"
#, c-format
msgid "conflicting files"
msgstr "конфліктуючі файли"
msgstr "конфлікті файли"
#, c-format
msgid "failed to retrieve some files"
msgstr "не вдалося отримати деякі файли"
msgstr "не вдалось одержати деякі файли"
#, c-format
msgid "invalid regular expression"
msgstr "невірний регулярний вираз"
msgstr "неправильний формальний вираз"
#, c-format
msgid "libarchive error"
@@ -435,35 +442,39 @@ msgstr "помилка libarchive"
#, c-format
msgid "download library error"
msgstr "помилка бібліотеки завантаження"
msgstr "помилка бібліотеки звантаження"
#, c-format
msgid "gpgme error"
msgstr ""
msgstr "помилка "
#, c-format
msgid "error invoking external downloader"
msgstr "помилка виклику зовнішнього завантажувача"
msgstr "помилка виклику зовнішнього звантажувача"
#, c-format
msgid "unexpected error"
msgstr "неочікувана помилка"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "неможливо знайти чи прочитати пакунок"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "неможливо знайти %s в базі даних -- пропускається\n"
msgstr "неможливо знайти %s в базі даних пропускається\n"
#, c-format
msgid "removing %s from target list\n"
msgstr "вилучення '%s' зі списку пакунків\n"
msgstr "вилучення «%s» зі списку пакунків\n"
#, c-format
msgid "cannot remove file '%s': %s\n"
msgstr "неможливо вилучити файл '%s': %s\n"
msgstr "неможливо вилучити файл «%s»: %s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr ""
msgstr "неможливо вилучити %s (%s)\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
@@ -471,7 +482,7 @@ msgstr "неможливо вилучити запис бази даних %s-%s
#, c-format
msgid "could not remove entry '%s' from cache\n"
msgstr "неможливо вилучити запис '%s' з кешу\n"
msgstr "неможливо вилучити запис «%s» з кешу\n"
#, c-format
msgid "%s: ignoring package upgrade (%s => %s)\n"
@@ -499,15 +510,15 @@ msgstr "неможливо замінити %s на %s\n"
#, c-format
msgid "unresolvable package conflicts detected\n"
msgstr "виявлені нерозв'язні конфлікти пакунків\n"
msgstr "виявлено нерозв'язні конфлікти пакунків\n"
#, c-format
msgid "removing '%s' from target list because it conflicts with '%s'\n"
msgstr "вилучення '%s' з списку пакунків, бо він конфліктує з '%s'\n"
msgstr "вилучення «%s» зі списку пакунків через конфлікт з «%s»\n"
#, c-format
msgid "failed to retrieve some files from %s\n"
msgstr "не вдалося отримати деякі файли з %s\n"
msgstr "не вдалось одержати деякі файли з %s\n"
#, c-format
msgid "could not commit removal transaction\n"
@@ -519,7 +530,7 @@ msgstr "неможливо здійснити транзакцію\n"
#, c-format
msgid "could not create temp directory\n"
msgstr "неиожливо створити тимчасовий каталог\n"
msgstr "неможливо створити тимчасовий каталог\n"
#, c-format
msgid "could not copy tempfile to %s (%s)\n"
@@ -531,7 +542,7 @@ msgstr "неможливо вилучити тимчасовий каталог
#, c-format
msgid "could not create pipe (%s)\n"
msgstr ""
msgstr "неможливо створити вузол (%s)\n"
#, c-format
msgid "could not fork a new process (%s)\n"
@@ -543,24 +554,24 @@ msgstr "неможливо змінити кореневий каталог (%s)
#, c-format
msgid "call to execv failed (%s)\n"
msgstr ""
msgstr "не вдалось викликати execv (%s)\n"
#, c-format
msgid "call to waitpid failed (%s)\n"
msgstr "виклик waitpid невдалий (%s)\n"
msgstr "не вдалось викликати waitpid (%s)\n"
#, c-format
msgid "could not open pipe (%s)\n"
msgstr ""
msgstr "неможливо відкрити вузол (%s)\n"
#, c-format
msgid "command failed to execute correctly\n"
msgstr "команда не змогла виконатися коректно\n"
msgstr "команда не змогла виконатись коректно\n"
#, c-format
msgid "no %s cache exists, creating...\n"
msgstr "кеш %s не існує, створюється...\n"
msgstr "кеш %s не існує, створюється\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
msgstr "неможливо створити кеш пакунку, використовуватиметься /tmp\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "неможливо створити кеш пакунка, використовуватиметься /tmp\n"

View File

@@ -2,6 +2,7 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Dan McGee <dpmcgee@gmail.com>, 2011.
# leonfeng <rainofchaos@gmail.com>, 2011.
# 甘 露 <rhythm.gan@gmail.com>, 2011.
@@ -9,8 +10,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:33+0000\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-09 21:02+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Chinese (China) (http://www.transifex.net/projects/p/"
"archlinux-pacman/team/zh_CN/)\n"
@@ -84,6 +85,10 @@ msgstr "无法得到当前的工作目录\n"
msgid "could not change directory to %s (%s)\n"
msgstr "无法更改目录到 %1$s (%2$s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "无法得到当前的工作目录\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "更新 %s 时出现错误\n"
@@ -214,22 +219,22 @@ msgstr ""
"分区 %s 为只读\n"
"\n"
#, c-format
msgid "Partition %s too full: %ld blocks needed, %ld blocks free\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr "分区 %s 无可用空间:需要 %ld 盘区,可用 %ld 盘区\n"
#, c-format
msgid "disk"
msgstr "硬盘"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' 无效\n"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr ""
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' 无效\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "无法从 %2$s : %3$s 获取文件 '%1$s'\n"
@@ -366,9 +371,9 @@ msgstr "无法找到或读取软件包"
msgid "operation cancelled due to ignorepkg"
msgstr "由于 ignorepkg 指定,操作已取消"
#, fuzzy, c-format
#, c-format
msgid "invalid or corrupted package"
msgstr "无效的或已损坏的 delta"
msgstr ""
#, c-format
msgid "invalid or corrupted package (checksum)"
@@ -454,6 +459,10 @@ msgstr "调用外部下载程序时出错"
msgid "unexpected error"
msgstr "未预期的错误"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "无法找到或读取软件包"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "无法在数据库中找到 %s -- 跳过\n"
@@ -566,6 +575,6 @@ msgstr "命令未能被正确执行\n"
msgid "no %s cache exists, creating...\n"
msgstr "没有 %s 缓存存在,正在创建...\n"
#, c-format
msgid "couldn't create package cache, using /tmp instead\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "无法创建软件包缓存,正在使用 /tmp 代替\n"

578
lib/libalpm/po/zh_TW.po Normal file
View File

@@ -0,0 +1,578 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# <dlin.tw@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-09-22 11:32-0500\n"
"PO-Revision-Date: 2011-08-18 16:47+0000\n"
"Last-Translator: dlin <dlin.tw@gmail.com>\n"
"Language-Team: Chinese (Taiwan) (http://www.transifex.net/projects/p/"
"archlinux-pacman/team/zh_TW/)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n"
#, c-format
msgid "%s-%s is up to date -- skipping\n"
msgstr "%1$s-%2$s 已經爲最新 -- 跳過\n"
#, c-format
msgid "%s-%s is up to date -- reinstalling\n"
msgstr "%1$s-%2$s 已經爲最新 -- 重新安裝\n"
#, c-format
msgid "downgrading package %s (%s => %s)\n"
msgstr "正在降級軟件包 %1$s (%2$s => %3$s)\n"
#, c-format
msgid "warning given when extracting %s (%s)\n"
msgstr "解壓 %s 時出現警告 (%s)\n"
#, c-format
msgid "could not extract %s (%s)\n"
msgstr "無法解壓縮 %1$s (%2$s)\n"
#, c-format
msgid ""
"directory permissions differ on %s\n"
"filesystem: %o package: %o\n"
msgstr ""
"目錄權限不一致 %1$s\n"
"文件系統:%2$o 軟件包:%3$o\n"
#, c-format
msgid "extract: not overwriting dir with file %s\n"
msgstr "解壓縮:沒有用文件 %s 覆蓋目錄\n"
#, c-format
msgid "extract: symlink %s does not point to dir\n"
msgstr "解壓縮:符號鏈接 %s 沒有指向目錄\n"
#, c-format
msgid "could not rename %s to %s (%s)\n"
msgstr "無法將 %1$s 重命名爲 %2$s (%3$s)\n"
#, c-format
msgid "%s saved as %s\n"
msgstr "%1$s 已另存爲 %2$s\n"
#, c-format
msgid "could not install %s as %s (%s)\n"
msgstr "無法將 %1$s 安裝爲 %2$s (%3$s)\n"
#, c-format
msgid "%s installed as %s\n"
msgstr "%1$s 已安裝爲 %2$s\n"
#, c-format
msgid "extracting %s as %s.pacnew\n"
msgstr "正在解壓縮 %1$s 爲 %2$s.pacnew\n"
#, c-format
msgid "could not get current working directory\n"
msgstr "無法得到當前的工作目錄\n"
#, c-format
msgid "could not change directory to %s (%s)\n"
msgstr "無法更改目錄到 %1$s (%2$s)\n"
#, fuzzy, c-format
msgid "could not restore working directory (%s)\n"
msgstr "無法得到當前的工作目錄\n"
#, c-format
msgid "problem occurred while upgrading %s\n"
msgstr "更新 %s 時出現錯誤\n"
#, c-format
msgid "problem occurred while installing %s\n"
msgstr "安裝 %s 時出現錯誤\n"
#, c-format
msgid "could not update database entry %s-%s\n"
msgstr "無法更新數據庫記錄 %1$s-%2$s\n"
#, c-format
msgid "could not add entry '%s' in cache\n"
msgstr "無法在緩存中添加記錄 '%s' \n"
#, c-format
msgid "removing invalid database: %s\n"
msgstr "正在刪除無效的數據庫: %s\n"
#, c-format
msgid "invalid name for database entry '%s'\n"
msgstr "數據庫記錄 '%s' 名字無效\n"
#, c-format
msgid "duplicated database entry '%s'\n"
msgstr "重複的數據庫記錄 '%s'\n"
#, c-format
msgid "corrupted database entry '%s'\n"
msgstr "損壞的數據庫記錄 '%s'\n"
#, c-format
msgid "could not open file %s: %s\n"
msgstr "無法打開文件 %1$s: %2$s\n"
#, c-format
msgid "%s database is inconsistent: name mismatch on package %s\n"
msgstr "%1$s 數據庫不一致:名字和軟件包中的 %2$s 不一致\n"
#, c-format
msgid "%s database is inconsistent: version mismatch on package %s\n"
msgstr "%1$s 數據庫不一致:版本和軟件包中的 %2$s 不一致\n"
#, c-format
msgid "could not create directory %s: %s\n"
msgstr "無法更改目錄到 %1$s%2$s\n"
#, c-format
msgid "could not parse package description file in %s\n"
msgstr "無法解析 %s 中的軟件包描述文件\n"
#, c-format
msgid "missing package name in %s\n"
msgstr "%s 中缺少軟件包名字\n"
#, c-format
msgid "missing package version in %s\n"
msgstr "%s 中缺少軟件包版本號\n"
#, c-format
msgid "error while reading package %s: %s\n"
msgstr "讀取軟件包 %1$s 發生錯誤: %2$s\n"
#, c-format
msgid "missing package metadata in %s\n"
msgstr "%s 中缺少軟件包元數據\n"
#, c-format
msgid "removing invalid file: %s\n"
msgstr "刪除無效文件: %s\n"
#, c-format
msgid "could not remove lock file %s\n"
msgstr "無法刪除鎖定文件 %s\n"
#, c-format
msgid "could not parse package description file '%s' from db '%s'\n"
msgstr "無法處理套件描述檔 '%s' 從套件庫 '%s'\\n\n"
#, c-format
msgid "database path is undefined\n"
msgstr "數據庫路徑未定義\n"
#, c-format
msgid "dependency cycle detected:\n"
msgstr "檢測到依賴關係環:\n"
#, c-format
msgid "%s will be removed after its %s dependency\n"
msgstr "%1$s 將在它 %2$s 的依賴關係之後被刪除\n"
#, c-format
msgid "%s will be installed before its %s dependency\n"
msgstr "%1$s 將在它 %2$s 的依賴關係之前被安裝\n"
#, c-format
msgid "ignoring package %s-%s\n"
msgstr "正在忽略軟件包更新 %s-%s\n"
#, c-format
msgid "cannot resolve \"%s\", a dependency of \"%s\"\n"
msgstr "無法解決 \"%1$s\"\"%2$s\" 的一個依賴關係\n"
#, c-format
msgid "could not get filesystem information\n"
msgstr "無法獲取文件系統的信息\n"
#, c-format
msgid "could not get filesystem information for %s: %s\n"
msgstr "無法爲 %s 獲得文件系統信息:%s\n"
#, c-format
msgid "could not determine mount point for file %s\n"
msgstr "無法確定文件 %s 的掛載點\n"
#, c-format
msgid "could not determine filesystem mount points\n"
msgstr "無法測定文件系統掛載點\n"
#, c-format
msgid "could not determine root mount point %s\n"
msgstr "無法測定根分區掛載點 %s\n"
#, c-format
msgid "Partition %s is mounted read only\n"
msgstr ""
"分區 %s 爲只讀\n"
"\n"
#, fuzzy, c-format
msgid "Partition %s too full: %jd blocks needed, %jd blocks free\n"
msgstr "分區 %s 無可用空間:需要 %ld 盤區,可用 %ld 盤區\n"
#, c-format
msgid "disk"
msgstr "硬盤"
#, c-format
msgid "failed to create temporary file for download\n"
msgstr "無法建立下載暫存檔\\n\n"
#, c-format
msgid "url '%s' is invalid\n"
msgstr "url '%s' 無效\n"
#, c-format
msgid "failed retrieving file '%s' from %s : %s\n"
msgstr "無法從 %2$s : %3$s 獲取文件 '%1$s'\n"
#, c-format
msgid "%s appears to be truncated: %jd/%jd bytes\n"
msgstr "%s 可縮小:%jd/%jd bytes\n"
#, c-format
msgid "failed to download %s\n"
msgstr "下載 %s 失敗\n"
#, c-format
msgid "out of memory!"
msgstr "內存不足!"
#, c-format
msgid "unexpected system error"
msgstr "未預期的系統錯誤"
#, c-format
msgid "insufficient privileges"
msgstr "權限不充分"
#, c-format
msgid "could not find or read file"
msgstr "無法找到或讀取文件"
#, c-format
msgid "could not find or read directory"
msgstr "無法找到或讀取目錄"
#, c-format
msgid "wrong or NULL argument passed"
msgstr "傳遞了錯誤的或 NULL 參數"
#, c-format
msgid "not enough free disk space"
msgstr "剩餘空間不夠"
#, c-format
msgid "library not initialized"
msgstr "函數庫未初始化"
#, c-format
msgid "library already initialized"
msgstr "函數庫已初始化"
#, c-format
msgid "unable to lock database"
msgstr "無法鎖定數據庫"
#, c-format
msgid "could not open database"
msgstr "無法打開數據庫"
#, c-format
msgid "could not create database"
msgstr "無法創建數據庫"
#, c-format
msgid "database not initialized"
msgstr "數據庫未初始化"
#, c-format
msgid "database already registered"
msgstr "數據庫已登記"
#, c-format
msgid "could not find database"
msgstr "無法找到數據庫"
#, c-format
msgid "invalid or corrupted database"
msgstr "資料庫不正確或損毀"
#, c-format
msgid "invalid or corrupted database (PGP signature)"
msgstr "資料庫不正確或損毀 (PGP 簽章)"
#, c-format
msgid "database is incorrect version"
msgstr "數據庫版本不對"
#, c-format
msgid "could not update database"
msgstr "無法更新數據庫"
#, c-format
msgid "could not remove database entry"
msgstr "無法刪除數據庫記錄"
#, c-format
msgid "invalid url for server"
msgstr "無效的服務器 url"
#, c-format
msgid "no servers configured for repository"
msgstr "軟件庫沒有配置服務器信息"
#, c-format
msgid "transaction already initialized"
msgstr "處理已初始化"
#, c-format
msgid "transaction not initialized"
msgstr "處理未初始化"
#, c-format
msgid "duplicate target"
msgstr "重複的目標"
#, c-format
msgid "transaction not prepared"
msgstr "處理未準備好"
#, c-format
msgid "transaction aborted"
msgstr "處理已放棄"
#, c-format
msgid "operation not compatible with the transaction type"
msgstr "操作與處理類型不兼容"
#, c-format
msgid "transaction commit attempt when database is not locked"
msgstr "未鎖定數據庫即提交了事務處理嘗試"
#, c-format
msgid "could not find or read package"
msgstr "無法找到或讀取軟件包"
#, c-format
msgid "operation cancelled due to ignorepkg"
msgstr "由於 ignorepkg 指定,操作已取消"
#, c-format
msgid "invalid or corrupted package"
msgstr "無效的或已損壞的軟件包"
#, c-format
msgid "invalid or corrupted package (checksum)"
msgstr "資料庫不正確或損毀(檢查碼)"
#, c-format
msgid "invalid or corrupted package (PGP signature)"
msgstr "套件不正確或損毀 (PGP 簽章)"
#, c-format
msgid "cannot open package file"
msgstr "無法打開軟件包文件"
#, c-format
msgid "cannot remove all files for package"
msgstr "無法爲軟件包刪除全部文件"
#, c-format
msgid "package filename is not valid"
msgstr "軟件包文件名無效"
#, c-format
msgid "package architecture is not valid"
msgstr "無效的軟件包架構"
#, c-format
msgid "could not find repository for target"
msgstr "無法爲目標找到軟件庫"
#, c-format
msgid "missing PGP signature"
msgstr "缺乏 PGP 簽章"
#, c-format
msgid "invalid PGP signature"
msgstr "PGP 簽章不正確"
#, c-format
msgid "invalid or corrupted delta"
msgstr "無效的或已損壞的 delta"
#, c-format
msgid "delta patch failed"
msgstr "delta 補丁失敗"
#, c-format
msgid "could not satisfy dependencies"
msgstr "無法滿足依賴關係"
#, c-format
msgid "conflicting dependencies"
msgstr "有衝突的依賴關係"
#, c-format
msgid "conflicting files"
msgstr "有衝突的文件"
#, c-format
msgid "failed to retrieve some files"
msgstr "無法獲取某些文件"
#, c-format
msgid "invalid regular expression"
msgstr "無效的正則表達式"
#, c-format
msgid "libarchive error"
msgstr "libarchive 錯誤"
#, c-format
msgid "download library error"
msgstr "下載函數庫出錯"
#, c-format
msgid "gpgme error"
msgstr "gpgme 錯誤"
#, c-format
msgid "error invoking external downloader"
msgstr "調用外部下載程序時出錯"
#, c-format
msgid "unexpected error"
msgstr "未預期的錯誤"
#, fuzzy, c-format
msgid "could not fully load metadata for package %s-%s\n"
msgstr "無法找到或讀取軟件包"
#, c-format
msgid "could not find %s in database -- skipping\n"
msgstr "無法在數據庫中找到 %s -- 跳過\n"
#, c-format
msgid "removing %s from target list\n"
msgstr "正在從目標清單中刪除 '%s' \n"
#, c-format
msgid "cannot remove file '%s': %s\n"
msgstr "無法刪除文件 '%1$s': %2$s\n"
#, c-format
msgid "cannot remove %s (%s)\n"
msgstr "無法移除 %s (%s)\\n\n"
#, c-format
msgid "could not remove database entry %s-%s\n"
msgstr "無法刪除數據庫記錄 %1$s-%2$s\n"
#, c-format
msgid "could not remove entry '%s' from cache\n"
msgstr "無法從緩存中刪除記錄 '%s'\n"
#, c-format
msgid "%s: ignoring package upgrade (%s => %s)\n"
msgstr "%1$s忽略軟件包更新%2$s => %3$s\n"
#, c-format
msgid "%s: ignoring package downgrade (%s => %s)\n"
msgstr "%1$s正在忽略軟件包經濟%2$s => %3$s\n"
#, c-format
msgid "%s: downgrading from version %s to version %s\n"
msgstr "%s正在從版本 %s 降級爲 %s \n"
#, c-format
msgid "%s: local (%s) is newer than %s (%s)\n"
msgstr "%1$s本地%2$s比 %3$s 的版本更新 (%4$s)\n"
#, c-format
msgid "ignoring package replacement (%s-%s => %s-%s)\n"
msgstr "正在忽略軟件包更新 (%s-%s => %s-%s)\n"
#, c-format
msgid "cannot replace %s by %s\n"
msgstr "無法用文件 '%2$s' 替代 %1$s\n"
#, c-format
msgid "unresolvable package conflicts detected\n"
msgstr "檢測到未解決的軟件包衝突\n"
#, c-format
msgid "removing '%s' from target list because it conflicts with '%s'\n"
msgstr "正在從目標清單中刪除 '%1$s' ,因爲它和 '%2$s' 衝突\n"
#, c-format
msgid "failed to retrieve some files from %s\n"
msgstr "無法從 %s 獲取某些文件\n"
#, c-format
msgid "could not commit removal transaction\n"
msgstr "無法交付可撤銷處理\n"
#, c-format
msgid "could not commit transaction\n"
msgstr "無法交付處理\n"
#, c-format
msgid "could not create temp directory\n"
msgstr "無法創建臨時目錄\n"
#, c-format
msgid "could not copy tempfile to %s (%s)\n"
msgstr "無法複製臨時文件到 %1$s (%2$s)\n"
#, c-format
msgid "could not remove tmpdir %s\n"
msgstr "無法刪除臨時目錄 %s\n"
#, c-format
msgid "could not create pipe (%s)\n"
msgstr "無法創建管道(%s)\n"
#, c-format
msgid "could not fork a new process (%s)\n"
msgstr "無法 fork 新進程 (%s)\n"
#, c-format
msgid "could not change the root directory (%s)\n"
msgstr "無法更改根目錄 (%s)\n"
#, c-format
msgid "call to execv failed (%s)\n"
msgstr "調用 execv 失敗 (%s)\n"
#, c-format
msgid "call to waitpid failed (%s)\n"
msgstr "調用 waitpid 失敗 (%s)\n"
#, c-format
msgid "could not open pipe (%s)\n"
msgstr "無法打開管道(%s)\n"
#, c-format
msgid "command failed to execute correctly\n"
msgstr "命令未能被正確執行\n"
#, c-format
msgid "no %s cache exists, creating...\n"
msgstr "沒有 %s 緩存存在,正在創建...\n"
#, fuzzy, c-format
msgid "couldn't find or create package cache, using %s instead\n"
msgstr "無法創建軟件包緩存,正在使用 /tmp 代替\n"

View File

@@ -49,6 +49,7 @@ int SYMEXPORT alpm_remove_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg)
{
const char *pkgname;
alpm_trans_t *trans;
alpm_pkg_t *copy;
/* Sanity checks */
CHECK_HANDLE(handle, return -1);
@@ -67,11 +68,14 @@ int SYMEXPORT alpm_remove_pkg(alpm_handle_t *handle, alpm_pkg_t *pkg)
_alpm_log(handle, ALPM_LOG_DEBUG, "adding package %s to the transaction remove list\n",
pkgname);
trans->remove = alpm_list_add(trans->remove, _alpm_pkg_dup(pkg));
if(_alpm_pkg_dup(pkg, &copy) == -1) {
return -1;
}
trans->remove = alpm_list_add(trans->remove, copy);
return 0;
}
static void remove_prepare_cascade(alpm_handle_t *handle, alpm_list_t *lp)
static int remove_prepare_cascade(alpm_handle_t *handle, alpm_list_t *lp)
{
alpm_trans_t *trans = handle->trans;
@@ -81,14 +85,18 @@ static void remove_prepare_cascade(alpm_handle_t *handle, alpm_list_t *lp)
alpm_depmissing_t *miss = i->data;
alpm_pkg_t *info = _alpm_db_get_pkgfromcache(handle->db_local, miss->target);
if(info) {
if(!_alpm_pkg_find(trans->remove, alpm_pkg_get_name(info))) {
alpm_pkg_t *copy;
if(!_alpm_pkg_find(trans->remove, info->name)) {
_alpm_log(handle, ALPM_LOG_DEBUG, "pulling %s in target list\n",
alpm_pkg_get_name(info));
trans->remove = alpm_list_add(trans->remove, _alpm_pkg_dup(info));
info->name);
if(_alpm_pkg_dup(info, &copy) == -1) {
return -1;
}
trans->remove = alpm_list_add(trans->remove, copy);
}
} else {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not find %s in database -- skipping\n"),
miss->target);
_alpm_log(handle, ALPM_LOG_ERROR,
_("could not find %s in database -- skipping\n"), miss->target);
}
}
alpm_list_free_inner(lp, (alpm_list_fn_free)_alpm_depmiss_free);
@@ -96,6 +104,7 @@ static void remove_prepare_cascade(alpm_handle_t *handle, alpm_list_t *lp)
lp = alpm_checkdeps(handle, _alpm_db_get_pkgcache(handle->db_local),
trans->remove, NULL, 1);
}
return 0;
}
static void remove_prepare_keep_needed(alpm_handle_t *handle, alpm_list_t *lp)
@@ -117,7 +126,7 @@ static void remove_prepare_keep_needed(alpm_handle_t *handle, alpm_list_t *lp)
pkg = vpkg;
if(pkg) {
_alpm_log(handle, ALPM_LOG_WARNING, _("removing %s from target list\n"),
alpm_pkg_get_name(pkg));
pkg->name);
_alpm_pkg_free(pkg);
}
}
@@ -134,6 +143,7 @@ static void remove_prepare_keep_needed(alpm_handle_t *handle, alpm_list_t *lp)
* the packages blocking the transaction.
* @param handle the context handle
* @param data a pointer to an alpm_list_t* to fill
* @return 0 on success, -1 on error
*/
int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data)
{
@@ -144,19 +154,23 @@ int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data)
if((trans->flags & ALPM_TRANS_FLAG_RECURSE)
&& !(trans->flags & ALPM_TRANS_FLAG_CASCADE)) {
_alpm_log(handle, ALPM_LOG_DEBUG, "finding removable dependencies\n");
_alpm_recursedeps(db, trans->remove,
trans->flags & ALPM_TRANS_FLAG_RECURSEALL);
if(_alpm_recursedeps(db, trans->remove,
trans->flags & ALPM_TRANS_FLAG_RECURSEALL)) {
return -1;
}
}
if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)) {
EVENT(trans, ALPM_TRANS_EVT_CHECKDEPS_START, NULL, NULL);
EVENT(handle, ALPM_EVENT_CHECKDEPS_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "looking for unsatisfied dependencies\n");
lp = alpm_checkdeps(handle, _alpm_db_get_pkgcache(db), trans->remove, NULL, 1);
if(lp != NULL) {
if(trans->flags & ALPM_TRANS_FLAG_CASCADE) {
remove_prepare_cascade(handle, lp);
if(remove_prepare_cascade(handle, lp)) {
return -1;
}
} else if(trans->flags & ALPM_TRANS_FLAG_UNNEEDED) {
/* Remove needed packages (which would break dependencies)
* from target list */
@@ -184,11 +198,14 @@ int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data)
if((trans->flags & ALPM_TRANS_FLAG_CASCADE)
&& (trans->flags & ALPM_TRANS_FLAG_RECURSE)) {
_alpm_log(handle, ALPM_LOG_DEBUG, "finding removable dependencies\n");
_alpm_recursedeps(db, trans->remove, trans->flags & ALPM_TRANS_FLAG_RECURSEALL);
if(_alpm_recursedeps(db, trans->remove,
trans->flags & ALPM_TRANS_FLAG_RECURSEALL)) {
return -1;
}
}
if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)) {
EVENT(trans, ALPM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
EVENT(handle, ALPM_EVENT_CHECKDEPS_DONE, NULL, NULL);
}
return 0;
@@ -199,12 +216,12 @@ static int can_remove_file(alpm_handle_t *handle, const alpm_file_t *file,
{
char filepath[PATH_MAX];
snprintf(filepath, PATH_MAX, "%s%s", handle->root, file->name);
if(alpm_list_find_str(skip_remove, filepath)) {
if(alpm_list_find_str(skip_remove, file->name)) {
/* return success because we will never actually remove this file */
return 1;
}
snprintf(filepath, PATH_MAX, "%s%s", handle->root, file->name);
/* If we fail write permissions due to a read-only filesystem, abort.
* Assume all other possible failures are covered somewhere else */
if(_alpm_access(handle, NULL, filepath, W_OK) == -1) {
@@ -345,7 +362,7 @@ int _alpm_remove_single_package(alpm_handle_t *handle,
_alpm_log(handle, ALPM_LOG_DEBUG, "removing old package first (%s-%s)\n",
pkgname, pkgver);
} else {
EVENT(handle->trans, ALPM_TRANS_EVT_REMOVE_START, oldpkg, NULL);
EVENT(handle, ALPM_EVENT_REMOVE_START, oldpkg, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "removing package %s-%s\n",
pkgname, pkgver);
@@ -402,7 +419,7 @@ int _alpm_remove_single_package(alpm_handle_t *handle,
if(!newpkg) {
/* init progress bar, but only on true remove transactions */
PROGRESS(handle->trans, ALPM_TRANS_PROGRESS_REMOVE_START, pkgname, 0,
PROGRESS(handle, ALPM_PROGRESS_REMOVE_START, pkgname, 0,
pkg_count, targ_count);
}
@@ -417,7 +434,7 @@ int _alpm_remove_single_package(alpm_handle_t *handle,
if(!newpkg) {
/* update progress bar after each file */
percent = (position * 100) / filenum;
PROGRESS(handle->trans, ALPM_TRANS_PROGRESS_REMOVE_START, pkgname,
PROGRESS(handle, ALPM_PROGRESS_REMOVE_START, pkgname,
percent, pkg_count, targ_count);
}
position++;
@@ -426,7 +443,7 @@ int _alpm_remove_single_package(alpm_handle_t *handle,
if(!newpkg) {
/* set progress to 100% after we finish unlinking files */
PROGRESS(handle->trans, ALPM_TRANS_PROGRESS_REMOVE_START, pkgname, 100,
PROGRESS(handle, ALPM_PROGRESS_REMOVE_START, pkgname, 100,
pkg_count, targ_count);
/* run the post-remove script if it exists */
@@ -452,13 +469,13 @@ db:
if(!newpkg) {
/* TODO: awesome! we're passing invalid pointers. */
EVENT(handle->trans, ALPM_TRANS_EVT_REMOVE_DONE, oldpkg, NULL);
EVENT(handle, ALPM_EVENT_REMOVE_DONE, oldpkg, NULL);
}
return 0;
}
int _alpm_remove_packages(alpm_handle_t *handle)
int _alpm_remove_packages(alpm_handle_t *handle, int run_ldconfig)
{
alpm_list_t *targ;
size_t pkg_count, targ_count;
@@ -472,23 +489,25 @@ int _alpm_remove_packages(alpm_handle_t *handle)
alpm_pkg_t *pkg = targ->data;
if(trans->state == STATE_INTERRUPTED) {
return 0;
return ret;
}
if(_alpm_remove_single_package(handle, pkg, NULL,
targ_count, pkg_count) == -1) {
handle->pm_errno = ALPM_ERR_TRANS_ABORT;
/* running ldconfig at this point could possibly screw system */
run_ldconfig = 0;
ret = -1;
goto cleanup;
}
targ_count++;
}
/* run ldconfig if it exists */
_alpm_ldconfig(handle);
if(run_ldconfig) {
/* run ldconfig if it exists */
_alpm_ldconfig(handle);
}
cleanup:
return ret;
}

View File

@@ -25,7 +25,7 @@
#include "trans.h"
int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data);
int _alpm_remove_packages(alpm_handle_t *handle);
int _alpm_remove_packages(alpm_handle_t *handle, int run_ldconfig);
int _alpm_remove_single_package(alpm_handle_t *handle,
alpm_pkg_t *oldpkg, alpm_pkg_t *newpkg,

369
lib/libalpm/sha2.c Normal file
View File

@@ -0,0 +1,369 @@
/*
* FIPS-180-2 compliant SHA-256 implementation
*
* Copyright (C) 2006-2010, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* The SHA-256 Secure Hash Standard was published by NIST in 2002.
*
* http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
*/
/*
* Pacman Notes:
*
* Taken from the PolarSSL project at http://polarssl.org under terms of the
* GPL. This is from version 1.0.0 of the library, and has been modified
* as following, which may be helpful for future updates:
* * remove "polarssl/config.h" include
* * change include from "polarssl/md5.h" to "md5.h"
* * removal of HMAC code
* * removal of SELF_TEST code
* * removal of ipad and opad from the sha2_context struct in sha2.h
* * increase the size of buffer for performance reasons
* * various static changes
*/
#include <stdio.h>
#include "sha2.h"
/*
* 32-bit integer manipulation macros (big endian)
*/
#ifndef GET_ULONG_BE
#define GET_ULONG_BE(n,b,i) \
{ \
(n) = ( (unsigned long) (b)[(i) ] << 24 ) \
| ( (unsigned long) (b)[(i) + 1] << 16 ) \
| ( (unsigned long) (b)[(i) + 2] << 8 ) \
| ( (unsigned long) (b)[(i) + 3] ); \
}
#endif
#ifndef PUT_ULONG_BE
#define PUT_ULONG_BE(n,b,i) \
{ \
(b)[(i) ] = (unsigned char) ( (n) >> 24 ); \
(b)[(i) + 1] = (unsigned char) ( (n) >> 16 ); \
(b)[(i) + 2] = (unsigned char) ( (n) >> 8 ); \
(b)[(i) + 3] = (unsigned char) ( (n) ); \
}
#endif
/*
* SHA-256 context setup
*/
static void sha2_starts( sha2_context *ctx, int is224 )
{
ctx->total[0] = 0;
ctx->total[1] = 0;
if( is224 == 0 )
{
/* SHA-256 */
ctx->state[0] = 0x6A09E667;
ctx->state[1] = 0xBB67AE85;
ctx->state[2] = 0x3C6EF372;
ctx->state[3] = 0xA54FF53A;
ctx->state[4] = 0x510E527F;
ctx->state[5] = 0x9B05688C;
ctx->state[6] = 0x1F83D9AB;
ctx->state[7] = 0x5BE0CD19;
}
else
{
/* SHA-224 */
ctx->state[0] = 0xC1059ED8;
ctx->state[1] = 0x367CD507;
ctx->state[2] = 0x3070DD17;
ctx->state[3] = 0xF70E5939;
ctx->state[4] = 0xFFC00B31;
ctx->state[5] = 0x68581511;
ctx->state[6] = 0x64F98FA7;
ctx->state[7] = 0xBEFA4FA4;
}
ctx->is224 = is224;
}
static void sha2_process( sha2_context *ctx, const unsigned char data[64] )
{
unsigned long temp1, temp2, W[64];
unsigned long A, B, C, D, E, F, G, H;
GET_ULONG_BE( W[ 0], data, 0 );
GET_ULONG_BE( W[ 1], data, 4 );
GET_ULONG_BE( W[ 2], data, 8 );
GET_ULONG_BE( W[ 3], data, 12 );
GET_ULONG_BE( W[ 4], data, 16 );
GET_ULONG_BE( W[ 5], data, 20 );
GET_ULONG_BE( W[ 6], data, 24 );
GET_ULONG_BE( W[ 7], data, 28 );
GET_ULONG_BE( W[ 8], data, 32 );
GET_ULONG_BE( W[ 9], data, 36 );
GET_ULONG_BE( W[10], data, 40 );
GET_ULONG_BE( W[11], data, 44 );
GET_ULONG_BE( W[12], data, 48 );
GET_ULONG_BE( W[13], data, 52 );
GET_ULONG_BE( W[14], data, 56 );
GET_ULONG_BE( W[15], data, 60 );
#define SHR(x,n) ((x & 0xFFFFFFFF) >> n)
#define ROTR(x,n) (SHR(x,n) | (x << (32 - n)))
#define S0(x) (ROTR(x, 7) ^ ROTR(x,18) ^ SHR(x, 3))
#define S1(x) (ROTR(x,17) ^ ROTR(x,19) ^ SHR(x,10))
#define S2(x) (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22))
#define S3(x) (ROTR(x, 6) ^ ROTR(x,11) ^ ROTR(x,25))
#define F0(x,y,z) ((x & y) | (z & (x | y)))
#define F1(x,y,z) (z ^ (x & (y ^ z)))
#define R(t) \
( \
W[t] = S1(W[t - 2]) + W[t - 7] + \
S0(W[t - 15]) + W[t - 16] \
)
#define P(a,b,c,d,e,f,g,h,x,K) \
{ \
temp1 = h + S3(e) + F1(e,f,g) + K + x; \
temp2 = S2(a) + F0(a,b,c); \
d += temp1; h = temp1 + temp2; \
}
A = ctx->state[0];
B = ctx->state[1];
C = ctx->state[2];
D = ctx->state[3];
E = ctx->state[4];
F = ctx->state[5];
G = ctx->state[6];
H = ctx->state[7];
P( A, B, C, D, E, F, G, H, W[ 0], 0x428A2F98 );
P( H, A, B, C, D, E, F, G, W[ 1], 0x71374491 );
P( G, H, A, B, C, D, E, F, W[ 2], 0xB5C0FBCF );
P( F, G, H, A, B, C, D, E, W[ 3], 0xE9B5DBA5 );
P( E, F, G, H, A, B, C, D, W[ 4], 0x3956C25B );
P( D, E, F, G, H, A, B, C, W[ 5], 0x59F111F1 );
P( C, D, E, F, G, H, A, B, W[ 6], 0x923F82A4 );
P( B, C, D, E, F, G, H, A, W[ 7], 0xAB1C5ED5 );
P( A, B, C, D, E, F, G, H, W[ 8], 0xD807AA98 );
P( H, A, B, C, D, E, F, G, W[ 9], 0x12835B01 );
P( G, H, A, B, C, D, E, F, W[10], 0x243185BE );
P( F, G, H, A, B, C, D, E, W[11], 0x550C7DC3 );
P( E, F, G, H, A, B, C, D, W[12], 0x72BE5D74 );
P( D, E, F, G, H, A, B, C, W[13], 0x80DEB1FE );
P( C, D, E, F, G, H, A, B, W[14], 0x9BDC06A7 );
P( B, C, D, E, F, G, H, A, W[15], 0xC19BF174 );
P( A, B, C, D, E, F, G, H, R(16), 0xE49B69C1 );
P( H, A, B, C, D, E, F, G, R(17), 0xEFBE4786 );
P( G, H, A, B, C, D, E, F, R(18), 0x0FC19DC6 );
P( F, G, H, A, B, C, D, E, R(19), 0x240CA1CC );
P( E, F, G, H, A, B, C, D, R(20), 0x2DE92C6F );
P( D, E, F, G, H, A, B, C, R(21), 0x4A7484AA );
P( C, D, E, F, G, H, A, B, R(22), 0x5CB0A9DC );
P( B, C, D, E, F, G, H, A, R(23), 0x76F988DA );
P( A, B, C, D, E, F, G, H, R(24), 0x983E5152 );
P( H, A, B, C, D, E, F, G, R(25), 0xA831C66D );
P( G, H, A, B, C, D, E, F, R(26), 0xB00327C8 );
P( F, G, H, A, B, C, D, E, R(27), 0xBF597FC7 );
P( E, F, G, H, A, B, C, D, R(28), 0xC6E00BF3 );
P( D, E, F, G, H, A, B, C, R(29), 0xD5A79147 );
P( C, D, E, F, G, H, A, B, R(30), 0x06CA6351 );
P( B, C, D, E, F, G, H, A, R(31), 0x14292967 );
P( A, B, C, D, E, F, G, H, R(32), 0x27B70A85 );
P( H, A, B, C, D, E, F, G, R(33), 0x2E1B2138 );
P( G, H, A, B, C, D, E, F, R(34), 0x4D2C6DFC );
P( F, G, H, A, B, C, D, E, R(35), 0x53380D13 );
P( E, F, G, H, A, B, C, D, R(36), 0x650A7354 );
P( D, E, F, G, H, A, B, C, R(37), 0x766A0ABB );
P( C, D, E, F, G, H, A, B, R(38), 0x81C2C92E );
P( B, C, D, E, F, G, H, A, R(39), 0x92722C85 );
P( A, B, C, D, E, F, G, H, R(40), 0xA2BFE8A1 );
P( H, A, B, C, D, E, F, G, R(41), 0xA81A664B );
P( G, H, A, B, C, D, E, F, R(42), 0xC24B8B70 );
P( F, G, H, A, B, C, D, E, R(43), 0xC76C51A3 );
P( E, F, G, H, A, B, C, D, R(44), 0xD192E819 );
P( D, E, F, G, H, A, B, C, R(45), 0xD6990624 );
P( C, D, E, F, G, H, A, B, R(46), 0xF40E3585 );
P( B, C, D, E, F, G, H, A, R(47), 0x106AA070 );
P( A, B, C, D, E, F, G, H, R(48), 0x19A4C116 );
P( H, A, B, C, D, E, F, G, R(49), 0x1E376C08 );
P( G, H, A, B, C, D, E, F, R(50), 0x2748774C );
P( F, G, H, A, B, C, D, E, R(51), 0x34B0BCB5 );
P( E, F, G, H, A, B, C, D, R(52), 0x391C0CB3 );
P( D, E, F, G, H, A, B, C, R(53), 0x4ED8AA4A );
P( C, D, E, F, G, H, A, B, R(54), 0x5B9CCA4F );
P( B, C, D, E, F, G, H, A, R(55), 0x682E6FF3 );
P( A, B, C, D, E, F, G, H, R(56), 0x748F82EE );
P( H, A, B, C, D, E, F, G, R(57), 0x78A5636F );
P( G, H, A, B, C, D, E, F, R(58), 0x84C87814 );
P( F, G, H, A, B, C, D, E, R(59), 0x8CC70208 );
P( E, F, G, H, A, B, C, D, R(60), 0x90BEFFFA );
P( D, E, F, G, H, A, B, C, R(61), 0xA4506CEB );
P( C, D, E, F, G, H, A, B, R(62), 0xBEF9A3F7 );
P( B, C, D, E, F, G, H, A, R(63), 0xC67178F2 );
ctx->state[0] += A;
ctx->state[1] += B;
ctx->state[2] += C;
ctx->state[3] += D;
ctx->state[4] += E;
ctx->state[5] += F;
ctx->state[6] += G;
ctx->state[7] += H;
}
/*
* SHA-256 process buffer
*/
static void sha2_update( sha2_context *ctx, const unsigned char *input, size_t ilen )
{
size_t fill;
unsigned long left;
if( ilen <= 0 )
return;
left = ctx->total[0] & 0x3F;
fill = 64 - left;
ctx->total[0] += (unsigned long) ilen;
ctx->total[0] &= 0xFFFFFFFF;
if( ctx->total[0] < (unsigned long) ilen )
ctx->total[1]++;
if( left && ilen >= fill )
{
memcpy( (void *) (ctx->buffer + left),
(void *) input, fill );
sha2_process( ctx, ctx->buffer );
input += fill;
ilen -= fill;
left = 0;
}
while( ilen >= 64 )
{
sha2_process( ctx, input );
input += 64;
ilen -= 64;
}
if( ilen > 0 )
{
memcpy( (void *) (ctx->buffer + left),
(void *) input, ilen );
}
}
static const unsigned char sha2_padding[64] =
{
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
/*
* SHA-256 final digest
*/
static void sha2_finish( sha2_context *ctx, unsigned char output[32] )
{
unsigned long last, padn;
unsigned long high, low;
unsigned char msglen[8];
high = ( ctx->total[0] >> 29 )
| ( ctx->total[1] << 3 );
low = ( ctx->total[0] << 3 );
PUT_ULONG_BE( high, msglen, 0 );
PUT_ULONG_BE( low, msglen, 4 );
last = ctx->total[0] & 0x3F;
padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
sha2_update( ctx, (unsigned char *) sha2_padding, padn );
sha2_update( ctx, msglen, 8 );
PUT_ULONG_BE( ctx->state[0], output, 0 );
PUT_ULONG_BE( ctx->state[1], output, 4 );
PUT_ULONG_BE( ctx->state[2], output, 8 );
PUT_ULONG_BE( ctx->state[3], output, 12 );
PUT_ULONG_BE( ctx->state[4], output, 16 );
PUT_ULONG_BE( ctx->state[5], output, 20 );
PUT_ULONG_BE( ctx->state[6], output, 24 );
if( ctx->is224 == 0 )
PUT_ULONG_BE( ctx->state[7], output, 28 );
}
/*
* output = SHA-256( input buffer )
*/
void sha2( const unsigned char *input, size_t ilen,
unsigned char output[32], int is224 )
{
sha2_context ctx;
sha2_starts( &ctx, is224 );
sha2_update( &ctx, input, ilen );
sha2_finish( &ctx, output );
memset( &ctx, 0, sizeof( sha2_context ) );
}
/*
* output = SHA-256( file contents )
*/
int sha2_file( const char *path, unsigned char output[32], int is224 )
{
FILE *f;
size_t n;
sha2_context ctx;
unsigned char buf[4096];
if( ( f = fopen( path, "rb" ) ) == NULL )
return( 1 );
sha2_starts( &ctx, is224 );
while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 )
sha2_update( &ctx, buf, n );
sha2_finish( &ctx, output );
memset( &ctx, 0, sizeof( sha2_context ) );
if( ferror( f ) != 0 )
{
fclose( f );
return( 2 );
}
fclose( f );
return( 0 );
}

65
lib/libalpm/sha2.h Normal file
View File

@@ -0,0 +1,65 @@
/*
* SHA-224 and SHA-256 cryptographic hash function
*
* Copyright (C) 2006-2010, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SHA2_H
#define _SHA2_H
#include <string.h>
/**
* \brief SHA-256 context structure
*/
typedef struct
{
unsigned long total[2]; /*!< number of bytes processed */
unsigned long state[8]; /*!< intermediate digest state */
unsigned char buffer[64]; /*!< data block being processed */
int is224; /*!< 0 => SHA-256, else SHA-224 */
}
sha2_context;
/**
* \brief Output = SHA-256( input buffer )
*
* \param input buffer holding the data
* \param ilen length of the input data
* \param output SHA-224/256 checksum result
* \param is224 0 = use SHA256, 1 = use SHA224
*/
void sha2( const unsigned char *input, size_t ilen,
unsigned char output[32], int is224 );
/**
* \brief Output = SHA-256( file contents )
*
* \param path input file name
* \param output SHA-224/256 checksum result
* \param is224 0 = use SHA256, 1 = use SHA224
*
* \return 0 if successful, 1 if fopen failed,
* or 2 if fread failed
*/
int sha2_file( const char *path, unsigned char output[32], int is224 );
#endif /* sha2.h */

View File

@@ -42,6 +42,12 @@
if(gpg_err_code(err) != GPG_ERR_NO_ERROR) { goto error; } \
} while(0)
/**
* Return a statically allocated validity string based on the GPGME validity
* code. This is mainly for debug purposes and is not translated.
* @param validity a validity code returned by GPGME
* @return a string such as "marginal"
*/
static const char *string_validity(gpgme_validity_t validity)
{
switch(validity) {
@@ -69,6 +75,12 @@ static void sigsum_test_bit(gpgme_sigsum_t sigsum, alpm_list_t **summary,
}
}
/**
* Calculate a set of strings to represent the given GPGME signature summary
* value. This is a bitmask so you may get any number of strings back.
* @param sigsum a GPGME signature summary bitmask
* @return the list of signature summary strings
*/
static alpm_list_t *list_sigsum(gpgme_sigsum_t sigsum)
{
alpm_list_t *summary = NULL;
@@ -104,6 +116,12 @@ static alpm_list_t *list_sigsum(gpgme_sigsum_t sigsum)
return summary;
}
/**
* Initialize the GPGME library.
* This can be safely called multiple times; however it is not thread-safe.
* @param handle the context handle
* @return 0 on success, 1 on error
*/
static int init_gpgme(alpm_handle_t *handle)
{
static int init = 0;
@@ -116,7 +134,7 @@ static int init_gpgme(alpm_handle_t *handle)
return 0;
}
sigdir = alpm_option_get_gpgdir(handle);
sigdir = handle->gpgdir;
if (_alpm_access(handle, sigdir, "pubring.gpg", R_OK)
|| _alpm_access(handle, sigdir, "trustdb.gpg", R_OK)) {
@@ -160,6 +178,127 @@ error:
RET_ERR(handle, ALPM_ERR_GPGME, 1);
}
/**
* Determine if we have a key is known in our local keyring.
* @param handle the context handle
* @param fpr the fingerprint key ID to look up
* @return 1 if key is known, 0 if key is unknown, -1 on error
*/
static int key_in_keychain(alpm_handle_t *handle, const char *fpr)
{
gpgme_error_t err;
gpgme_ctx_t ctx;
gpgme_key_t key;
int ret = -1;
memset(&ctx, 0, sizeof(ctx));
err = gpgme_new(&ctx);
CHECK_ERR();
_alpm_log(handle, ALPM_LOG_DEBUG, "looking up key %s locally\n", fpr);
err = gpgme_get_key(ctx, fpr, &key, 0);
if(gpg_err_code(err) == GPG_ERR_EOF) {
_alpm_log(handle, ALPM_LOG_DEBUG, "key lookup failed, unknown key\n");
ret = 0;
} else if(gpg_err_code(err) == GPG_ERR_NO_ERROR) {
_alpm_log(handle, ALPM_LOG_DEBUG, "key lookup success, key exists\n");
ret = 1;
} else {
_alpm_log(handle, ALPM_LOG_DEBUG, "gpg error: %s\n", gpgme_strerror(err));
}
error:
gpgme_key_unref(key);
gpgme_release(ctx);
return ret;
}
/**
* Search for a GPG key in a remote location.
* This requires GPGME to call the gpg binary and have a keyserver previously
* defined in a gpg.conf configuration file.
* @param handle the context handle
* @param fpr the fingerprint key ID to look up
* @param pgpkey storage location for the given key if found
* @return 0 on success, 1 on error or key not found
*/
static int key_search(alpm_handle_t *handle, const char *fpr,
alpm_pgpkey_t *pgpkey)
{
gpgme_error_t err;
gpgme_ctx_t ctx;
gpgme_keylist_mode_t mode;
gpgme_key_t key;
memset(&ctx, 0, sizeof(ctx));
err = gpgme_new(&ctx);
CHECK_ERR();
mode = gpgme_get_keylist_mode(ctx);
/* using LOCAL and EXTERN together doesn't work for GPG 1.X. Ugh. */
mode &= ~GPGME_KEYLIST_MODE_LOCAL;
mode |= GPGME_KEYLIST_MODE_EXTERN;
err = gpgme_set_keylist_mode(ctx, mode);
CHECK_ERR();
_alpm_log(handle, ALPM_LOG_DEBUG, "looking up key %s remotely\n", fpr);
err = gpgme_get_key(ctx, fpr, &key, 0);
if(gpg_err_code(err) == GPG_ERR_EOF) {
_alpm_log(handle, ALPM_LOG_DEBUG, "key lookup failed, unknown key\n");
} else if(gpg_err_code(err) != GPG_ERR_NO_ERROR) {
_alpm_log(handle, ALPM_LOG_DEBUG,
"gpg error: %s\n", gpgme_strerror(err));
CHECK_ERR();
}
/* should only get here if key actually exists */
pgpkey->data = key;
if(key->subkeys->fpr) {
pgpkey->fingerprint = key->subkeys->fpr;
} else if(key->subkeys->keyid) {
pgpkey->fingerprint = key->subkeys->keyid;
}
pgpkey->uid = key->uids->uid;
pgpkey->name = key->uids->name;
pgpkey->email = key->uids->email;
pgpkey->created = key->subkeys->timestamp;
pgpkey->expires = key->subkeys->expires;
error:
gpgme_release(ctx);
return gpg_err_code(err) == GPG_ERR_NO_ERROR;
}
/**
* Import a key into the local keyring.
* @param handle the context handle
* @param key the key to import, likely retrieved from #key_search
* @return 0 on success, 1 on error
*/
static int key_import(alpm_handle_t *handle, alpm_pgpkey_t *key)
{
gpgme_error_t err;
gpgme_ctx_t ctx;
gpgme_key_t keys[2];
memset(&ctx, 0, sizeof(ctx));
err = gpgme_new(&ctx);
CHECK_ERR();
_alpm_log(handle, ALPM_LOG_DEBUG, "importing key\n");
keys[0] = key->data;
keys[1] = NULL;
err = gpgme_op_import_keys(ctx, keys);
CHECK_ERR();
error:
gpgme_release(ctx);
return gpg_err_code(err) != GPG_ERR_NO_ERROR;
}
/**
* Decode a loaded signature in base64 form.
* @param base64_data the signature to attempt to decode
@@ -168,22 +307,14 @@ error:
* @return 0 on success, 1 on failure to properly decode
*/
static int decode_signature(const char *base64_data,
unsigned char **data, int *data_len) {
unsigned char *usline;
int len;
len = strlen(base64_data);
usline = (unsigned char *)base64_data;
int ret, destlen = 0;
/* get the necessary size for the buffer by passing 0 */
ret = base64_decode(NULL, &destlen, usline, len);
if(ret != 0 && ret != POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL) {
goto error;
}
/* alloc our memory and repeat the call to decode */
MALLOC(*data, (size_t)destlen, goto error);
ret = base64_decode(*data, &destlen, usline, len);
if(ret != 0) {
unsigned char **data, size_t *data_len) {
size_t len = strlen(base64_data);
unsigned char *usline = (unsigned char *)base64_data;
/* reasonable allocation of expected length is 3/4 of encoded length */
size_t destlen = len * 3 / 4;
MALLOC(*data, destlen, goto error);
if(base64_decode(*data, &destlen, usline, len)) {
free(*data);
goto error;
}
*data_len = destlen;
@@ -204,16 +335,16 @@ error:
* The return value will be 0 if nothing abnormal happened during the signature
* check, and -1 if an error occurred while checking signatures or if a
* signature could not be found; pm_errno will be set. Note that "abnormal"
* does not include a failed signature; the value in #result should be checked
* does not include a failed signature; the value in #siglist should be checked
* to determine if the signature(s) are good.
* @param handle the context handle
* @param path the full path to a file
* @param base64_sig optional PGP signature data in base64 encoding
* @result
* @param siglist a pointer to storage for signature results
* @return 0 in normal cases, -1 if the something failed in the check process
*/
int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
const char *base64_sig, alpm_sigresult_t *result)
const char *base64_sig, alpm_siglist_t *siglist)
{
int ret = -1, sigcount;
gpgme_error_t err;
@@ -229,19 +360,15 @@ int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
RET_ERR(handle, ALPM_ERR_NOT_A_FILE, -1);
}
if(!result) {
if(!siglist) {
RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1);
}
result->count = 0;
siglist->count = 0;
if(!base64_sig) {
size_t len = strlen(path) + 5;
CALLOC(sigpath, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, -1));
snprintf(sigpath, len, "%s.sig", path);
if(!_alpm_access(handle, NULL, sigpath, R_OK) == 0) {
/* sigcount is 0 */
}
sigpath = _alpm_sigpath(handle, path);
/* this will just help debugging */
_alpm_access(handle, NULL, sigpath, R_OK);
}
if(init_gpgme(handle)) {
@@ -270,7 +397,7 @@ int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
/* next create data object for the signature */
if(base64_sig) {
/* memory-based, we loaded it from a sync DB */
int data_len;
size_t data_len;
int decode_ret = decode_signature(base64_sig,
&decoded_sigdata, &data_len);
if(decode_ret) {
@@ -283,6 +410,8 @@ int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
/* file-based, it is on disk */
sigfile = fopen(sigpath, "rb");
if(sigfile == NULL) {
_alpm_log(handle, ALPM_LOG_DEBUG, "sig path %s could not be opened\n",
sigpath);
handle->pm_errno = ALPM_ERR_SIG_MISSING;
goto error;
}
@@ -304,14 +433,9 @@ int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
gpgsig; gpgsig = gpgsig->next, sigcount++);
_alpm_log(handle, ALPM_LOG_DEBUG, "%d signatures returned\n", sigcount);
result->status = calloc(sigcount, sizeof(alpm_sigstatus_t));
result->validity = calloc(sigcount, sizeof(alpm_sigvalidity_t));
result->uid = calloc(sigcount, sizeof(char*));
if(!result->status || !result->validity || !result->uid) {
handle->pm_errno = ALPM_ERR_MEMORY;
goto error;
}
result->count = sigcount;
CALLOC(siglist->results, sigcount, sizeof(alpm_sigresult_t),
handle->pm_errno = ALPM_ERR_MEMORY; goto error);
siglist->count = sigcount;
for(gpgsig = verify_result->signatures, sigcount = 0; gpgsig;
gpgsig = gpgsig->next, sigcount++) {
@@ -319,6 +443,7 @@ int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
alpm_sigstatus_t status;
alpm_sigvalidity_t validity;
gpgme_key_t key;
alpm_sigresult_t *result;
_alpm_log(handle, ALPM_LOG_DEBUG, "fingerprint: %s\n", gpgsig->fpr);
summary_list = list_sigsum(gpgsig->summary);
@@ -333,21 +458,29 @@ int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
string_validity(gpgsig->validity),
gpgme_strerror(gpgsig->validity_reason));
result = siglist->results + sigcount;
err = gpgme_get_key(ctx, gpgsig->fpr, &key, 0);
if(gpg_err_code(err) == GPG_ERR_EOF) {
_alpm_log(handle, ALPM_LOG_DEBUG, "key lookup failed, unknown key\n");
err = GPG_ERR_NO_ERROR;
STRDUP(result->uid[sigcount], gpgsig->fpr,
/* we dupe the fpr in this case since we have no key to point at */
STRDUP(result->key.fingerprint, gpgsig->fpr,
handle->pm_errno = ALPM_ERR_MEMORY; goto error);
} else {
CHECK_ERR();
if(key->uids) {
const char *uid = key->uids->uid;
STRDUP(result->uid[sigcount], uid,
handle->pm_errno = ALPM_ERR_MEMORY; goto error);
_alpm_log(handle, ALPM_LOG_DEBUG, "key user: %s\n", uid);
result->key.data = key;
result->key.fingerprint = key->subkeys->fpr;
result->key.uid = key->uids->uid;
result->key.name = key->uids->name;
result->key.email = key->uids->email;
result->key.created = key->subkeys->timestamp;
result->key.expires = key->subkeys->expires;
_alpm_log(handle, ALPM_LOG_DEBUG,
"key: %s, %s, owner_trust %s, disabled %d\n",
key->subkeys->fpr, key->uids->uid,
string_validity(key->owner_trust), key->disabled);
}
gpgme_key_unref(key);
}
switch(gpg_err_code(gpgsig->status)) {
@@ -370,32 +503,31 @@ int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
status = ALPM_SIGSTATUS_INVALID;
break;
}
if(status == ALPM_SIGSTATUS_VALID
|| status == ALPM_SIGSTATUS_KEY_EXPIRED) {
switch(gpgsig->validity) {
case GPGME_VALIDITY_ULTIMATE:
case GPGME_VALIDITY_FULL:
validity = ALPM_SIGVALIDITY_FULL;
break;
case GPGME_VALIDITY_MARGINAL:
validity = ALPM_SIGVALIDITY_MARGINAL;
break;
case GPGME_VALIDITY_NEVER:
validity = ALPM_SIGVALIDITY_NEVER;
break;
case GPGME_VALIDITY_UNKNOWN:
case GPGME_VALIDITY_UNDEFINED:
default:
validity = ALPM_SIGVALIDITY_UNKNOWN;
break;
}
} else {
validity = ALPM_SIGVALIDITY_NEVER;
/* special case: key disabled is not returned in above status code */
if(result->key.data && key->disabled) {
status = ALPM_SIGSTATUS_KEY_DISABLED;
}
result->status[sigcount] = status;
result->validity[sigcount] = validity;
switch(gpgsig->validity) {
case GPGME_VALIDITY_ULTIMATE:
case GPGME_VALIDITY_FULL:
validity = ALPM_SIGVALIDITY_FULL;
break;
case GPGME_VALIDITY_MARGINAL:
validity = ALPM_SIGVALIDITY_MARGINAL;
break;
case GPGME_VALIDITY_NEVER:
validity = ALPM_SIGVALIDITY_NEVER;
break;
case GPGME_VALIDITY_UNKNOWN:
case GPGME_VALIDITY_UNDEFINED:
default:
validity = ALPM_SIGVALIDITY_UNKNOWN;
break;
}
result->status = status;
result->validity = validity;
}
ret = 0;
@@ -420,23 +552,59 @@ error:
}
#else
int _alpm_gpgme_checksig(alpm_handle_t UNUSED *handle, const char UNUSED *path,
const char UNUSED *base64_sig, alpm_sigresult_t UNUSED *result)
const char UNUSED *base64_sig, alpm_siglist_t UNUSED *siglist)
{
return -1;
}
#endif
/**
* Form a signature path given a file path.
* Caller must free the result.
* @param handle the context handle
* @param path the full path to a file
* @return the path with '.sig' appended, NULL on errors
*/
char *_alpm_sigpath(alpm_handle_t *handle, const char *path)
{
char *sigpath;
size_t len;
if(!path) {
return NULL;
}
len = strlen(path) + 5;
CALLOC(sigpath, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
sprintf(sigpath, "%s.sig", path);
return sigpath;
}
/**
* Helper for checking the PGP signature for the given file path.
* This wraps #_alpm_gpgme_checksig in a slightly friendlier manner to simplify
* handling of optional signatures and marginal/unknown trust levels and
* handling the correct error code return values.
* @param handle the context handle
* @param path the full path to a file
* @param base64_sig optional PGP signature data in base64 encoding
* @param optional whether signatures are optional (e.g., missing OK)
* @param marginal whether signatures with marginal trust are acceptable
* @param unknown whether signatures with unknown trust are acceptable
* @param sigdata a pointer to storage for signature results
* @return 0 on success, -1 on error (consult pm_errno or sigdata)
*/
int _alpm_check_pgp_helper(alpm_handle_t *handle, const char *path,
const char *base64_sig, int optional, int marginal, int unknown,
enum _alpm_errno_t invalid_err)
alpm_siglist_t **sigdata)
{
alpm_sigresult_t result;
alpm_siglist_t *siglist;
int ret;
memset(&result, 0, sizeof(result));
CALLOC(siglist, 1, sizeof(alpm_siglist_t),
RET_ERR(handle, ALPM_ERR_MEMORY, -1));
_alpm_log(handle, ALPM_LOG_DEBUG, "checking signatures for %s\n", path);
ret = _alpm_gpgme_checksig(handle, path, base64_sig, &result);
ret = _alpm_gpgme_checksig(handle, path, base64_sig, siglist);
if(ret && handle->pm_errno == ALPM_ERR_SIG_MISSING) {
if(optional) {
_alpm_log(handle, ALPM_LOG_DEBUG, "missing optional signature\n");
@@ -450,13 +618,13 @@ int _alpm_check_pgp_helper(alpm_handle_t *handle, const char *path,
_alpm_log(handle, ALPM_LOG_DEBUG, "signature check failed\n");
/* ret will already be -1 */
} else {
int num;
for(num = 0; !ret && num < result.count; num++) {
switch(result.status[num]) {
size_t num;
for(num = 0; !ret && num < siglist->count; num++) {
switch(siglist->results[num].status) {
case ALPM_SIGSTATUS_VALID:
case ALPM_SIGSTATUS_KEY_EXPIRED:
_alpm_log(handle, ALPM_LOG_DEBUG, "signature is valid\n");
switch(result.validity[num]) {
switch(siglist->results[num].validity) {
case ALPM_SIGVALIDITY_FULL:
_alpm_log(handle, ALPM_LOG_DEBUG, "signature is fully trusted\n");
break;
@@ -480,68 +648,188 @@ int _alpm_check_pgp_helper(alpm_handle_t *handle, const char *path,
break;
case ALPM_SIGSTATUS_SIG_EXPIRED:
case ALPM_SIGSTATUS_KEY_UNKNOWN:
case ALPM_SIGSTATUS_KEY_DISABLED:
case ALPM_SIGSTATUS_INVALID:
_alpm_log(handle, ALPM_LOG_DEBUG, "signature is not valid\n");
ret = -1;
break;
}
}
}
if(ret) {
handle->pm_errno = invalid_err;
if(sigdata) {
*sigdata = siglist;
} else {
alpm_siglist_cleanup(siglist);
free(siglist);
}
return ret;
}
/**
* Examine a signature result list and take any appropriate or necessary
* actions. This may include asking the user to import a key or simply printing
* helpful failure messages so the user can take action out of band.
* @param handle the context handle
* @param identifier a friendly name for the signed resource; usually a
* database or package name
* @param siglist a pointer to storage for signature results
* @param optional whether signatures are optional (e.g., missing OK)
* @param marginal whether signatures with marginal trust are acceptable
* @param unknown whether signatures with unknown trust are acceptable
* @return 0 if all signatures are OK, -1 on errors, 1 if we should retry the
* validation process
*/
int _alpm_process_siglist(alpm_handle_t *handle, const char *identifier,
alpm_siglist_t *siglist, int optional, int marginal, int unknown)
{
size_t i;
int retry = 0;
if(!optional && siglist->count == 0) {
_alpm_log(handle, ALPM_LOG_ERROR,
_("%s: missing required signature\n"), identifier);
}
for(i = 0; i < siglist->count; i++) {
alpm_sigresult_t *result = siglist->results + i;
const char *name = result->key.uid ? result->key.uid : result->key.fingerprint;
int answer;
switch(result->status) {
case ALPM_SIGSTATUS_VALID:
case ALPM_SIGSTATUS_KEY_EXPIRED:
switch(result->validity) {
case ALPM_SIGVALIDITY_FULL:
break;
case ALPM_SIGVALIDITY_MARGINAL:
if(!marginal) {
_alpm_log(handle, ALPM_LOG_ERROR,
_("%s: signature from \"%s\" is marginal trust\n"),
identifier, name);
/* QUESTION(handle, ALPM_QUESTION_EDIT_KEY_TRUST, &result->key, NULL, NULL, &answer); */
}
break;
case ALPM_SIGVALIDITY_UNKNOWN:
if(!unknown) {
_alpm_log(handle, ALPM_LOG_ERROR,
_("%s: signature from \"%s\" is unknown trust\n"),
identifier, name);
/* QUESTION(handle, ALPM_QUESTION_EDIT_KEY_TRUST, &result->key, NULL, NULL, &answer); */
}
break;
case ALPM_SIGVALIDITY_NEVER:
_alpm_log(handle, ALPM_LOG_ERROR,
_("%s: signature from \"%s\" should never be trusted\n"),
identifier, name);
break;
}
break;
case ALPM_SIGSTATUS_KEY_UNKNOWN:
/* ensure this key is still actually unknown; we may have imported it
* on an earlier call to this function. */
if(key_in_keychain(handle, result->key.fingerprint) == 1) {
break;
}
_alpm_log(handle, ALPM_LOG_ERROR,
_("%s: key \"%s\" is unknown\n"), identifier, name);
{
alpm_pgpkey_t fetch_key;
memset(&fetch_key, 0, sizeof(fetch_key));
if(key_search(handle, result->key.fingerprint, &fetch_key)) {
_alpm_log(handle, ALPM_LOG_DEBUG,
"unknown key, found %s on keyserver\n", fetch_key.uid);
QUESTION(handle, ALPM_QUESTION_IMPORT_KEY,
&fetch_key, NULL, NULL, &answer);
if(answer && !key_import(handle, &fetch_key)) {
retry = 1;
}
} else {
_alpm_log(handle, ALPM_LOG_DEBUG,
"key could not be looked up remotely\n");
}
gpgme_key_unref(fetch_key.data);
}
break;
case ALPM_SIGSTATUS_KEY_DISABLED:
_alpm_log(handle, ALPM_LOG_ERROR,
_("%s: key \"%s\" is disabled\n"), identifier, name);
break;
case ALPM_SIGSTATUS_SIG_EXPIRED:
_alpm_log(handle, ALPM_LOG_ERROR,
_("%s: signature from \"%s\" is expired\n"), identifier, name);
break;
case ALPM_SIGSTATUS_INVALID:
_alpm_log(handle, ALPM_LOG_ERROR,
_("%s: signature from \"%s\" is invalid\n"),
identifier, name);
break;
}
}
alpm_sigresult_cleanup(&result);
return ret;
return retry;
}
/**
* Check the PGP signature for the given package file.
* @param pkg the package to check
* @param siglist a pointer to storage for signature results
* @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)
*/
int SYMEXPORT alpm_pkg_check_pgp_signature(alpm_pkg_t *pkg,
alpm_sigresult_t *result)
alpm_siglist_t *siglist)
{
ASSERT(pkg != NULL, return -1);
ASSERT(result != NULL, RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1));
ASSERT(siglist != NULL, RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1));
pkg->handle->pm_errno = 0;
return _alpm_gpgme_checksig(pkg->handle, alpm_pkg_get_filename(pkg),
pkg->base64_sig, result);
return _alpm_gpgme_checksig(pkg->handle, pkg->filename,
pkg->base64_sig, siglist);
}
/**
* Check the PGP signature for the given database.
* @param db the database to check
* @param siglist a pointer to storage for signature results
* @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)
*/
int SYMEXPORT alpm_db_check_pgp_signature(alpm_db_t *db,
alpm_sigresult_t *result)
alpm_siglist_t *siglist)
{
ASSERT(db != NULL, return -1);
ASSERT(result != NULL, RET_ERR(db->handle, ALPM_ERR_WRONG_ARGS, -1));
ASSERT(siglist != NULL, RET_ERR(db->handle, ALPM_ERR_WRONG_ARGS, -1));
db->handle->pm_errno = 0;
return _alpm_gpgme_checksig(db->handle, _alpm_db_path(db), NULL, result);
return _alpm_gpgme_checksig(db->handle, _alpm_db_path(db), NULL, siglist);
}
int SYMEXPORT alpm_sigresult_cleanup(alpm_sigresult_t *result)
/**
* Clean up and free a signature result list.
* Note that this does not free the #alpm_siglist_t object itself in case that
* was allocated on the stack; this is the responsibility of the caller.
* @param siglist a pointer to storage for signature results
* @return 0 on success, -1 on error
*/
int SYMEXPORT alpm_siglist_cleanup(alpm_siglist_t *siglist)
{
ASSERT(result != NULL, return -1);
/* Because it is likely result is on the stack, uid and status may have bogus
* values in the struct. Only look at them if count is greater than 0. */
if(result->count > 0) {
free(result->status);
if(result->uid) {
int i;
for(i = 0; i < result->count; i++) {
free(result->uid[i]);
}
free(result->uid);
ASSERT(siglist != NULL, return -1);
size_t num;
for(num = 0; num < siglist->count; num++) {
alpm_sigresult_t *result = siglist->results + num;
if(result->key.data) {
#if HAVE_LIBGPGME
gpgme_key_unref(result->key.data);
#endif
} else {
free(result->key.fingerprint);
}
}
if(siglist->count) {
free(siglist->results);
}
siglist->results = NULL;
siglist->count = 0;
return 0;
}

View File

@@ -21,11 +21,15 @@
#include "alpm.h"
char *_alpm_sigpath(alpm_handle_t *handle, const char *path);
int _alpm_gpgme_checksig(alpm_handle_t *handle, const char *path,
const char *base64_sig, alpm_sigresult_t *result);
const char *base64_sig, alpm_siglist_t *result);
int _alpm_check_pgp_helper(alpm_handle_t *handle, const char *path,
const char *base64_sig, int optional, int marginal, int unknown,
enum _alpm_errno_t invalid_err);
alpm_siglist_t **sigdata);
int _alpm_process_siglist(alpm_handle_t *handle, const char *identifier,
alpm_siglist_t *siglist, int optional, int marginal, int unknown);
#endif /* _ALPM_SIGNING_H */

View File

@@ -62,26 +62,134 @@ alpm_pkg_t SYMEXPORT *alpm_sync_newversion(alpm_pkg_t *pkg, alpm_list_t *dbs_syn
pkg->handle->pm_errno = 0;
for(i = dbs_sync; !spkg && i; i = i->next) {
spkg = _alpm_db_get_pkgfromcache(i->data, alpm_pkg_get_name(pkg));
spkg = _alpm_db_get_pkgfromcache(i->data, pkg->name);
}
if(spkg == NULL) {
_alpm_log(pkg->handle, ALPM_LOG_DEBUG, "'%s' not found in sync db => no upgrade\n",
alpm_pkg_get_name(pkg));
pkg->name);
return NULL;
}
/* compare versions and see if spkg is an upgrade */
if(_alpm_pkg_compare_versions(spkg, pkg) > 0) {
_alpm_log(pkg->handle, ALPM_LOG_DEBUG, "new version of '%s' found (%s => %s)\n",
alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg),
alpm_pkg_get_version(spkg));
pkg->name, pkg->version, spkg->version);
return spkg;
}
/* spkg is not an upgrade */
return NULL;
}
static int check_literal(alpm_handle_t *handle, alpm_pkg_t *lpkg,
alpm_pkg_t *spkg, int enable_downgrade)
{
/* 1. literal was found in sdb */
int cmp = _alpm_pkg_compare_versions(spkg, lpkg);
if(cmp > 0) {
_alpm_log(handle, ALPM_LOG_DEBUG, "new version of '%s' found (%s => %s)\n",
lpkg->name, lpkg->version, spkg->version);
/* check IgnorePkg/IgnoreGroup */
if(_alpm_pkg_should_ignore(handle, spkg)
|| _alpm_pkg_should_ignore(handle, lpkg)) {
_alpm_log(handle, ALPM_LOG_WARNING, _("%s: ignoring package upgrade (%s => %s)\n"),
lpkg->name, lpkg->version, spkg->version);
} else {
_alpm_log(handle, ALPM_LOG_DEBUG, "adding package %s-%s to the transaction targets\n",
spkg->name, spkg->version);
return 1;
}
} else if(cmp < 0) {
if(enable_downgrade) {
/* check IgnorePkg/IgnoreGroup */
if(_alpm_pkg_should_ignore(handle, spkg)
|| _alpm_pkg_should_ignore(handle, lpkg)) {
_alpm_log(handle, ALPM_LOG_WARNING, _("%s: ignoring package downgrade (%s => %s)\n"),
lpkg->name, lpkg->version, spkg->version);
} else {
_alpm_log(handle, ALPM_LOG_WARNING, _("%s: downgrading from version %s to version %s\n"),
lpkg->name, lpkg->version, spkg->version);
return 1;
}
} else {
alpm_db_t *sdb = alpm_pkg_get_db(spkg);
_alpm_log(handle, ALPM_LOG_WARNING, _("%s: local (%s) is newer than %s (%s)\n"),
lpkg->name, lpkg->version, sdb->treename, spkg->version);
}
}
return 0;
}
static alpm_list_t *check_replacers(alpm_handle_t *handle, alpm_pkg_t *lpkg,
alpm_db_t *sdb)
{
/* 2. search for replacers in sdb */
alpm_list_t *replacers = NULL;
alpm_list_t *k;
_alpm_log(handle, ALPM_LOG_DEBUG,
"searching for replacements for %s\n", lpkg->name);
for(k = _alpm_db_get_pkgcache(sdb); k; k = k->next) {
int found = 0;
alpm_pkg_t *spkg = k->data;
alpm_list_t *l;
for(l = alpm_pkg_get_replaces(spkg); l; l = l->next) {
alpm_depend_t *replace = l->data;
/* we only want to consider literal matches at this point. */
if(_alpm_depcmp_literal(lpkg, replace)) {
found = 1;
break;
}
}
if(found) {
int doreplace = 0;
alpm_pkg_t *tpkg;
/* check IgnorePkg/IgnoreGroup */
if(_alpm_pkg_should_ignore(handle, spkg)
|| _alpm_pkg_should_ignore(handle, lpkg)) {
_alpm_log(handle, ALPM_LOG_WARNING,
_("ignoring package replacement (%s-%s => %s-%s)\n"),
lpkg->name, lpkg->version, spkg->name, spkg->version);
continue;
}
QUESTION(handle, ALPM_QUESTION_REPLACE_PKG, lpkg, spkg,
sdb->treename, &doreplace);
if(!doreplace) {
continue;
}
/* If spkg is already in the target list, we append lpkg to spkg's
* removes list */
tpkg = _alpm_pkg_find(handle->trans->add, spkg->name);
if(tpkg) {
/* sanity check, multiple repos can contain spkg->name */
if(tpkg->origin_data.db != sdb) {
_alpm_log(handle, ALPM_LOG_WARNING, _("cannot replace %s by %s\n"),
lpkg->name, spkg->name);
continue;
}
_alpm_log(handle, ALPM_LOG_DEBUG, "appending %s to the removes list of %s\n",
lpkg->name, tpkg->name);
tpkg->removes = alpm_list_add(tpkg->removes, lpkg);
/* check the to-be-replaced package's reason field */
if(alpm_pkg_get_reason(lpkg) == ALPM_PKG_REASON_EXPLICIT) {
tpkg->reason = ALPM_PKG_REASON_EXPLICIT;
}
} else {
/* add spkg to the target list */
/* copy over reason */
spkg->reason = alpm_pkg_get_reason(lpkg);
spkg->removes = alpm_list_add(NULL, lpkg);
_alpm_log(handle, ALPM_LOG_DEBUG,
"adding package %s-%s to the transaction targets\n",
spkg->name, spkg->version);
replacers = alpm_list_add(replacers, spkg);
}
}
}
return replacers;
}
/** Search for packages to upgrade and add them to the transaction. */
int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
{
@@ -102,109 +210,24 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
continue;
}
/* Search for literal then replacers in each sync database.
* If found, don't check other databases */
/* Search for literal then replacers in each sync database. */
for(j = handle->dbs_sync; j; j = j->next) {
alpm_db_t *sdb = j->data;
/* Check sdb */
alpm_pkg_t *spkg = _alpm_db_get_pkgfromcache(sdb, lpkg->name);
int literal_upgrade = 0;
if(spkg) {
/* 1. literal was found in sdb */
int cmp = _alpm_pkg_compare_versions(spkg, lpkg);
if(cmp > 0) {
_alpm_log(handle, ALPM_LOG_DEBUG, "new version of '%s' found (%s => %s)\n",
lpkg->name, lpkg->version, spkg->version);
/* check IgnorePkg/IgnoreGroup */
if(_alpm_pkg_should_ignore(handle, spkg)
|| _alpm_pkg_should_ignore(handle, lpkg)) {
_alpm_log(handle, ALPM_LOG_WARNING, _("%s: ignoring package upgrade (%s => %s)\n"),
lpkg->name, lpkg->version, spkg->version);
} else {
_alpm_log(handle, ALPM_LOG_DEBUG, "adding package %s-%s to the transaction targets\n",
spkg->name, spkg->version);
trans->add = alpm_list_add(trans->add, spkg);
}
} else if(cmp < 0) {
if(enable_downgrade) {
/* check IgnorePkg/IgnoreGroup */
if(_alpm_pkg_should_ignore(handle, spkg)
|| _alpm_pkg_should_ignore(handle, lpkg)) {
_alpm_log(handle, ALPM_LOG_WARNING, _("%s: ignoring package downgrade (%s => %s)\n"),
lpkg->name, lpkg->version, spkg->version);
} else {
_alpm_log(handle, ALPM_LOG_WARNING, _("%s: downgrading from version %s to version %s\n"),
lpkg->name, lpkg->version, spkg->version);
trans->add = alpm_list_add(trans->add, spkg);
}
} else {
_alpm_log(handle, ALPM_LOG_WARNING, _("%s: local (%s) is newer than %s (%s)\n"),
lpkg->name, lpkg->version, sdb->treename, spkg->version);
}
literal_upgrade = check_literal(handle, lpkg, spkg, enable_downgrade);
if(literal_upgrade) {
trans->add = alpm_list_add(trans->add, spkg);
}
/* jump to next local package */
break;
} else {
/* 2. search for replacers in sdb */
int found = 0;
alpm_list_t *k, *l;
for(k = _alpm_db_get_pkgcache(sdb); k; k = k->next) {
spkg = k->data;
for(l = alpm_pkg_get_replaces(spkg); l; l = l->next) {
const char *replace = l->data;
alpm_depend_t *parsed_replace = _alpm_splitdep(replace);
if(_alpm_depcmp(lpkg, parsed_replace)) {
found = 1;
_alpm_dep_free(parsed_replace);
break;
}
_alpm_dep_free(parsed_replace);
}
if(found) {
/* check IgnorePkg/IgnoreGroup */
if(_alpm_pkg_should_ignore(handle, spkg)
|| _alpm_pkg_should_ignore(handle, lpkg)) {
_alpm_log(handle, ALPM_LOG_WARNING, _("ignoring package replacement (%s-%s => %s-%s)\n"),
lpkg->name, lpkg->version, spkg->name, spkg->version);
continue;
}
int doreplace = 0;
QUESTION(trans, ALPM_TRANS_CONV_REPLACE_PKG, lpkg, spkg, sdb->treename, &doreplace);
if(!doreplace) {
continue;
}
/* If spkg is already in the target list, we append lpkg to spkg's
* removes list */
alpm_pkg_t *tpkg = _alpm_pkg_find(trans->add, spkg->name);
if(tpkg) {
/* sanity check, multiple repos can contain spkg->name */
if(tpkg->origin_data.db != sdb) {
_alpm_log(handle, ALPM_LOG_WARNING, _("cannot replace %s by %s\n"),
lpkg->name, spkg->name);
continue;
}
_alpm_log(handle, ALPM_LOG_DEBUG, "appending %s to the removes list of %s\n",
lpkg->name, tpkg->name);
tpkg->removes = alpm_list_add(tpkg->removes, lpkg);
/* check the to-be-replaced package's reason field */
if(alpm_pkg_get_reason(lpkg) == ALPM_PKG_REASON_EXPLICIT) {
tpkg->reason = ALPM_PKG_REASON_EXPLICIT;
}
} else {
/* add spkg to the target list */
/* copy over reason */
spkg->reason = alpm_pkg_get_reason(lpkg);
spkg->removes = alpm_list_add(NULL, lpkg);
_alpm_log(handle, ALPM_LOG_DEBUG, "adding package %s-%s to the transaction targets\n",
spkg->name, spkg->version);
trans->add = alpm_list_add(trans->add, spkg);
}
}
}
if(found) {
/* jump to next local package */
break;
alpm_list_t *replacers;
replacers = check_replacers(handle, lpkg, sdb);
if(replacers) {
trans->add = alpm_list_join(trans->add, replacers);
}
}
}
@@ -235,18 +258,18 @@ alpm_list_t SYMEXPORT *alpm_find_group_pkgs(alpm_list_t *dbs,
for(j = grp->packages; j; j = j->next) {
alpm_pkg_t *pkg = j->data;
if(_alpm_pkg_find(ignorelist, alpm_pkg_get_name(pkg))) {
if(_alpm_pkg_find(ignorelist, pkg->name)) {
continue;
}
if(_alpm_pkg_should_ignore(db->handle, pkg)) {
ignorelist = alpm_list_add(ignorelist, pkg);
int install = 0;
QUESTION(db->handle->trans, ALPM_TRANS_CONV_INSTALL_IGNOREPKG, pkg,
QUESTION(db->handle, ALPM_QUESTION_INSTALL_IGNOREPKG, pkg,
NULL, NULL, &install);
if(!install)
continue;
}
if(!_alpm_pkg_find(pkgs, alpm_pkg_get_name(pkg))) {
if(!_alpm_pkg_find(pkgs, pkg->name)) {
pkgs = alpm_list_add(pkgs, pkg);
}
}
@@ -262,7 +285,7 @@ alpm_list_t SYMEXPORT *alpm_find_group_pkgs(alpm_list_t *dbs,
static int compute_download_size(alpm_pkg_t *newpkg)
{
const char *fname;
char *fpath;
char *fpath, *fnamepart = NULL;
off_t size = 0;
alpm_handle_t *handle = newpkg->handle;
@@ -272,40 +295,56 @@ static int compute_download_size(alpm_pkg_t *newpkg)
return 0;
}
fname = alpm_pkg_get_filename(newpkg);
ASSERT(fname != NULL, RET_ERR(handle, ALPM_ERR_PKG_INVALID_NAME, -1));
ASSERT(newpkg->filename != NULL, RET_ERR(handle, ALPM_ERR_PKG_INVALID_NAME, -1));
fname = newpkg->filename;
fpath = _alpm_filecache_find(handle, fname);
/* downloaded file exists, so there's nothing to grab */
if(fpath) {
FREE(fpath);
size = 0;
goto finish;
}
CALLOC(fnamepart, strlen(fname) + 6, sizeof(char), return -1);
sprintf(fnamepart, "%s.part", fname);
fpath = _alpm_filecache_find(handle, fnamepart);
if(fpath) {
struct stat st;
if(stat(fpath, &st) == 0) {
/* subtract the size of the .part file */
_alpm_log(handle, ALPM_LOG_DEBUG, "using (package - .part) size\n");
size = newpkg->size - st.st_size;
size = size < 0 ? 0 : size;
}
} else if(handle->usedelta) {
off_t dltsize;
off_t pkgsize = alpm_pkg_get_size(newpkg);
dltsize = _alpm_shortest_delta_path(handle,
alpm_pkg_get_deltas(newpkg),
alpm_pkg_get_filename(newpkg),
&newpkg->delta_path);
dltsize = _alpm_shortest_delta_path(handle, newpkg->deltas,
newpkg->filename, &newpkg->delta_path);
if(newpkg->delta_path && (dltsize < pkgsize * MAX_DELTA_RATIO)) {
if(newpkg->delta_path && (dltsize < newpkg->size * MAX_DELTA_RATIO)) {
_alpm_log(handle, ALPM_LOG_DEBUG, "using delta size\n");
size = dltsize;
} else {
_alpm_log(handle, ALPM_LOG_DEBUG, "using package size\n");
size = alpm_pkg_get_size(newpkg);
size = newpkg->size;
alpm_list_free(newpkg->delta_path);
newpkg->delta_path = NULL;
}
} else {
size = alpm_pkg_get_size(newpkg);
size = newpkg->size;
}
finish:
_alpm_log(handle, ALPM_LOG_DEBUG, "setting download size %jd for pkg %s\n",
(intmax_t)size, alpm_pkg_get_name(newpkg));
(intmax_t)size, newpkg->name);
newpkg->infolevel |= INFRQ_DSIZE;
newpkg->download_size = size;
FREE(fpath);
FREE(fnamepart);
return 0;
}
@@ -325,9 +364,12 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
/* ensure all sync database are valid since we will be using them */
for(i = handle->dbs_sync; i; i = i->next) {
const alpm_db_t *db = i->data;
if(!(db->status & DB_STATUS_VALID)) {
if(db->status & DB_STATUS_INVALID) {
RET_ERR(handle, ALPM_ERR_DB_INVALID, -1);
}
if(db->status & DB_STATUS_MISSING) {
RET_ERR(handle, ALPM_ERR_DB_NOT_FOUND, -1);
}
}
if(!(trans->flags & ALPM_TRANS_FLAG_NODEPS)) {
@@ -335,7 +377,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
/* Build up list by repeatedly resolving each transaction package */
/* Resolve targets dependencies */
EVENT(trans, ALPM_TRANS_EVT_RESOLVEDEPS_START, NULL, NULL);
EVENT(handle, ALPM_EVENT_RESOLVEDEPS_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "resolving target's dependencies\n");
/* build remove list for resolvedeps */
@@ -368,7 +410,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
see if they'd like to ignore them rather than failing the sync */
if(unresolvable != NULL) {
int remove_unresolvable = 0;
QUESTION(trans, ALPM_TRANS_CONV_REMOVE_PKGS, unresolvable,
QUESTION(handle, ALPM_QUESTION_REMOVE_PKGS, unresolvable,
NULL, NULL, &remove_unresolvable);
if(remove_unresolvable) {
/* User wants to remove the unresolvable packages from the
@@ -406,12 +448,12 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
trans->add = _alpm_sortbydeps(handle, resolved, 0);
alpm_list_free(resolved);
EVENT(trans, ALPM_TRANS_EVT_RESOLVEDEPS_DONE, NULL, NULL);
EVENT(handle, ALPM_EVENT_RESOLVEDEPS_DONE, NULL, NULL);
}
if(!(trans->flags & ALPM_TRANS_FLAG_NOCONFLICTS)) {
/* check for inter-conflicts and whatnot */
EVENT(trans, ALPM_TRANS_EVT_INTERCONFLICTS_START, NULL, NULL);
EVENT(handle, ALPM_EVENT_INTERCONFLICTS_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "looking for conflicts\n");
@@ -500,8 +542,8 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
alpm_pkg_t *sync = _alpm_pkg_find(trans->add, conflict->package1);
alpm_pkg_t *local = _alpm_db_get_pkgfromcache(handle->db_local, conflict->package2);
int doremove = 0;
QUESTION(trans, ALPM_TRANS_CONV_CONFLICT_PKG, conflict->package1,
conflict->package2, conflict->reason, &doremove);
QUESTION(handle, ALPM_QUESTION_CONFLICT_PKG, conflict->package1,
conflict->package2, conflict->reason->name, &doremove);
if(doremove) {
/* append to the removes list */
_alpm_log(handle, ALPM_LOG_DEBUG, "electing '%s' for removal\n", conflict->package2);
@@ -521,7 +563,7 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
goto cleanup;
}
}
EVENT(trans, ALPM_TRANS_EVT_INTERCONFLICTS_DONE, NULL, NULL);
EVENT(handle, ALPM_EVENT_INTERCONFLICTS_DONE, NULL, NULL);
alpm_list_free_inner(deps, (alpm_list_fn_free)_alpm_conflict_free);
alpm_list_free(deps);
}
@@ -532,8 +574,12 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
for(j = spkg->removes; j; j = j->next) {
alpm_pkg_t *rpkg = j->data;
if(!_alpm_pkg_find(trans->remove, rpkg->name)) {
alpm_pkg_t *copy;
_alpm_log(handle, ALPM_LOG_DEBUG, "adding '%s' to remove list\n", rpkg->name);
trans->remove = alpm_list_add(trans->remove, _alpm_pkg_dup(rpkg));
if(_alpm_pkg_dup(rpkg, &copy) == -1) {
return -1;
}
trans->remove = alpm_list_add(trans->remove, copy);
}
}
}
@@ -601,7 +647,7 @@ static int endswith(const char *filename, const char *extension)
static int apply_deltas(alpm_handle_t *handle)
{
alpm_list_t *i;
int ret = 0;
int deltas_found = 0, ret = 0;
const char *cachedir = _alpm_filecache_setup(handle);
alpm_trans_t *trans = handle->trans;
@@ -614,6 +660,13 @@ static int apply_deltas(alpm_handle_t *handle)
continue;
}
if(!deltas_found) {
/* only show this if we actually have deltas to apply, and it is before
* the very first one */
EVENT(handle, ALPM_EVENT_DELTA_PATCHES_START, NULL, NULL);
deltas_found = 1;
}
for(dlts = delta_path; dlts; dlts = dlts->next) {
alpm_delta_t *d = dlts->data;
char *delta, *from, *to;
@@ -644,11 +697,11 @@ static int apply_deltas(alpm_handle_t *handle)
_alpm_log(handle, ALPM_LOG_DEBUG, "command: %s\n", command);
EVENT(trans, ALPM_TRANS_EVT_DELTA_PATCH_START, d->to, d->delta);
EVENT(handle, ALPM_EVENT_DELTA_PATCH_START, d->to, d->delta);
int retval = system(command);
if(retval == 0) {
EVENT(trans, ALPM_TRANS_EVT_DELTA_PATCH_DONE, NULL, NULL);
EVENT(handle, ALPM_EVENT_DELTA_PATCH_DONE, NULL, NULL);
/* delete the delta file */
unlink(delta);
@@ -666,33 +719,33 @@ static int apply_deltas(alpm_handle_t *handle)
if(retval != 0) {
/* one delta failed for this package, cancel the remaining ones */
EVENT(trans, ALPM_TRANS_EVT_DELTA_PATCH_FAILED, NULL, NULL);
EVENT(handle, ALPM_EVENT_DELTA_PATCH_FAILED, NULL, NULL);
handle->pm_errno = ALPM_ERR_DLT_PATCHFAILED;
ret = 1;
break;
}
}
}
if(deltas_found) {
EVENT(handle, ALPM_EVENT_DELTA_PATCHES_DONE, NULL, NULL);
}
return ret;
}
/** Compares the md5sum of a file to the expected value.
*
* If the md5sum does not match, the user is asked whether the file
* should be deleted.
*
* @param trans the transaction
/**
* Prompts to delete the file now that we know it is invalid.
* @param handle the context handle
* @param filename the absolute path of the file to test
* @param reason an error code indicating the reason for package invalidity
*
* @return 1 if file was removed, 0 otherwise
*/
static int prompt_to_delete(alpm_trans_t *trans, const char *filepath,
static int prompt_to_delete(alpm_handle_t *handle, const char *filepath,
enum _alpm_errno_t reason)
{
int doremove = 0;
QUESTION(trans, ALPM_TRANS_CONV_CORRUPTED_PKG, (char *)filepath,
QUESTION(handle, ALPM_QUESTION_CORRUPTED_PKG, (char *)filepath,
&reason, NULL, &doremove);
if(doremove) {
unlink(filepath);
@@ -700,43 +753,39 @@ static int prompt_to_delete(alpm_trans_t *trans, const char *filepath,
return doremove;
}
static int validate_deltas(alpm_handle_t *handle, alpm_list_t *deltas,
alpm_list_t **data)
static int validate_deltas(alpm_handle_t *handle, alpm_list_t *deltas)
{
int errors = 0, ret = 0;
alpm_list_t *i;
alpm_trans_t *trans = handle->trans;
alpm_list_t *i, *errors = NULL;
if(!deltas) {
return 0;
}
/* Check integrity of deltas */
EVENT(trans, ALPM_TRANS_EVT_DELTA_INTEGRITY_START, NULL, NULL);
EVENT(handle, ALPM_EVENT_DELTA_INTEGRITY_START, NULL, NULL);
for(i = deltas; i; i = i->next) {
alpm_delta_t *d = alpm_list_getdata(i);
alpm_delta_t *d = i->data;
char *filepath = _alpm_filecache_find(handle, d->delta);
ret = _alpm_test_md5sum(filepath, d->delta_md5);
if(ret != 0) {
prompt_to_delete(trans, filepath, ALPM_ERR_DLT_INVALID);
errors++;
*data = alpm_list_add(*data, strdup(d->delta));
if(_alpm_test_checksum(filepath, d->delta_md5, ALPM_CSUM_MD5)) {
errors = alpm_list_add(errors, filepath);
} else {
FREE(filepath);
}
FREE(filepath);
}
EVENT(handle, ALPM_EVENT_DELTA_INTEGRITY_DONE, NULL, NULL);
if(errors) {
for(i = errors; i; i = i->next) {
char *filepath = i->data;
prompt_to_delete(handle, filepath, ALPM_ERR_DLT_INVALID);
FREE(filepath);
}
alpm_list_free(errors);
handle->pm_errno = ALPM_ERR_DLT_INVALID;
return -1;
}
EVENT(trans, ALPM_TRANS_EVT_DELTA_INTEGRITY_DONE, NULL, NULL);
/* Use the deltas to generate the packages */
EVENT(trans, ALPM_TRANS_EVT_DELTA_PATCHES_START, NULL, NULL);
ret = apply_deltas(handle);
EVENT(trans, ALPM_TRANS_EVT_DELTA_PATCHES_DONE, NULL, NULL);
return ret;
return 0;
}
static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
@@ -766,6 +815,14 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
for(i = handle->dbs_sync; i; i = i->next) {
alpm_db_t *current = i->data;
if(!current->servers) {
handle->pm_errno = ALPM_ERR_SERVER_NONE;
_alpm_log(handle, ALPM_LOG_ERROR, "%s: %s\n",
alpm_strerror(handle->pm_errno), current->treename);
errors++;
continue;
}
for(j = handle->trans->add; j; j = j->next) {
alpm_pkg_t *spkg = j->data;
@@ -780,7 +837,7 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
struct dload_payload *dpayload;
CALLOC(dpayload, 1, sizeof(*dpayload), RET_ERR(handle, ALPM_ERR_MEMORY, -1));
STRDUP(dpayload->filename, delta->delta, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
STRDUP(dpayload->remote_name, delta->delta, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
dpayload->max_size = delta->download_size;
files = alpm_list_add(files, dpayload);
@@ -794,8 +851,8 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
ASSERT(spkg->filename != NULL, RET_ERR(handle, ALPM_ERR_PKG_INVALID_NAME, -1));
CALLOC(payload, 1, sizeof(*payload), RET_ERR(handle, ALPM_ERR_MEMORY, -1));
STRDUP(payload->filename, spkg->filename, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
payload->max_size = alpm_pkg_get_size(spkg);
STRDUP(payload->remote_name, spkg->filename, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
payload->max_size = spkg->size;
files = alpm_list_add(files, payload);
}
@@ -804,7 +861,7 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
}
if(files) {
EVENT(handle->trans, ALPM_TRANS_EVT_RETRIEVE_START, current->treename, NULL);
EVENT(handle, ALPM_EVENT_RETRIEVE_START, current->treename, NULL);
for(j = files; j; j = j->next) {
struct dload_payload *payload = j->data;
alpm_list_t *server;
@@ -814,9 +871,9 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
size_t len;
/* print server + filename into a buffer */
len = strlen(server_url) + strlen(payload->filename) + 2;
len = strlen(server_url) + strlen(payload->remote_name) + 2;
CALLOC(payload->fileurl, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, -1));
snprintf(payload->fileurl, len, "%s/%s", server_url, payload->filename);
snprintf(payload->fileurl, len, "%s/%s", server_url, payload->remote_name);
payload->handle = handle;
payload->allow_resume = 1;
@@ -827,20 +884,14 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
}
if(ret == -1) {
errors++;
_alpm_log(handle, ALPM_LOG_WARNING, _("failed to retrieve some files from %s\n"),
current->treename);
}
}
alpm_list_free_inner(files, (alpm_list_fn_free)_alpm_dload_payload_free);
alpm_list_free(files);
files = NULL;
if(errors) {
_alpm_log(handle, ALPM_LOG_WARNING, _("failed to retrieve some files from %s\n"),
current->treename);
if(handle->pm_errno == 0) {
handle->pm_errno = ALPM_ERR_RETRIEVE;
}
return -1;
}
}
}
@@ -854,76 +905,135 @@ static int download_files(alpm_handle_t *handle, alpm_list_t **deltas)
if(handle->totaldlcb) {
handle->totaldlcb(0);
}
return errors;
}
static int check_validity(alpm_handle_t *handle,
size_t total, size_t total_bytes)
{
struct validity {
alpm_pkg_t *pkg;
char *path;
alpm_siglist_t *siglist;
alpm_siglevel_t level;
enum _alpm_errno_t error;
};
size_t current = 0, current_bytes = 0;
alpm_list_t *i, *errors = NULL;
/* Check integrity of packages */
EVENT(handle, ALPM_EVENT_INTEGRITY_START, NULL, NULL);
for(i = handle->trans->add; i; i = i->next, current++) {
struct validity v = { i->data, NULL, NULL, 0, 0 };
int percent = (int)(((double)current_bytes / total_bytes) * 100);
PROGRESS(handle, ALPM_PROGRESS_INTEGRITY_START, "", percent,
total, current);
if(v.pkg->origin == PKG_FROM_FILE) {
continue; /* pkg_load() has been already called, this package is valid */
}
current_bytes += v.pkg->size;
v.path = _alpm_filecache_find(handle, v.pkg->filename);
v.level = alpm_db_get_siglevel(alpm_pkg_get_db(v.pkg));
if(_alpm_pkg_validate_internal(handle, v.path, v.pkg,
v.level, &v.siglist) == -1) {
v.error = handle->pm_errno;
struct validity *invalid = malloc(sizeof(struct validity));
memcpy(invalid, &v, sizeof(struct validity));
errors = alpm_list_add(errors, invalid);
} else {
alpm_siglist_cleanup(v.siglist);
free(v.siglist);
free(v.path);
}
}
PROGRESS(handle, ALPM_PROGRESS_INTEGRITY_START, "", 100,
total, current);
EVENT(handle, ALPM_EVENT_INTEGRITY_DONE, NULL, NULL);
if(errors) {
int tryagain = 0;
for(i = errors; i; i = i->next) {
struct validity *v = i->data;
if(v->error == ALPM_ERR_PKG_INVALID_SIG) {
int retry = _alpm_process_siglist(handle, v->pkg->name, v->siglist,
v->level & ALPM_SIG_PACKAGE_OPTIONAL,
v->level & ALPM_SIG_PACKAGE_MARGINAL_OK,
v->level & ALPM_SIG_PACKAGE_UNKNOWN_OK);
tryagain += retry;
} else if(v->error == ALPM_ERR_PKG_INVALID_CHECKSUM) {
prompt_to_delete(handle, v->path, v->error);
}
alpm_siglist_cleanup(v->siglist);
free(v->siglist);
free(v->path);
free(v);
}
alpm_list_free(errors);
if(tryagain == 0) {
if(!handle->pm_errno) {
RET_ERR(handle, ALPM_ERR_PKG_INVALID, -1);
}
return -1;
}
/* we were told at least once we can try again */
return 1;
}
return 0;
}
int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
static int load_packages(alpm_handle_t *handle, alpm_list_t **data,
size_t total, size_t total_bytes)
{
size_t current = 0, current_bytes = 0;
int errors = 0;
alpm_list_t *i;
alpm_list_t *deltas = NULL;
size_t numtargs, current = 0, replaces = 0;
int errors;
alpm_trans_t *trans = handle->trans;
if(download_files(handle, &deltas)) {
alpm_list_free(deltas);
return -1;
}
/* load packages from disk now that they are known-valid */
EVENT(handle, ALPM_EVENT_LOAD_START, NULL, NULL);
if(validate_deltas(handle, deltas, data)) {
alpm_list_free(deltas);
return -1;
}
alpm_list_free(deltas);
/* Check integrity of packages */
numtargs = alpm_list_count(trans->add);
EVENT(trans, ALPM_TRANS_EVT_INTEGRITY_START, NULL, NULL);
errors = 0;
for(i = trans->add; i; i = i->next, current++) {
for(i = handle->trans->add; i; i = i->next, current++) {
alpm_pkg_t *spkg = i->data;
int percent = (current * 100) / numtargs;
const char *filename;
char *filepath;
alpm_siglevel_t level;
int percent = (int)(((double)current_bytes / total_bytes) * 100);
PROGRESS(trans, ALPM_TRANS_PROGRESS_INTEGRITY_START, "", percent,
numtargs, current);
PROGRESS(handle, ALPM_PROGRESS_LOAD_START, "", percent,
total, current);
if(spkg->origin == PKG_FROM_FILE) {
continue; /* pkg_load() has been already called, this package is valid */
}
filename = alpm_pkg_get_filename(spkg);
filepath = _alpm_filecache_find(handle, filename);
alpm_db_t *sdb = alpm_pkg_get_db(spkg);
level = alpm_db_get_siglevel(sdb);
current_bytes += spkg->size;
filepath = _alpm_filecache_find(handle, spkg->filename);
/* load the package file and replace pkgcache entry with it in the target list */
/* TODO: alpm_pkg_get_db() will not work on this target anymore */
_alpm_log(handle, ALPM_LOG_DEBUG,
"replacing pkgcache entry with package file for target %s\n",
spkg->name);
alpm_pkg_t *pkgfile =_alpm_pkg_load_internal(handle, filepath, 1, spkg->md5sum,
spkg->base64_sig, level);
alpm_pkg_t *pkgfile =_alpm_pkg_load_internal(handle, filepath, 1);
if(!pkgfile) {
prompt_to_delete(trans, filepath, handle->pm_errno);
errors++;
*data = alpm_list_add(*data, strdup(filename));
FREE(filepath);
*data = alpm_list_add(*data, strdup(spkg->filename));
free(filepath);
continue;
}
FREE(filepath);
free(filepath);
pkgfile->reason = spkg->reason; /* copy over install reason */
i->data = pkgfile;
_alpm_pkg_free_trans(spkg); /* spkg has been removed from the target list */
}
PROGRESS(trans, ALPM_TRANS_PROGRESS_INTEGRITY_START, "", 100,
numtargs, current);
EVENT(trans, ALPM_TRANS_EVT_INTEGRITY_DONE, NULL, NULL);
PROGRESS(handle, ALPM_PROGRESS_LOAD_START, "", 100,
total, current);
EVENT(handle, ALPM_EVENT_LOAD_DONE, NULL, NULL);
if(errors) {
if(!handle->pm_errno) {
@@ -932,17 +1042,66 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
return -1;
}
return 0;
}
int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
{
alpm_list_t *i, *deltas = NULL;
size_t total = 0, total_bytes = 0;
alpm_trans_t *trans = handle->trans;
if(download_files(handle, &deltas)) {
alpm_list_free(deltas);
return -1;
}
if(validate_deltas(handle, deltas)) {
alpm_list_free(deltas);
return -1;
}
alpm_list_free(deltas);
/* Use the deltas to generate the packages */
if(apply_deltas(handle)) {
return -1;
}
/* get the total size of all packages so we can adjust the progress bar more
* realistically if there are small and huge packages involved */
for(i = trans->add; i; i = i->next) {
alpm_pkg_t *spkg = i->data;
if(spkg->origin != PKG_FROM_FILE) {
total_bytes += spkg->size;
}
total++;
}
/* this can only happen maliciously */
total_bytes = total_bytes ? total_bytes : 1;
/* this one is special: -1 is failure, 1 is retry, 0 is success */
while(1) {
int ret = check_validity(handle, total, total_bytes);
if(ret == 0) {
break;
} else if(ret < 0) {
return -1;
}
}
if(trans->flags & ALPM_TRANS_FLAG_DOWNLOADONLY) {
return 0;
}
trans->state = STATE_COMMITING;
if(load_packages(handle, data, total, total_bytes)) {
return -1;
}
replaces = alpm_list_count(trans->remove);
trans->state = STATE_COMMITING;
/* fileconflict check */
if(!(trans->flags & ALPM_TRANS_FLAG_FORCE)) {
EVENT(trans, ALPM_TRANS_EVT_FILECONFLICTS_START, NULL, NULL);
EVENT(handle, ALPM_EVENT_FILECONFLICTS_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "looking for file conflicts\n");
alpm_list_t *conflict = _alpm_db_find_fileconflicts(handle,
@@ -957,12 +1116,12 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
RET_ERR(handle, ALPM_ERR_FILE_CONFLICTS, -1);
}
EVENT(trans, ALPM_TRANS_EVT_FILECONFLICTS_DONE, NULL, NULL);
EVENT(handle, ALPM_EVENT_FILECONFLICTS_DONE, NULL, NULL);
}
/* check available disk space */
if(handle->checkspace) {
EVENT(trans, ALPM_TRANS_EVT_DISKSPACE_START, NULL, NULL);
EVENT(handle, ALPM_EVENT_DISKSPACE_START, NULL, NULL);
_alpm_log(handle, ALPM_LOG_DEBUG, "checking available disk space\n");
if(_alpm_check_diskspace(handle) == -1) {
@@ -970,14 +1129,14 @@ int _alpm_sync_commit(alpm_handle_t *handle, alpm_list_t **data)
return -1;
}
EVENT(trans, ALPM_TRANS_EVT_DISKSPACE_DONE, NULL, NULL);
EVENT(handle, ALPM_EVENT_DISKSPACE_DONE, NULL, NULL);
}
/* remove conflicting and to-be-replaced packages */
if(replaces) {
if(trans->remove) {
_alpm_log(handle, ALPM_LOG_DEBUG, "removing conflicting and to-be-replaced packages\n");
/* we want the frontend to be aware of commit details */
if(_alpm_remove_packages(handle) == -1) {
if(_alpm_remove_packages(handle, 0) == -1) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not commit removal transaction\n"));
return -1;
}

View File

@@ -48,9 +48,7 @@
*/
/** Initialize the transaction. */
int SYMEXPORT alpm_trans_init(alpm_handle_t *handle, alpm_transflag_t flags,
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
alpm_trans_cb_progress progress)
int SYMEXPORT alpm_trans_init(alpm_handle_t *handle, alpm_transflag_t flags)
{
alpm_trans_t *trans;
@@ -67,9 +65,6 @@ int SYMEXPORT alpm_trans_init(alpm_handle_t *handle, alpm_transflag_t flags,
CALLOC(trans, 1, sizeof(alpm_trans_t), RET_ERR(handle, ALPM_ERR_MEMORY, -1));
trans->flags = flags;
trans->cb_event = event;
trans->cb_conv = conv;
trans->cb_progress = progress;
trans->state = STATE_INITIALIZED;
handle->trans = trans;
@@ -82,7 +77,7 @@ static alpm_list_t *check_arch(alpm_handle_t *handle, alpm_list_t *pkgs)
alpm_list_t *i;
alpm_list_t *invalid = NULL;
const char *arch = alpm_option_get_arch(handle);
const char *arch = handle->arch;
if(!arch) {
return NULL;
}
@@ -91,8 +86,8 @@ static alpm_list_t *check_arch(alpm_handle_t *handle, alpm_list_t *pkgs)
const char *pkgarch = alpm_pkg_get_arch(pkg);
if(pkgarch && strcmp(pkgarch, arch) && strcmp(pkgarch, "any")) {
char *string;
const char *pkgname = alpm_pkg_get_name(pkg);
const char *pkgver = alpm_pkg_get_version(pkg);
const char *pkgname = pkg->name;
const char *pkgver = pkg->version;
size_t len = strlen(pkgname) + strlen(pkgver) + strlen(pkgarch) + 3;
MALLOC(string, len, RET_ERR(handle, ALPM_ERR_MEMORY, invalid));
sprintf(string, "%s-%s-%s", pkgname, pkgver, pkgarch);
@@ -169,7 +164,7 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
trans->state = STATE_COMMITING;
if(trans->add == NULL) {
if(_alpm_remove_packages(handle) == -1) {
if(_alpm_remove_packages(handle, 1) == -1) {
/* pm_errno is set by _alpm_remove_commit() */
return -1;
}
@@ -224,9 +219,9 @@ int SYMEXPORT alpm_trans_release(alpm_handle_t *handle)
if(!nolock_flag) {
if(_alpm_handle_unlock(handle)) {
_alpm_log(handle, ALPM_LOG_WARNING, _("could not remove lock file %s\n"),
alpm_option_get_lockfile(handle));
handle->lockfile);
alpm_logaction(handle, "warning: could not remove lock file %s\n",
alpm_option_get_lockfile(handle));
handle->lockfile);
}
}
@@ -285,7 +280,6 @@ int _alpm_runscriptlet(alpm_handle_t *handle, const char *installfn,
char tmpdir[PATH_MAX];
char *argv[] = { "sh", "-c", cmdline, NULL };
char *scriptpath;
int clean_tmpdir = 0;
int retval = 0;
if(_alpm_access(handle, NULL, installfn, R_OK) != 0) {
@@ -302,8 +296,6 @@ int _alpm_runscriptlet(alpm_handle_t *handle, const char *installfn,
if(mkdtemp(tmpdir) == NULL) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not create temp directory\n"));
return 1;
} else {
clean_tmpdir = 1;
}
/* either extract or copy the scriptlet */
@@ -322,14 +314,14 @@ int _alpm_runscriptlet(alpm_handle_t *handle, const char *installfn,
goto cleanup;
}
/* chop off the root so we can find the tmpdir in the chroot */
scriptpath = scriptfn + strlen(handle->root) - 1;
if(!grep(scriptfn, script)) {
/* script not found in scriptlet file */
goto cleanup;
}
/* chop off the root so we can find the tmpdir in the chroot */
scriptpath = scriptfn + strlen(handle->root) - 1;
if(oldver) {
snprintf(cmdline, PATH_MAX, ". %s; %s %s %s",
scriptpath, script, ver, oldver);
@@ -343,7 +335,7 @@ int _alpm_runscriptlet(alpm_handle_t *handle, const char *installfn,
retval = _alpm_run_chroot(handle, "/bin/sh", argv);
cleanup:
if(clean_tmpdir && _alpm_rmrf(tmpdir)) {
if(_alpm_rmrf(tmpdir)) {
_alpm_log(handle, ALPM_LOG_WARNING, _("could not remove tmpdir %s\n"), tmpdir);
}

View File

@@ -42,34 +42,10 @@ struct __alpm_trans_t {
alpm_list_t *add; /* list of (alpm_pkg_t *) */
alpm_list_t *remove; /* list of (alpm_pkg_t *) */
alpm_list_t *skip_remove; /* list of (char *) */
alpm_trans_cb_event cb_event;
alpm_trans_cb_conv cb_conv;
alpm_trans_cb_progress cb_progress;
};
#define EVENT(t, e, d1, d2) \
do { \
if((t) && (t)->cb_event) { \
(t)->cb_event(e, d1, d2); \
} \
} while(0)
#define QUESTION(t, q, d1, d2, d3, r) \
do { \
if((t) && (t)->cb_conv) { \
(t)->cb_conv(q, d1, d2, d3, r); \
} \
} while(0)
#define PROGRESS(t, e, p, per, h, r) \
do { \
if((t) && (t)->cb_progress) { \
(t)->cb_progress(e, p, per, h, r); \
} \
} while(0)
void _alpm_trans_free(alpm_trans_t *trans);
int _alpm_trans_init(alpm_trans_t *trans, alpm_transflag_t flags,
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
alpm_trans_cb_progress progress);
int _alpm_trans_init(alpm_trans_t *trans, alpm_transflag_t flags);
int _alpm_runscriptlet(alpm_handle_t *handle, const char *installfn,
const char *script, const char *ver, const char *oldver);

View File

@@ -31,6 +31,7 @@
#include <unistd.h>
#include <ctype.h>
#include <dirent.h>
#include <fcntl.h>
#include <time.h>
#include <syslog.h>
#include <errno.h>
@@ -46,8 +47,10 @@
#ifdef HAVE_LIBSSL
#include <openssl/md5.h>
#include <openssl/sha.h>
#else
#include "md5.h"
#include "sha2.h"
#endif
/* libalpm */
@@ -190,7 +193,12 @@ char *_alpm_strtrim(char *str)
pch++;
}
if(pch != str) {
memmove(str, pch, (strlen(pch) + 1));
size_t len = strlen(pch);
if(len) {
memmove(str, pch, len + 1);
} else {
*str = '\0';
}
}
/* check if there wasn't anything but whitespace in the string. */
@@ -270,8 +278,7 @@ int _alpm_unpack(alpm_handle_t *handle, const char *archive, const char *prefix,
mode_t oldmask;
struct archive *_archive;
struct archive_entry *entry;
char cwd[PATH_MAX];
int restore_cwd = 0;
int cwdfd;
if((_archive = archive_read_new()) == NULL) {
RET_ERR(handle, ALPM_ERR_LIBARCHIVE, 1);
@@ -290,10 +297,11 @@ int _alpm_unpack(alpm_handle_t *handle, const char *archive, const char *prefix,
oldmask = umask(0022);
/* save the cwd so we can restore it later */
if(getcwd(cwd, PATH_MAX) == NULL) {
do {
cwdfd = open(".", O_RDONLY);
} while(cwdfd == -1 && errno == EINTR);
if(cwdfd < 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not get current working directory\n"));
} else {
restore_cwd = 1;
}
/* just in case our cwd was removed in the upgrade operation */
@@ -358,10 +366,14 @@ int _alpm_unpack(alpm_handle_t *handle, const char *archive, const char *prefix,
cleanup:
umask(oldmask);
archive_read_finish(_archive);
if(restore_cwd && chdir(cwd) != 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not change directory to %s (%s)\n"),
cwd, strerror(errno));
if(cwdfd >= 0) {
if(fchdir(cwdfd) != 0) {
_alpm_log(handle, ALPM_LOG_ERROR,
_("could not restore working directory (%s)\n"), strerror(errno));
}
close(cwdfd);
}
return ret;
}
@@ -483,17 +495,16 @@ int _alpm_logaction(alpm_handle_t *handle, const char *fmt, va_list args)
int _alpm_run_chroot(alpm_handle_t *handle, const char *path, char *const argv[])
{
char cwd[PATH_MAX];
pid_t pid;
int pipefd[2];
int restore_cwd = 0;
int pipefd[2], cwdfd;
int retval = 0;
/* save the cwd so we can restore it later */
if(getcwd(cwd, PATH_MAX) == NULL) {
do {
cwdfd = open(".", O_RDONLY);
} while(cwdfd == -1 && errno == EINTR);
if(cwdfd < 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not get current working directory\n"));
} else {
restore_cwd = 1;
}
/* just in case our cwd was removed in the upgrade operation */
@@ -562,7 +573,7 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *path, char *const argv[]
if(fgets(line, PATH_MAX, pipe_file) == NULL)
break;
alpm_logaction(handle, "%s", line);
EVENT(handle->trans, ALPM_TRANS_EVT_SCRIPTLET_INFO, line, NULL);
EVENT(handle, ALPM_EVENT_SCRIPTLET_INFO, line, NULL);
}
fclose(pipe_file);
}
@@ -591,8 +602,12 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *path, char *const argv[]
}
cleanup:
if(restore_cwd && chdir(cwd) != 0) {
_alpm_log(handle, ALPM_LOG_ERROR, _("could not change directory to %s (%s)\n"), cwd, strerror(errno));
if(cwdfd >= 0) {
if(fchdir(cwdfd) != 0) {
_alpm_log(handle, ALPM_LOG_ERROR,
_("could not restore working directory (%s)\n"), strerror(errno));
}
close(cwdfd);
}
return retval;
@@ -636,8 +651,8 @@ char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename)
struct stat buf;
/* Loop through the cache dirs until we find a matching file */
for(i = alpm_option_get_cachedirs(handle); i; i = alpm_list_next(i)) {
snprintf(path, PATH_MAX, "%s%s", (char *)alpm_list_getdata(i),
for(i = handle->cachedirs; i; i = i->next) {
snprintf(path, PATH_MAX, "%s%s", (char *)i->data,
filename);
if(stat(path, &buf) == 0 && S_ISREG(buf.st_mode)) {
retpath = strdup(path);
@@ -657,12 +672,12 @@ char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename)
const char *_alpm_filecache_setup(alpm_handle_t *handle)
{
struct stat buf;
alpm_list_t *i, *tmp;
char *cachedir;
alpm_list_t *i;
char *cachedir, *tmpdir;
/* Loop through the cache dirs until we find a writeable dir */
for(i = alpm_option_get_cachedirs(handle); i; i = alpm_list_next(i)) {
cachedir = alpm_list_getdata(i);
/* Loop through the cache dirs until we find a usable directory */
for(i = handle->cachedirs; i; i = i->next) {
cachedir = i->data;
if(stat(cachedir, &buf) != 0) {
/* cache directory does not exist.... try creating it */
_alpm_log(handle, ALPM_LOG_WARNING, _("no %s cache exists, creating...\n"),
@@ -671,21 +686,33 @@ const char *_alpm_filecache_setup(alpm_handle_t *handle)
_alpm_log(handle, ALPM_LOG_DEBUG, "using cachedir: %s\n", cachedir);
return cachedir;
}
} else if(S_ISDIR(buf.st_mode) && (buf.st_mode & S_IWUSR)) {
} else if(!S_ISDIR(buf.st_mode)) {
_alpm_log(handle, ALPM_LOG_DEBUG,
"skipping cachedir, not a directory: %s\n", cachedir);
} else if(access(cachedir, W_OK) != 0) {
_alpm_log(handle, ALPM_LOG_DEBUG,
"skipping cachedir, not writable: %s\n", cachedir);
} else if(!(buf.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH))) {
_alpm_log(handle, ALPM_LOG_DEBUG,
"skipping cachedir, no write bits set: %s\n", cachedir);
} else {
_alpm_log(handle, ALPM_LOG_DEBUG, "using cachedir: %s\n", cachedir);
return cachedir;
} else {
_alpm_log(handle, ALPM_LOG_DEBUG, "skipping cachedir: %s\n", cachedir);
}
}
/* we didn't find a valid cache directory. use /tmp. */
tmp = alpm_list_add(NULL, "/tmp/");
alpm_option_set_cachedirs(handle, tmp);
alpm_list_free(tmp);
_alpm_log(handle, ALPM_LOG_DEBUG, "using cachedir: %s\n", "/tmp/");
_alpm_log(handle, ALPM_LOG_WARNING, _("couldn't create package cache, using /tmp instead\n"));
return "/tmp/";
/* we didn't find a valid cache directory. use TMPDIR or /tmp. */
if((tmpdir = getenv("TMPDIR")) && stat(tmpdir, &buf) && S_ISDIR(buf.st_mode)) {
/* TMPDIR was good, we can use it */
} else {
tmpdir = "/tmp";
}
alpm_option_add_cachedir(handle, tmpdir);
cachedir = handle->cachedirs->prev->data;
_alpm_log(handle, ALPM_LOG_DEBUG, "using cachedir: %s\n", cachedir);
_alpm_log(handle, ALPM_LOG_WARNING,
_("couldn't find or create package cache, using %s instead\n"), cachedir);
return cachedir;
}
/** lstat wrapper that treats /path/dirsymlink/ the same as /path/dirsymlink.
@@ -747,6 +774,53 @@ static int md5_file(const char *path, unsigned char output[16])
fclose(f);
return 0;
}
/* third param is so we match the PolarSSL definition */
static int sha2_file(const char *path, unsigned char output[32], int is224)
{
FILE *f;
size_t n;
SHA256_CTX ctx;
unsigned char *buf;
CALLOC(buf, 8192, sizeof(unsigned char), return 1);
if((f = fopen(path, "rb")) == NULL) {
free(buf);
return 1;
}
if(is224) {
SHA224_Init(&ctx);
} else {
SHA256_Init(&ctx);
}
while((n = fread(buf, 1, sizeof(buf), f)) > 0) {
if(is224) {
SHA224_Update(&ctx, buf, n);
} else {
SHA256_Update(&ctx, buf, n);
}
}
if(is224) {
SHA224_Final(output, &ctx);
} else {
SHA256_Final(output, &ctx);
}
memset(&ctx, 0, sizeof(SHA256_CTX));
free(buf);
if(ferror(f) != 0) {
fclose(f);
return 2;
}
fclose(f);
return 0;
}
#endif
/** Get the md5 sum of file.
@@ -768,6 +842,7 @@ char SYMEXPORT *alpm_compute_md5sum(const char *filename)
ret = md5_file(filename, output);
if(ret > 0) {
free(md5sum);
return NULL;
}
@@ -780,22 +855,61 @@ char SYMEXPORT *alpm_compute_md5sum(const char *filename)
return md5sum;
}
int _alpm_test_md5sum(const char *filepath, const char *md5sum)
/** Get the sha256 sum of file.
* @param filename name of the file
* @return the checksum on success, NULL on error
* @addtogroup alpm_misc
*/
char SYMEXPORT *alpm_compute_sha256sum(const char *filename)
{
char *md5sum2;
unsigned char output[32];
char *sha256sum;
int ret, i;
ASSERT(filename != NULL, return NULL);
/* allocate 64 chars plus 1 for null */
CALLOC(sha256sum, 65, sizeof(char), return NULL);
/* defined above for OpenSSL, otherwise defined in sha2.h */
ret = sha2_file(filename, output, 0);
if(ret > 0) {
free(sha256sum);
return NULL;
}
/* Convert the result to something readable */
for (i = 0; i < 32; i++) {
/* sprintf is acceptable here because we know our output */
sprintf(sha256sum +(i * 2), "%02x", output[i]);
}
return sha256sum;
}
int _alpm_test_checksum(const char *filepath, const char *expected,
enum _alpm_csum type)
{
char *computed;
int ret;
md5sum2 = alpm_compute_md5sum(filepath);
if(type == ALPM_CSUM_MD5) {
computed = alpm_compute_md5sum(filepath);
} else if(type == ALPM_CSUM_SHA256) {
computed = alpm_compute_sha256sum(filepath);
} else {
return -1;
}
if(md5sum == NULL || md5sum2 == NULL) {
if(expected == NULL || computed == NULL) {
ret = -1;
} else if(strcmp(md5sum, md5sum2) != 0) {
} else if(strcmp(expected, computed) != 0) {
ret = 1;
} else {
ret = 0;
}
FREE(md5sum2);
FREE(computed);
return ret;
}
@@ -966,17 +1080,43 @@ unsigned long _alpm_hash_sdbm(const char *str)
return hash;
}
long _alpm_parsedate(const char *line)
off_t _alpm_strtoofft(const char *line)
{
char *end;
unsigned long long result;
errno = 0;
/* we are trying to parse bare numbers only, no leading anything */
if(line[0] < '1' || line[0] > '9') {
return (off_t)-1;
}
result = strtoull(line, &end, 10);
if (result == 0 && end == line) {
/* line was not a number */
return (off_t)-1;
} else if (result == ULLONG_MAX && errno == ERANGE) {
/* line does not fit in unsigned long long */
return (off_t)-1;
} else if (*end) {
/* line began with a number but has junk left over at the end */
return (off_t)-1;
}
return (off_t)result;
}
time_t _alpm_parsedate(const char *line)
{
if(isalpha((unsigned char)line[0])) {
/* initialize to null in case of failure */
struct tm tmp_tm = { 0 };
struct tm tmp_tm;
memset(&tmp_tm, 0, sizeof(struct tm));
setlocale(LC_TIME, "C");
strptime(line, "%a %b %e %H:%M:%S %Y", &tmp_tm);
setlocale(LC_TIME, "");
return mktime(&tmp_tm);
}
return atol(line);
return (time_t)atol(line);
}
/**

View File

@@ -91,6 +91,11 @@ struct archive_read_buffer {
int ret;
};
enum _alpm_csum {
ALPM_CSUM_MD5,
ALPM_CSUM_SHA256,
};
int _alpm_makepath(const char *path);
int _alpm_makepath_mode(const char *path, mode_t mode);
int _alpm_copyfile(const char *src, const char *dest);
@@ -109,12 +114,13 @@ int _alpm_str_cmp(const void *s1, const void *s2);
char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename);
const char *_alpm_filecache_setup(alpm_handle_t *handle);
int _alpm_lstat(const char *path, struct stat *buf);
int _alpm_test_md5sum(const char *filepath, const char *md5sum);
int _alpm_test_checksum(const char *filepath, const char *expected, enum _alpm_csum type);
int _alpm_archive_fgets(struct archive *a, struct archive_read_buffer *b);
int _alpm_splitname(const char *target, char **name, char **version,
unsigned long *name_hash);
unsigned long _alpm_hash_sdbm(const char *str);
long _alpm_parsedate(const char *line);
off_t _alpm_strtoofft(const char *line);
time_t _alpm_parsedate(const char *line);
int _alpm_raw_cmp(const char *first, const char *second);
int _alpm_raw_ncmp(const char *first, const char *second, size_t max);
int _alpm_access(alpm_handle_t *handle, const char *dir, const char *file, int amode);

View File

@@ -98,16 +98,21 @@ static int rpmvercmp(const char *a, const char *b)
str1 = strdup(a);
str2 = strdup(b);
one = str1;
two = str2;
one = ptr1 = str1;
two = ptr2 = str2;
/* loop through each version segment of str1 and str2 and compare them */
while(*one && *two) {
while(*one && !isalnum((int)*one)) one++;
while(*two && !isalnum((int)*two)) two++;
while (*one && *two) {
while (*one && !isalnum((int)*one)) one++;
while (*two && !isalnum((int)*two)) two++;
/* If we ran to the end of either, we are finished with the loop */
if(!(*one && *two)) break;
if (!(*one && *two)) break;
/* If the separator lengths were different, we are also finished */
if ((one - ptr1) != (two - ptr2)) {
return (one - ptr1) < (two - ptr2) ? -1 : 1;
}
ptr1 = one;
ptr2 = two;
@@ -115,13 +120,13 @@ static int rpmvercmp(const char *a, const char *b)
/* grab first completely alpha or completely numeric segment */
/* leave one and two pointing to the start of the alpha or numeric */
/* segment and walk ptr1 and ptr2 to end of segment */
if(isdigit((int)*ptr1)) {
while(*ptr1 && isdigit((int)*ptr1)) ptr1++;
while(*ptr2 && isdigit((int)*ptr2)) ptr2++;
if (isdigit((int)*ptr1)) {
while (*ptr1 && isdigit((int)*ptr1)) ptr1++;
while (*ptr2 && isdigit((int)*ptr2)) ptr2++;
isnum = 1;
} else {
while(*ptr1 && isalpha((int)*ptr1)) ptr1++;
while(*ptr2 && isalpha((int)*ptr2)) ptr2++;
while (*ptr1 && isalpha((int)*ptr1)) ptr1++;
while (*ptr2 && isalpha((int)*ptr2)) ptr2++;
isnum = 0;
}

View File

@@ -4,9 +4,7 @@ AUTOMAKE_OPTIONS = std-options
SUBDIRS = po
bin_SCRIPTS = \
$(OURSCRIPTS) \
repo-remove \
repo-elephant
$(OURSCRIPTS)
OURSCRIPTS = \
makepkg \
@@ -46,6 +44,7 @@ edit = sed \
-e 's|@localedir[@]|$(localedir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
-e 's|@prefix[@]|$(prefix)|g' \
-e '1s|!/bin/bash|!$(BASH_SHELL)|g' \
-e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
@@ -65,7 +64,7 @@ edit = sed \
# third 'test' line- make sure one of the two checks succeeded
$(OURSCRIPTS): Makefile
@echo ' ' GEN $@;
@rm -f $@
@$(RM) $@
@test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
@chmod +x $@
@chmod a-w $@
@@ -98,11 +97,27 @@ repo-add: \
$(srcdir)/library/output_format.sh
repo-remove: $(srcdir)/repo-add.sh.in
rm -f repo-remove
$(RM) repo-remove
$(LN_S) repo-add repo-remove
repo-elephant: $(srcdir)/repo-add.sh.in
rm -f repo-elephant
$(RM) repo-elephant
$(LN_S) repo-add repo-elephant
install-data-hook:
cd $(DESTDIR)$(bindir) && \
$(RM) repo-elephant && \
( $(LN_S) repo-add repo-elephant || \
ln repo-add repo-elephant || \
cp repo-add repo-elephant )
cd $(DESTDIR)$(bindir) && \
$(RM) repo-remove && \
( $(LN_S) repo-add repo-remove || \
ln repo-add repo-remove || \
cp repo-add repo-remove )
uninstall-hook:
cd $(DESTDIR)$(bindir) && \
$(RM) repo-remove repo-elephant
# vim:set ts=2 sw=2 noet:

View File

@@ -81,6 +81,8 @@ FORCE_VER=""
PACMAN_OPTS=
shopt -s extglob
### SUBROUTINES ###
plain() {
@@ -250,7 +252,7 @@ get_full_version() {
for i in pkgver pkgrel epoch; do
local indirect="${i}_override"
eval $(declare -f package_$1 | sed -n "s/\(^[[:space:]]*$i=\)/${i}_override=/p")
[[ -z ${!indirect} ]] && eval "${indirect}=\${${i}}"
[[ -z ${!indirect} ]] && eval ${indirect}=\"${!i}\"
done
if (( ! $epoch_override )); then
echo $pkgver_override-$pkgrel_override
@@ -341,7 +343,7 @@ in_array() {
source_has_signatures(){
local file
for file in "${source[@]}"; do
if [[ $file =~ .*(sig|asc) ]]; then
if [[ $file = *.@(sig|asc) ]]; then
return 0
fi
done
@@ -420,7 +422,7 @@ download_file() {
run_pacman() {
local cmd
printf -v cmd "%q " "$PACMAN" $PACMAN_OPTS "$@"
if (( ! ASROOT )) && [[ ! $1 =~ ^-(T|Qq)$ ]]; then
if (( ! ASROOT )) && [[ ! $1 = -@(T|Qq) ]]; then
if type -p sudo >/dev/null; then
cmd="sudo $cmd"
else
@@ -439,8 +441,8 @@ check_deps() {
local ret=0
local pmout
pmout=$(run_pacman -T "$@") || ret=$?
set -E
set -E
if (( ret == 127 )); then #unresolved deps
echo "$pmout"
elif (( ret )); then
@@ -472,11 +474,13 @@ handle_deps() {
fi
# we might need the new system environment
# avoid triggering the ERR trap
# avoid triggering the ERR trap and exiting
set +e
local restoretrap=$(trap -p ERR)
trap - ERR
source /etc/profile &>/dev/null
eval $restoretrap
set -e
return $R_DEPS_SATISFIED
}
@@ -702,52 +706,55 @@ check_pgpsigs() {
msg "$(gettext "Verifying source file signatures with %s...")" "gpg"
local file
local file pubkey
local warning=0
local errors=0
local statusfile=$(mktemp)
for file in "${source[@]}"; do
file="$(get_filename "$file")"
if [[ ! $file =~ .*(sig|asc) ]]; then
if [[ ! $file = *.@(sig|asc) ]]; then
continue
fi
echo -n " ${file%.*} ... " >&2
printf " %s ... " "${file%.*}" >&2
if ! file="$(get_filepath "$file")"; then
echo "$(gettext "SIGNATURE NOT FOUND")" >&2
printf '%s\n' "$(gettext "SIGNATURE NOT FOUND")" >&2
errors=1
continue
fi
if ! sourcefile="$(get_filepath "${file%.*}")"; then
echo "$(gettext "SOURCE FILE NOT FOUND")" >&2
printf '%s\n' "$(gettext "SOURCE FILE NOT FOUND")" >&2
errors=1
continue
fi
if ! gpg --quiet --batch --status-file "$statusfile" --verify "$file" "$sourcefile" 2> /dev/null; then
if grep "NO_PUBKEY" "$statusfile" > /dev/null; then
warning "$(gettext "Unknown public key") $(awk '/NO_PUBKEY/ {print $3}' $statusfile)" >&2
printf '%s' "$(gettext "FAILED")" >&2
if ! pubkey=$(awk '/NO_PUBKEY/ { print $3; exit 1; }' "$statusfile"); then
printf ' (%s)' "$(gettext "unknown public key") $pubkey" >&2
warnings=1
else
echo "$(gettext "FAILED")" >&2
errors=1
fi
printf '\n' >&2
else
if grep "REVKEYSIG" "$statusfile" > /dev/null; then
echo "$(gettext "Passed")" "-" "$(gettext "Warning: the key has been revoked.")" >&2
if grep -q "REVKEYSIG" "$statusfile"; then
printf '%s (%s)' "$(gettext "FAILED")" "$(gettext "the key has been revoked.")" >&2
errors=1
elif grep "EXPSIG" "$statusfile" > /dev/null; then
echo "$(gettext "Passed")" "-" "$(gettext "Warning: the signature has expired.")" >&2
warnings=1
elif grep "EXPKEYSIG" "$statusfile" > /dev/null; then
echo "$(gettext "Passed")" "-" "$(gettext "Warning: the key has expired.")" >&2
warnings=1
else
echo $(gettext "Passed") >&2
printf '%s' "$(gettext "Passed")" >&2
if grep -q "EXPSIG" "$statusfile"; then
printf ' (%s)' "$(gettext "WARNING:") $(gettext "the signature has expired.")" >&2
warnings=1
elif grep -q "EXPKEYSIG" "$statusfile"; then
printf ' (%s)' "$(gettext "WARNING:") $(gettext "the key has expired.")" >&2
warnings=1
fi
fi
printf '\n' >&2
fi
done
@@ -864,14 +871,12 @@ run_function() {
# clear user-specified buildflags if requested
if [[ $(check_option buildflags) = "n" ]]; then
CFLAGS=""
CXXFLAGS=""
LDFLAGS=""
unset CFLAGS CXXFLAGS LDFLAGS
fi
# clear user-specified makeflags if requested
if [[ $(check_option makeflags) = "n" ]]; then
MAKEFLAGS=""
unset MAKEFLAGS
fi
msg "$(gettext "Starting %s()...")" "$pkgfunc"
@@ -991,16 +996,15 @@ tidy_install() {
# check file still exists (potentially already compressed due to hardlink)
if [[ -f ${manpage} ]]; then
# find hard links and remove them
# the '|| true' part keeps the script from bailing if find returned an
# error, such as when one of the man directories doesn't exist
hardlinks="$(find ${MAN_DIRS[@]} \! -name "$file" -samefile "$manpage" 2>/dev/null)" || true
for hl in ${hardlinks}; do
rm -f "${hl}";
done
# the '|| true' part keeps the script from bailing on the EOF returned
# by read at the end of the find output
IFS=$'\n' read -rd '' -a hardlinks < \
<(find "${MAN_DIRS[@]}" \! -name "$file" -samefile "$manpage" 2>/dev/null) || true
rm -f "${hardlinks[@]}"
# compress the original
gzip -9 "$manpage"
# recreate hard links removed earlier
for hl in ${hardlinks}; do
for hl in "${hardlinks[@]}"; do
ln "${manpage}.gz" "${hl}.gz"
chmod 644 ${hl}.gz
done
@@ -1018,11 +1022,11 @@ tidy_install() {
find . -type f -perm -u+w 2>/dev/null | while read binary ; do
case "$(file -bi "$binary")" in
*application/x-sharedlib*) # Libraries (.so)
/usr/bin/strip $STRIP_SHARED "$binary";;
strip $STRIP_SHARED "$binary";;
*application/x-archive*) # Libraries (.a)
/usr/bin/strip $STRIP_STATIC "$binary";;
strip $STRIP_STATIC "$binary";;
*application/x-executable*) # Binaries
/usr/bin/strip $STRIP_BINARIES "$binary";;
strip $STRIP_BINARIES "$binary";;
esac
done
fi
@@ -1354,16 +1358,15 @@ create_srcpackage() {
local i
for i in 'changelog' 'install'; do
local filelist=$(sed -n "s/^[[:space:]]*$i=//p" "$BUILDFILE")
local file
for file in $filelist; do
while read -r file; do
# evaluate any bash variables used
eval file=${file}
eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
if [[ ! -f "${srclinks}/${pkgbase}/$file" ]]; then
msg2 "$(gettext "Adding %s file (%s)...")" "$i" "${file}"
ln -s "${startdir}/$file" "${srclinks}/${pkgbase}/"
fi
done
done < <(sed -n "s/^[[:space:]]*$i=//p" "$BUILDFILE")
done
local TAR_OPT
@@ -1449,25 +1452,28 @@ check_sanity() {
ret=1
fi
awk -F'=' '/^[[:space:]]*pkgver=/ { $1=""; print $0 }' "$BUILDFILE" |
while read i _; do
if [[ $i =~ [[:space:]:-] ]]; then
awk -F'=' '$1 ~ /^[[:space:]]*pkgver$/' "$BUILDFILE" |
while IFS='=' read -r _ i; do
eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ $i = *[[:space:]:-]* ]]; then
error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgver"
return 1
fi
done || ret=1
awk -F'=' '/^[[:space:]]*pkgrel=/ { $1=""; print $0 }' "$BUILDFILE" |
while read i _; do
if [[ $i =~ [[:space:]-] ]]; then
awk -F'=' '$1 ~ /^[[:space:]]*pkgrel$/' "$BUILDFILE" |
while IFS='=' read -r _ i; do
eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ $i = *[[:space:]-]* ]]; then
error "$(gettext "%s is not allowed to contain hyphens or whitespace.")" "pkgrel"
return 1
fi
done || ret=1
awk -F'=' '/^[[:space:]]*epoch=/ { $1=""; print $0 }' "$BUILDFILE" |
while read i _; do
if [[ ! $i =~ ^[0-9]*$ ]]; then
awk -F'=' '$1 ~ /^[[:space:]]*epoch$/' "$BUILDFILE" |
while IFS='=' read -r _ i; do
eval i=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$i")\"
if [[ $i != *([[:digit:]]) ]]; then
error "$(gettext "%s must be an integer.")" "epoch"
return 1
fi
@@ -1524,23 +1530,22 @@ check_sanity() {
sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//" -e 's/\\$//')
for i in "${optdepends_list[@]}"; do
local pkg=${i%%:*}
if [[ ! $pkg =~ ^[[:alnum:]\>\<\=\.\+\_\-]+$ ]]; then
if [[ $pkg != +([[:alnum:]><=.+_-]) ]]; then
error "$(gettext "Invalid syntax for %s : '%s'")" "optdepend" "$i"
ret=1
fi
done
for i in 'changelog' 'install'; do
local filelist=$(sed -n "s/^[[:space:]]*$i=//p" "$BUILDFILE")
local file
for file in $filelist; do
while read -r file; do
# evaluate any bash variables used
eval file=${file}
if [[ ! -f $file ]]; then
eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
if [[ $file && ! -f $file ]]; then
error "$(gettext "%s file (%s) does not exist.")" "$i" "$file"
ret=1
fi
done
done < <(sed -n "s/^[[:space:]]*$i=//p" "$BUILDFILE")
done
local valid_options=1
@@ -1611,7 +1616,7 @@ check_software() {
fi
# gpg - source verification
if (( ! SKIPPGPCHECK )) && [[ source_has_signatures ]]; then
if (( ! SKIPPGPCHECK )) && source_has_signatures; then
if ! type -p gpg >/dev/null; then
error "$(gettext "Cannot find the %s binary required for verifying source files.")" "gpg"
ret=1
@@ -1844,6 +1849,7 @@ usage() {
echo "$(gettext " -r, --rmdeps Remove installed dependencies after a successful build")"
echo "$(gettext " -R, --repackage Repackage contents of the package without rebuilding")"
printf "$(gettext " -s, --syncdeps Install missing dependencies with %s")\n" "pacman"
echo "$(gettext " -S, --source Generate a source-only tarball without downloaded sources")"
echo "$(gettext " --allsource Generate a source-only tarball including downloaded sources")"
printf "$(gettext " --asroot Allow %s to run as root user")\n" "makepkg"
printf "$(gettext " --check Run the %s function in the %s")\n" "check()" "$BUILDSCRIPT"
@@ -1857,7 +1863,6 @@ usage() {
echo "$(gettext " --skipchecksums Do not verify checksums of the source files")"
echo "$(gettext " --skipinteg Do not perform any verification checks on source files")"
echo "$(gettext " --skippgpcheck Do not verify source files with PGP signatures")"
echo "$(gettext " --source Generate a source-only tarball without downloaded sources")"
echo
printf "$(gettext "These options can be passed to %s:")\n" "pacman"
echo
@@ -1889,7 +1894,7 @@ fi
ARGLIST=("$@")
# Parse Command Line Options.
OPT_SHORT="AcdefFghiLmop:rRsV"
OPT_SHORT="AcdefFghiLmop:rRsSV"
OPT_LONG="allsource,asroot,ignorearch,check,clean,nodeps"
OPT_LONG+=",noextract,force,forcever:,geninteg,help,holdver,skippgpcheck"
OPT_LONG+=",install,key:,log,nocolor,nobuild,nocheck,nosign,pkg:,rmdeps"
@@ -1940,8 +1945,8 @@ while true; do
--skipinteg) SKIPCHECKSUMS=1; SKIPPGPCHECK=1 ;;
--skippgpcheck) SKIPPGPCHECK=1;;
--sign) SIGNPKG='y' ;;
--source) SOURCEONLY=1 ;;
-s|--syncdeps) DEP_BIN=1 ;;
-S|--source) SOURCEONLY=1 ;;
-h|--help) usage; exit 0 ;; # E_OK
-V|--version) version; exit 0 ;; # E_OK

View File

@@ -35,13 +35,18 @@ FINGER=0
IMPORT=0
IMPORT_TRUSTDB=0
INIT=0
KEYSERVER=''
LISTKEYS=0
LISTSIGS=0
LSIGNKEY=0
POPULATE=0
RECEIVE=0
RELOAD=0
REFRESH=0
UPDATEDB=0
VERIFY=0
DEFAULT_KEYSERVER='hkp://keys.gnupg.net'
m4_include(library/output_format.sh)
m4_include(library/parse_options.sh)
@@ -54,13 +59,13 @@ usage() {
printf "$(gettext "Manage pacman\'s list of trusted keys")\n"
echo
echo "$(gettext "Options:")"
echo "$(gettext " -a, --add [<file(s)>] Add the specified keys (empty for stdin)")"
echo "$(gettext " -a, --add [file(s)] Add the specified keys (empty for stdin)")"
echo "$(gettext " -d, --delete <keyid(s)> Remove the specified keyids")"
echo "$(gettext " -e, --export [<keyid(s)>] Export the specified or all keyids")"
echo "$(gettext " -f, --finger [<keyid(s)>] List fingerprint for specified or all keyids")"
echo "$(gettext " -e, --export [keyid(s)] Export the specified or all keyids")"
echo "$(gettext " -f, --finger [keyid(s)] List fingerprint for specified or all keyids")"
echo "$(gettext " -h, --help Show this help message and exit")"
echo "$(gettext " -l, --list-keys [<keyid(s)>] List the specified or all keys")"
echo "$(gettext " -r, --receive <keyserver> <keyid(s)> Fetch the specified keyids")"
echo "$(gettext " -l, --list-keys [keyid(s)] List the specified or all keys")"
echo "$(gettext " -r, --recv-keys <keyid(s)> Fetch the specified keyids")"
echo "$(gettext " -u, --updatedb Update the trustdb of pacman")"
echo "$(gettext " -v, --verify <signature> Verify the file specified by the signature")"
echo "$(gettext " -V, --version Show program version")"
@@ -72,8 +77,12 @@ usage() {
echo "$(gettext " --import <dir(s)> Imports pubring.gpg and trustdb.gpg from dir(s)")"
echo "$(gettext " --import-trustdb <dir(s)> Imports ownertrust values from trustdb.gpg in dir(s)")"
echo "$(gettext " --init Ensure the keyring is properly initialized")"
echo "$(gettext " --list-sigs [<keyid(s)>] List keys and their signatures")"
echo "$(gettext " --reload Reload the default keys")"
echo "$(gettext " --keyserver Specify a keyserver to use if necessary")"
echo "$(gettext " --list-sigs [keyid(s)] List keys and their signatures")"
echo "$(gettext " --lsign-key <keyid> Locally sign the specified keyid")"
printf "$(gettext " --populate [keyring(s)] Reload the default keys from the (given) keyrings\n\
in '%s'")\n" "@pkgdatadir@/keyrings"
echo "$(gettext " --refresh-keys [keyid(s)] Update specified or all keys from a keyserver")"
}
version() {
@@ -99,7 +108,41 @@ get_from() {
return 1
}
generate_master_key() {
# Generate the master key, which will be in both pubring and secring
"${GPG_PACMAN[@]}" --gen-key --batch <<EOF
%echo Generating pacman keychain master key...
Key-Type: RSA
Key-Length: 2048
Key-Usage: sign
Name-Real: Pacman Keychain Master Key
Name-Email: pacman@localhost
Expire-Date: 0
%commit
%echo Done
EOF
}
secret_keys_available() {
"${GPG_PACMAN[@]}" -K --with-colons | wc -l
}
# Adds the given gpg.conf option if it is not present in the file.
# Note that if we find it commented out, we won't add the option.
# args: $1 conffile, $2 option-name, $3 (optional) option-value
add_gpg_conf_option() {
local confline
# looking for the option 'bare', only leading spaces or # chars allowed,
# followed by at least one space and any other text or the end of line.
if ! grep -q "^[[:space:]#]*$2\([[:space:]].*\)*$" "$1" &>/dev/null; then
confline="$2"
[[ -n $3 ]] && confline="$2 $3"
echo "$confline" >> "$1"
fi
}
initialize() {
local conffile keyserv
# Check for simple existence rather than for a directory as someone
# may want to use a symlink here
[[ -e ${PACMAN_KEYRING_DIR} ]] || mkdir -p -m 755 "${PACMAN_KEYRING_DIR}"
@@ -108,19 +151,28 @@ initialize() {
[[ -f ${PACMAN_KEYRING_DIR}/pubring.gpg ]] || touch ${PACMAN_KEYRING_DIR}/pubring.gpg
[[ -f ${PACMAN_KEYRING_DIR}/secring.gpg ]] || touch ${PACMAN_KEYRING_DIR}/secring.gpg
[[ -f ${PACMAN_KEYRING_DIR}/trustdb.gpg ]] || "${GPG_PACMAN[@]}" --update-trustdb
chmod 644 ${PACMAN_KEYRING_DIR}/{{pub,sec}ring,trustdb}.gpg
chmod 644 ${PACMAN_KEYRING_DIR}/{pubring,trustdb}.gpg
chmod 600 ${PACMAN_KEYRING_DIR}/secring.gpg
# gpg.conf
[[ -f ${PACMAN_KEYRING_DIR}/gpg.conf ]] || touch ${PACMAN_KEYRING_DIR}/gpg.conf
chmod 644 ${PACMAN_KEYRING_DIR}/gpg.conf
if ! grep -w -q "lock-never" ${PACMAN_KEYRING_DIR}/gpg.conf &>/dev/null; then
echo "lock-never" >> ${PACMAN_KEYRING_DIR}/gpg.conf
conffile="${PACMAN_KEYRING_DIR}/gpg.conf"
[[ -f $conffile ]] || touch "$conffile"
chmod 644 "$conffile"
add_gpg_conf_option "$conffile" 'no-greeting'
add_gpg_conf_option "$conffile" 'no-permission-warning'
add_gpg_conf_option "$conffile" 'lock-never'
keyserv=${KEYSERVER:-$DEFAULT_KEYSERVER}
add_gpg_conf_option "$conffile" 'keyserver' "$keyserv"
# set up a private signing key (if none available)
if [[ $(secret_keys_available) -lt 1 ]]; then
generate_master_key
UPDATEDB=1
fi
}
check_keyring() {
if [[ ! -r ${PACMAN_KEYRING_DIR}/pubring.gpg || \
! -r ${PACMAN_KEYRING_DIR}/secring.gpg || \
! -r ${PACMAN_KEYRING_DIR}/trustdb.gpg ]]; then
error "$(gettext "You do not have sufficient permissions to read the %s keyring...")" "pacman"
msg "$(gettext "Use '%s' to correct the keyring permissions.")" "pacman-key --init"
@@ -128,149 +180,151 @@ check_keyring() {
fi
if (( (EXPORT || FINGER || LIST || VERIFY) && EUID != 0 )); then
if ! grep -w -q "lock-never" ${PACMAN_KEYRING_DIR}/gpg.conf &>/dev/null; then
if ! grep -q "^[[:space:]]*lock-never[[:space:]]*$" ${PACMAN_KEYRING_DIR}/gpg.conf &>/dev/null; then
error "$(gettext "You do not have sufficient permissions to run this command...")"
msg "$(gettext "Use '%s' to correct the keyring permissions.")" "pacman-key --init"
exit 1
fi
fi
if (( LSIGNKEY )); then
if [[ $(secret_keys_available) -lt 1 ]]; then
error "$(gettext "There is no secret key available to sign with.")"
msg "$(gettext "Use '%s' to generate a default secret key.")" "pacman-key --init"
exit 1
fi
fi
}
validate_with_gpg() {
msg2 "$(gettext "Verifying %s...")" "$1"
if [[ ! -f "$1.sig" ]]; then
error "$(gettext "File %s is unsigned, cannot continue.")" "$1"
return 1
elif ! "${GPG_PACMAN[@]}" --verify "$1.sig"; then
error "$(gettext "The signature of file %s is not valid.")" "$1"
return 1
fi
return 0
}
verify_keyring_input() {
local ret=0;
local KEYRING_IMPORT_DIR='@pkgdatadir@/keyrings'
# Verify signatures of related files, if they exist
if [[ -r "${ADDED_KEYS}" ]]; then
msg "$(gettext "Verifying official keys file signature...")"
if ! "${GPG_PACMAN[@]}" --verify "${ADDED_KEYS}.sig" &>/dev/null; then
error "$(gettext "The signature of file %s is not valid.")" "${ADDED_KEYS}"
ret=1
fi
fi
# Verify signatures of keyring files and association revocation files if they exist
msg "$(gettext "Verifying keyring file signatures...")"
local keyring keyfile
for keyring in "${KEYRINGIDS[@]}"; do
keyfile="${KEYRING_IMPORT_DIR}/${keyring}.gpg"
validate_with_gpg "${keyfile}" || ret=1
if [[ -r "${DEPRECATED_KEYS}" ]]; then
msg "$(gettext "Verifying deprecated keys file signature...")"
if ! "${GPG_PACMAN[@]}" --verify "${DEPRECATED_KEYS}.sig" &>/dev/null; then
error "$(gettext "The signature of file %s is not valid.")" "${DEPRECATED_KEYS}"
ret=1
keyfile="${KEYRING_IMPORT_DIR}/${keyring}-trusted"
if [[ -f "${keyfile}" ]]; then
validate_with_gpg "${keyfile}" || ret=1
fi
fi
if [[ -r "${REMOVED_KEYS}" ]]; then
msg "$(gettext "Verifying deleted keys file signature...")"
if ! "${GPG_PACMAN[@]}" --verify "${REMOVED_KEYS}.sig" &>/dev/null; then
error "$(gettext "The signature of file %s is not valid.")" "${REMOVED_KEYS}"
ret=1
keyfile="${KEYRING_IMPORT_DIR}/${keyring}-revoked"
if [[ -f "${keyfile}" ]]; then
validate_with_gpg "${keyfile}" || ret=1
fi
fi
done
return $ret
}
reload_keyring() {
local PACMAN_SHARE_DIR='@prefix@/share/pacman'
local GPG_NOKEYRING=(gpg --batch --quiet --ignore-time-conflict --no-options --no-default-keyring --homedir ${PACMAN_KEYRING_DIR})
populate_keyring() {
local KEYRING_IMPORT_DIR='@pkgdatadir@/keyrings'
local keyring
local ret=0
if [[ -z ${KEYRINGIDS[@]} ]]; then
# get list of all available keyrings
shopt -s nullglob
KEYRINGIDS=("$KEYRING_IMPORT_DIR"/*.gpg)
shopt -u nullglob
KEYRINGIDS=("${KEYRINGIDS[@]##*/}")
KEYRINGIDS=("${KEYRINGIDS[@]%.gpg}")
if [[ -z ${KEYRINGIDS[@]} ]]; then
error "$(gettext "No keyring files exist in %s.")" "$KEYRING_IMPORT_DIR"
ret=1
fi
else
# verify listed keyrings exist
for keyring in "${KEYRINGIDS[@]}"; do
if [[ ! -f "$KEYRING_IMPORT_DIR/$keyring.gpg" ]]; then
error "$(gettext "The keyring file %s does not exist.")" "$KEYRING_IMPORT_DIR/$keyring.gpg"
ret=1
fi
done
fi
if (( ret )); then
exit 1
fi
verify_keyring_input || exit 1
# Variable used for iterating on keyrings
local key
local key_id
# Keyring with keys to be added to the keyring
local ADDED_KEYS="${PACMAN_SHARE_DIR}/addedkeys.gpg"
# Add keys from requested keyrings
for keyring in "${KEYRINGIDS[@]}"; do
msg "$(gettext "Appending keys from %s.gpg...")" "$keyring"
"${GPG_PACMAN[@]}" --import "${KEYRING_IMPORT_DIR}/${keyring}.gpg"
done
# Keyring with keys that were deprecated and will eventually be deleted
local DEPRECATED_KEYS="${PACMAN_SHARE_DIR}/deprecatedkeys.gpg"
# List of keys removed from the keyring. This file is not a keyring, unlike the others.
# It is a textual list of values that gpg recogniezes as identifiers for keys.
local REMOVED_KEYS="${PACMAN_SHARE_DIR}/removedkeys"
verify_keyring_input || exit 1
# Read the key ids to an array. The conversion from whatever is inside the file
# Read the trusted key IDs to an array. The conversion from whatever is inside the file
# to key ids is important, because key ids are the only guarantee of identification
# for the keys.
local -A removed_ids
if [[ -r "${REMOVED_KEYS}" ]]; then
while read key; do
local key_values name
key_values="$("${GPG_PACMAN[@]}" --quiet --with-colons --list-key "${key}" | grep ^pub | cut -d: -f5,10 --output-delimiter=' ')"
if [[ -n $key_values ]]; then
# The first word is the key_id
key_id="${key_values%% *}"
# the rest if the name of the owner
name="${key_values#* }"
local -A trusted_ids
for keyring in "${KEYRINGIDS[@]}"; do
if [[ -f "${KEYRING_IMPORT_DIR}/${keyring}-trusted" ]]; then
while read key; do
key_id="$("${GPG_PACMAN[@]}" --quiet --with-colons --list-key "${key}" 2>/dev/null | grep ^pub | cut -d: -f5)"
if [[ -n ${key_id} ]]; then
# Mark this key to be deleted
removed_ids[$key_id]="$name"
# Mark this key to be lsigned
trusted_ids[$key_id]="${keyring}"
fi
fi
done < "${REMOVED_KEYS}"
fi
done < "${KEYRING_IMPORT_DIR}/${keyring}-trusted"
fi
done
# List of keys that must be kept installed, even if in the list of keys to be removed
local HOLD_KEYS="$(get_from "$CONFIG" "HoldKeys")"
# Remove the keys that must be kept from the set of keys that should be removed
if [[ -n ${HOLD_KEYS} ]]; then
for key in ${HOLD_KEYS}; do
key_id="$("${GPG_PACMAN[@]}" --quiet --with-colons --list-key "${key}" | grep ^pub | cut -d: -f5)"
if [[ -n "${removed_ids[$key_id]}" ]]; then
unset removed_ids[$key_id]
fi
if (( ${#trusted_ids[@]} > 0 )); then
msg "$(gettext "Locally signing trusted keys in keyring...")"
for key_id in "${!trusted_ids[@]}"; do
msg2 "$(gettext "Locally signing key %s...")" "${key_id}"
"${GPG_PACMAN[@]}" --quiet --lsign-key "${key_id}"
done
fi
# Add keys from the current set of keys from pacman-keyring package. The web of trust will
# be updated automatically.
if [[ -r "${ADDED_KEYS}" ]]; then
msg "$(gettext "Appending official keys...")"
local add_keys="$("${GPG_NOKEYRING[@]}" --keyring "${ADDED_KEYS}" --with-colons --list-keys | grep ^pub | cut -d: -f5)"
for key_id in ${add_keys}; do
# There is no point in adding a key that will be deleted right after
if [[ -z "${removed_ids[$key_id]}" ]]; then
"${GPG_NOKEYRING[@]}" --keyring "${ADDED_KEYS}" --export "${key_id}" | "${GPG_PACMAN[@]}" --import
fi
# Read the revoked key IDs to an array.
local -A revoked_ids
for keyring in "${KEYRINGIDS[@]}"; do
if [[ -f "${KEYRING_IMPORT_DIR}/${keyring}-revoked" ]]; then
while read key; do
key_id="$("${GPG_PACMAN[@]}" --quiet --with-colons --list-key "${key}" 2>/dev/null | grep ^pub | cut -d: -f5)"
if [[ -n ${key_id} ]]; then
# Mark this key to be disabled
revoked_ids[$key_id]="${keyring}"
fi
done < "${KEYRING_IMPORT_DIR}/${keyring}-revoked"
fi
done
if (( ${#revoked_ids[@]} > 0 )); then
msg "$(gettext "Disabling revoked keys in keyring...")"
for key_id in "${!revoked_ids[@]}"; do
msg2 "$(gettext "Disabling key %s...")" "${key_id}"
printf 'disable\nquit\n' | LANG=C "${GPG_PACMAN[@]}" --command-fd 0 --quiet --batch --edit-key "${key_id}" 2>/dev/null
done
fi
if [[ -r "${DEPRECATED_KEYS}" ]]; then
msg "$(gettext "Appending deprecated keys...")"
local add_keys="$("${GPG_NOKEYRING[@]}" --keyring "${DEPRECATED_KEYS}" --with-colons --list-keys | grep ^pub | cut -d: -f5)"
for key_id in ${add_keys}; do
# There is no point in adding a key that will be deleted right after
if [[ -z "${removed_ids[$key_id]}" ]]; then
"${GPG_NOKEYRING[@]}" --keyring "${DEPRECATED_KEYS}" --export "${key_id}" | "${GPG_PACMAN[@]}" --import
fi
done
fi
# Remove the keys not marked to keep
if (( ${#removed_ids[@]} > 0 )); then
msg "$(gettext "Removing deleted keys from keyring...")"
for key_id in "${!removed_ids[@]}"; do
echo " removing key $key_id - ${removed_ids[$key_id]}"
"${GPG_PACMAN[@]}" --quiet --batch --yes --delete-key "${key_id}"
done
fi
# Update trustdb, just to be sure
msg "$(gettext "Updating trust database...")"
"${GPG_PACMAN[@]}" --batch --check-trustdb
}
receive_keys() {
if [[ -z ${KEYIDS[@]} ]]; then
error "$(gettext "You need to specify the keyserver and at least one key identifier")"
exit 1
fi
"${GPG_PACMAN[@]}" --keyserver "$KEYSERVER" --recv-keys "${KEYIDS[@]}"
}
edit_keys() {
local errors=0;
for key in ${KEYIDS[@]}; do
for key in "${KEYIDS[@]}"; do
# Verify if the key exists in pacman's keyring
if ! "${GPG_PACMAN[@]}" --list-keys "$key" &>/dev/null; then
error "$(gettext "The key identified by %s does not exist")" "$key"
@@ -279,7 +333,7 @@ edit_keys() {
done
(( errors )) && exit 1;
for key in ${KEYIDS[@]}; do
for key in "${KEYIDS[@]}"; do
"${GPG_PACMAN[@]}" --edit-key "$key"
done
}
@@ -321,8 +375,9 @@ fi
OPT_SHORT="a::d:e:f::hl::r:uv:V"
OPT_LONG="add::,config:,delete:,edit-key:,export::,finger::,gpgdir:"
OPT_LONG+=",help,import:,import-trustdb:,init,list-keys::,list-sigs::,,receive:"
OPT_LONG+=",reload,updatedb,verify:,version"
OPT_LONG+=",help,import:,import-trustdb:,init,keyserver:,list-keys::,list-sigs::"
OPT_LONG+=",lsign-key:,populate::,recv-keys:,refresh-keys::,updatedb"
OPT_LONG+=",verify:,version"
if ! OPT_TEMP="$(parse_options $OPT_SHORT $OPT_LONG "$@")"; then
echo; usage; exit 1 # E_INVALID_OPTION;
fi
@@ -336,20 +391,23 @@ fi
while true; do
case "$1" in
-a|--add) ADD=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYFILES=($1) ;;
-a|--add) ADD=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYFILES=($1); UPDATEDB=1 ;;
--config) shift; CONFIG=$1 ;;
-d|--delete) DELETE=1; shift; KEYIDS=($1) ;;
--edit-key) EDITKEY=1; shift; KEYIDS=($1) ;;
-d|--delete) DELETE=1; shift; KEYIDS=($1); UPDATEDB=1 ;;
--edit-key) EDITKEY=1; shift; KEYIDS=($1); UPDATEDB=1 ;;
-e|--export) EXPORT=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYIDS=($1) ;;
-f|--finger) FINGER=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYIDS=($1) ;;
--gpgdir) shift; PACMAN_KEYRING_DIR=$1 ;;
--import) IMPORT=1; shift; IMPORT_DIRS=($1) ;;
--import-trustdb) IMPORT_TRUSTDB=1; shift; IMPORT_DIRS=($1) ;;
--import) IMPORT=1; shift; IMPORT_DIRS=($1); UPDATEDB=1 ;;
--import-trustdb) IMPORT_TRUSTDB=1; shift; IMPORT_DIRS=($1); UPDATEDB=1 ;;
--init) INIT=1 ;;
--keyserver) shift; KEYSERVER=$1 ;;
-l|--list-keys) LISTKEYS=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYIDS=($1) ;;
--list-sigs) LISTSIGS=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYIDS=($1) ;;
-r|--receive) RECEIVE=1; shift; TMP=($1); KEYSERVER=${TMP[0]}; KEYIDS=(${TMP[@]:1}); unset TMP;;
--reload) RELOAD=1 ;;
--lsign-key) LSIGNKEY=1; shift; KEYIDS=($1); UPDATEDB=1 ;;
--populate) POPULATE=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYRINGIDS=($1); UPDATEDB=1 ;;
-r|--recv-keys) RECEIVE=1; shift; KEYIDS=($1); UPDATEDB=1 ;;
--refresh-keys) REFRESH=1; [[ -n $2 && ${2:0:1} != "-" ]] && shift && KEYIDS=($1) ;;
-u|--updatedb) UPDATEDB=1 ;;
-v|--verify) VERIFY=1; shift; SIGNATURE=$1 ;;
@@ -368,7 +426,7 @@ if ! type -p gpg >/dev/null; then
exit 1
fi
if (( (ADD || DELETE || EDITKEY || IMPORT || IMPORT_TRUSTDB || INIT || RECEIVE || RELOAD || UPDATEDB) && EUID != 0 )); then
if (( (ADD || DELETE || EDITKEY || IMPORT || IMPORT_TRUSTDB || INIT || LSIGNKEY || POPULATE || RECEIVE || REFRESH || UPDATEDB) && EUID != 0 )); then
error "$(gettext "%s needs to be run as root for this operation.")" "pacman-key"
exit 1
fi
@@ -384,15 +442,21 @@ fi
PACMAN_KEYRING_DIR=${PACMAN_KEYRING_DIR:-$(get_from "$CONFIG" "GPGDir" || echo "@sysconfdir@/pacman.d/gnupg")}
GPG_PACMAN=(gpg --homedir ${PACMAN_KEYRING_DIR} --no-permission-warning)
if [[ -n ${KEYSERVER} ]]; then
GPG_PACMAN+=(--keyserver ${KEYSERVER})
fi
# check only a single operation has been given
# don't include UPDATEDB in here as other opts can induce it
numopt=$(( ADD + DELETE + EDITKEY + EXPORT + FINGER + IMPORT + IMPORT_TRUSTDB +
INIT + LISTKEYS + LISTSIGS + RECEIVE + RELOAD + UPDATEDB + VERIFY ))
INIT + LISTKEYS + LISTSIGS + LSIGNKEY + POPULATE + RECEIVE + REFRESH + VERIFY ))
case $numopt in
0)
error "$(gettext "no operation specified (use -h for help)")"
exit 1
if (( ! UPDATEDB )); then
error "$(gettext "no operation specified (use -h for help)")"
exit 1
fi
;;
[!1])
error "$(gettext "Multiple operations specified")"
@@ -413,9 +477,17 @@ esac
(( INIT )) && initialize
(( LISTKEYS )) && "${GPG_PACMAN[@]}" --batch --list-keys "${KEYIDS[@]}"
(( LISTSIGS )) && "${GPG_PACMAN[@]}" --batch --list-sigs "${KEYIDS[@]}"
(( RECEIVE )) && receive_keys
(( RELOAD )) && reload_keyring
(( UPDATEDB )) && "${GPG_PACMAN[@]}" --batch --check-trustdb
if (( LSIGNKEY )); then
printf 'y\ny\n' | LANG=C "${GPG_PACMAN[@]}" --command-fd 0 --quiet --batch --lsign-key "${KEYIDS[@]}" 2>/dev/null
fi
(( POPULATE )) && populate_keyring
(( RECEIVE )) && "${GPG_PACMAN[@]}" --recv-keys "${KEYIDS[@]}"
(( REFRESH )) && "${GPG_PACMAN[@]}" --refresh-keys "${KEYIDS[@]}"
(( VERIFY )) && "${GPG_PACMAN[@]}" --verify $SIGNATURE
if (( UPDATEDB )); then
msg "$(gettext "Updating trust database...")"
"${GPG_PACMAN[@]}" --batch --check-trustdb
fi
# vim: set ts=2 sw=2 noet:

View File

@@ -124,7 +124,9 @@ create_xdelta()
}
case "$1" in
-q|--quiet) QUIET=1; shift ;;
-h|--help) usage; exit 0 ;;
-V|--version) version; exit 0 ;;
-q|--quiet) QUIET=1; shift ;;
esac
if (( $# != 2 )); then

View File

@@ -11,6 +11,7 @@ fr
hu
it
kk
lt
nb
pl
pt
@@ -24,3 +25,4 @@ sv
tr
uk
zh_CN
zh_TW

View File

@@ -2,12 +2,13 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:37+0000\n"
"POT-Creation-Date: 2011-09-22 11:33-0500\n"
"PO-Revision-Date: 2011-08-15 21:10+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Catalan (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/ca/)\n"
@@ -112,16 +113,16 @@ msgstr ""
msgid "SOURCE FILE NOT FOUND"
msgstr ""
msgid "Unknown public key"
msgid "unknown public key"
msgstr ""
msgid "Warning: the key has been revoked."
msgid "the key has been revoked."
msgstr ""
msgid "Warning: the signature has expired."
msgid "the signature has expired."
msgstr ""
msgid "Warning: the key has expired."
msgid "the key has expired."
msgstr ""
msgid "One or more PGP signatures could not be verified!"
@@ -405,6 +406,13 @@ msgstr ""
msgid " -s, --syncdeps Install missing dependencies with %s"
msgstr ""
#, fuzzy
msgid ""
" -S, --source Generate a source-only tarball without downloaded sources"
msgstr ""
" --source Genera un tarball només amb codi font sense el codi font "
"baixat"
msgid ""
" --allsource Generate a source-only tarball including downloaded "
"sources"
@@ -455,12 +463,6 @@ msgstr ""
msgid " --skippgpcheck Do not verify source files with PGP signatures"
msgstr ""
msgid ""
" --source Generate a source-only tarball without downloaded sources"
msgstr ""
" --source Genera un tarball només amb codi font sense el codi font "
"baixat"
msgid "These options can be passed to %s:"
msgstr ""
@@ -642,26 +644,26 @@ msgstr "Fet."
msgid "Manage pacman's list of trusted keys"
msgstr ""
msgid " -a, --add [<file(s)>] Add the specified keys (empty for stdin)"
msgid " -a, --add [file(s)] Add the specified keys (empty for stdin)"
msgstr ""
msgid " -d, --delete <keyid(s)> Remove the specified keyids"
msgstr ""
msgid " -e, --export [<keyid(s)>] Export the specified or all keyids"
msgid " -e, --export [keyid(s)] Export the specified or all keyids"
msgstr ""
msgid ""
" -f, --finger [<keyid(s)>] List fingerprint for specified or all keyids"
" -f, --finger [keyid(s)] List fingerprint for specified or all keyids"
msgstr ""
msgid " -h, --help Show this help message and exit"
msgstr ""
msgid " -l, --list-keys [<keyid(s)>] List the specified or all keys"
msgid " -l, --list-keys [keyid(s)] List the specified or all keys"
msgstr ""
msgid " -r, --receive <keyserver> <keyid(s)> Fetch the specified keyids"
msgid " -r, --recv-keys <keyid(s)> Fetch the specified keyids"
msgstr ""
msgid " -u, --updatedb Update the trustdb of pacman"
@@ -673,12 +675,10 @@ msgstr ""
msgid " -V, --version Show program version"
msgstr ""
#, fuzzy
msgid ""
" --config <file> Use an alternate config file (instead of"
"\\n '%s')"
msgstr ""
" --config <file> Usa un fitxer de configuració alternatiu (enlloc de «%s»)"
msgid ""
" --edit-key <keyid(s)> Present a menu for key management task on keyids"
@@ -701,10 +701,22 @@ msgstr ""
msgid " --init Ensure the keyring is properly initialized"
msgstr ""
msgid " --list-sigs [<keyid(s)>] List keys and their signatures"
msgid " --keyserver Specify a keyserver to use if necessary"
msgstr ""
msgid " --reload Reload the default keys"
msgid " --list-sigs [keyid(s)] List keys and their signatures"
msgstr ""
msgid " --lsign-key <keyid> Locally sign the specified keyid"
msgstr ""
msgid ""
" --populate [keyring(s)] Reload the default keys from the (given) keyrings"
"\\n in '%s'"
msgstr ""
msgid ""
" --refresh-keys [keyid(s)] Update specified or all keys from a keyserver"
msgstr ""
msgid "You do not have sufficient permissions to read the %s keyring..."
@@ -716,32 +728,47 @@ msgstr ""
msgid "You do not have sufficient permissions to run this command..."
msgstr ""
msgid "Verifying official keys file signature..."
msgid "There is no secret key available to sign with."
msgstr ""
msgid "Use '%s' to generate a default secret key."
msgstr ""
#, fuzzy
msgid "Verifying %s..."
msgstr "S'està afegint %s..."
msgid "File %s is unsigned, cannot continue."
msgstr ""
msgid "The signature of file %s is not valid."
msgstr ""
msgid "Verifying deprecated keys file signature..."
msgid "Verifying keyring file signatures..."
msgstr ""
msgid "Verifying deleted keys file signature..."
msgid "No keyring files exist in %s."
msgstr ""
msgid "Appending official keys..."
#, fuzzy
msgid "The keyring file %s does not exist."
msgstr "el fitxer %s (%s) no existeix."
msgid "Appending keys from %s.gpg..."
msgstr ""
msgid "Appending deprecated keys..."
msgid "Locally signing trusted keys in keyring..."
msgstr ""
msgid "Removing deleted keys from keyring..."
msgid "Locally signing key %s..."
msgstr ""
msgid "Updating trust database..."
msgid "Disabling revoked keys in keyring..."
msgstr ""
msgid "You need to specify the keyserver and at least one key identifier"
msgstr ""
#, fuzzy
msgid "Disabling key %s..."
msgstr "Creant Tar de %s..."
msgid "The key identified by %s does not exist"
msgstr ""
@@ -752,9 +779,8 @@ msgstr ""
msgid "%s needs to be run as root for this operation."
msgstr ""
#, fuzzy
msgid "%s configuration file '%s' not found."
msgstr "No s'ha trobat el fitxer de repositori «%s»."
msgstr ""
msgid "no operation specified (use -h for help)"
msgstr ""
@@ -765,6 +791,9 @@ msgstr ""
msgid "Please run %s with each operation separately\\n"
msgstr ""
msgid "Updating trust database..."
msgstr ""
msgid ""
"pacman-optimize is a little hack that should improve the performance\\nof "
"pacman when reading/writing to its filesystem-based database.\\n\\n"
@@ -950,9 +979,8 @@ msgstr "Afegint entrada 'deltas':%s -> %s"
msgid "Removing existing entry '%s'..."
msgstr "S'està eliminant l'entrada existent «%s»..."
#, fuzzy
msgid "Cannot find the gpg binary! Is GnuPG installed?"
msgstr "No es pot trobar el binari xdelta3! Està instal·lat xdelta3?"
msgstr ""
msgid "Signing database..."
msgstr ""
@@ -975,11 +1003,14 @@ msgstr ""
msgid "'%s' does not have a valid archive extension."
msgstr "«%s» no té una extensió d'arxiu vàlida."
msgid "An entry for '%s' already existed"
msgstr "Ja existeix una entrada per «%s»"
msgid "Computing checksums..."
msgstr ""
msgid "An entry for '%s' already existed"
msgstr "Ja existeix una entrada per «%s»"
msgid "Adding package signature..."
msgstr ""
msgid "Creating '%s' db entry..."
msgstr "Creant entrada base de dades '%s'..."
@@ -1051,6 +1082,3 @@ msgstr ""
msgid "unrecognized option"
msgstr ""
#~ msgid "permanent, catastrophic damage to your system. If you"
#~ msgstr "danys catastròfics permanents en el vostre sistema. Si"

View File

@@ -2,12 +2,13 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:37+0000\n"
"POT-Creation-Date: 2011-09-22 11:33-0500\n"
"PO-Revision-Date: 2011-08-15 21:10+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/cs/)\n"
@@ -111,16 +112,16 @@ msgstr ""
msgid "SOURCE FILE NOT FOUND"
msgstr ""
msgid "Unknown public key"
msgid "unknown public key"
msgstr ""
msgid "Warning: the key has been revoked."
msgid "the key has been revoked."
msgstr ""
msgid "Warning: the signature has expired."
msgid "the signature has expired."
msgstr ""
msgid "Warning: the key has expired."
msgid "the key has expired."
msgstr ""
msgid "One or more PGP signatures could not be verified!"
@@ -396,6 +397,11 @@ msgstr " -R, --repackage Znovu zabalit obsah balícku bez sestavení"
msgid " -s, --syncdeps Install missing dependencies with %s"
msgstr ""
#, fuzzy
msgid ""
" -S, --source Generate a source-only tarball without downloaded sources"
msgstr " --source Vytvořit zdrojový archiv, bez stahovaných souborů"
msgid ""
" --allsource Generate a source-only tarball including downloaded "
"sources"
@@ -444,10 +450,6 @@ msgstr ""
msgid " --skippgpcheck Do not verify source files with PGP signatures"
msgstr ""
msgid ""
" --source Generate a source-only tarball without downloaded sources"
msgstr " --source Vytvořit zdrojový archiv, bez stahovaných souborů"
msgid "These options can be passed to %s:"
msgstr ""
@@ -625,26 +627,26 @@ msgstr "Hotovo."
msgid "Manage pacman's list of trusted keys"
msgstr ""
msgid " -a, --add [<file(s)>] Add the specified keys (empty for stdin)"
msgid " -a, --add [file(s)] Add the specified keys (empty for stdin)"
msgstr ""
msgid " -d, --delete <keyid(s)> Remove the specified keyids"
msgstr ""
msgid " -e, --export [<keyid(s)>] Export the specified or all keyids"
msgid " -e, --export [keyid(s)] Export the specified or all keyids"
msgstr ""
msgid ""
" -f, --finger [<keyid(s)>] List fingerprint for specified or all keyids"
" -f, --finger [keyid(s)] List fingerprint for specified or all keyids"
msgstr ""
msgid " -h, --help Show this help message and exit"
msgstr ""
msgid " -l, --list-keys [<keyid(s)>] List the specified or all keys"
msgid " -l, --list-keys [keyid(s)] List the specified or all keys"
msgstr ""
msgid " -r, --receive <keyserver> <keyid(s)> Fetch the specified keyids"
msgid " -r, --recv-keys <keyid(s)> Fetch the specified keyids"
msgstr ""
msgid " -u, --updatedb Update the trustdb of pacman"
@@ -656,12 +658,10 @@ msgstr ""
msgid " -V, --version Show program version"
msgstr ""
#, fuzzy
msgid ""
" --config <file> Use an alternate config file (instead of"
"\\n '%s')"
msgstr ""
" --config <file> Použít alternativní konfigurační soubor (namísto '%s')"
msgid ""
" --edit-key <keyid(s)> Present a menu for key management task on keyids"
@@ -684,10 +684,22 @@ msgstr ""
msgid " --init Ensure the keyring is properly initialized"
msgstr ""
msgid " --list-sigs [<keyid(s)>] List keys and their signatures"
msgid " --keyserver Specify a keyserver to use if necessary"
msgstr ""
msgid " --reload Reload the default keys"
msgid " --list-sigs [keyid(s)] List keys and their signatures"
msgstr ""
msgid " --lsign-key <keyid> Locally sign the specified keyid"
msgstr ""
msgid ""
" --populate [keyring(s)] Reload the default keys from the (given) keyrings"
"\\n in '%s'"
msgstr ""
msgid ""
" --refresh-keys [keyid(s)] Update specified or all keys from a keyserver"
msgstr ""
msgid "You do not have sufficient permissions to read the %s keyring..."
@@ -699,32 +711,47 @@ msgstr ""
msgid "You do not have sufficient permissions to run this command..."
msgstr ""
msgid "Verifying official keys file signature..."
msgid "There is no secret key available to sign with."
msgstr ""
msgid "Use '%s' to generate a default secret key."
msgstr ""
#, fuzzy
msgid "Verifying %s..."
msgstr "Přidává se %s..."
msgid "File %s is unsigned, cannot continue."
msgstr ""
msgid "The signature of file %s is not valid."
msgstr ""
msgid "Verifying deprecated keys file signature..."
msgid "Verifying keyring file signatures..."
msgstr ""
msgid "Verifying deleted keys file signature..."
msgid "No keyring files exist in %s."
msgstr ""
msgid "Appending official keys..."
#, fuzzy
msgid "The keyring file %s does not exist."
msgstr "Instalační skript %s (%s) neexistuje."
msgid "Appending keys from %s.gpg..."
msgstr ""
msgid "Appending deprecated keys..."
msgid "Locally signing trusted keys in keyring..."
msgstr ""
msgid "Removing deleted keys from keyring..."
msgid "Locally signing key %s..."
msgstr ""
msgid "Updating trust database..."
msgid "Disabling revoked keys in keyring..."
msgstr ""
msgid "You need to specify the keyserver and at least one key identifier"
msgstr ""
#, fuzzy
msgid "Disabling key %s..."
msgstr "Balí se %s pomocí tar..."
msgid "The key identified by %s does not exist"
msgstr ""
@@ -735,9 +762,8 @@ msgstr ""
msgid "%s needs to be run as root for this operation."
msgstr ""
#, fuzzy
msgid "%s configuration file '%s' not found."
msgstr "Repozitář \"%s\" nebyl nalezen."
msgstr ""
msgid "no operation specified (use -h for help)"
msgstr ""
@@ -748,6 +774,9 @@ msgstr ""
msgid "Please run %s with each operation separately\\n"
msgstr ""
msgid "Updating trust database..."
msgstr ""
msgid ""
"pacman-optimize is a little hack that should improve the performance\\nof "
"pacman when reading/writing to its filesystem-based database.\\n\\n"
@@ -927,9 +956,8 @@ msgstr "Přidávají se záznamy o delta rozdílech: %s -> %s"
msgid "Removing existing entry '%s'..."
msgstr "Odstraňuje se existující záznam '%s'..."
#, fuzzy
msgid "Cannot find the gpg binary! Is GnuPG installed?"
msgstr "Nelze nalézt příkaz xdelta3! Je xdelta3 nainstalován?"
msgstr ""
msgid "Signing database..."
msgstr ""
@@ -952,11 +980,14 @@ msgstr ""
msgid "'%s' does not have a valid archive extension."
msgstr "'%s' nemá platnou příponu archivu."
msgid "An entry for '%s' already existed"
msgstr "Záznam pro '%s' již existuje"
msgid "Computing checksums..."
msgstr ""
msgid "An entry for '%s' already existed"
msgstr "Záznam pro '%s' již existuje"
msgid "Adding package signature..."
msgstr ""
msgid "Creating '%s' db entry..."
msgstr "Vytváření záznamu databáze '%s'..."
@@ -1026,6 +1057,3 @@ msgstr ""
msgid "unrecognized option"
msgstr ""
#~ msgid "permanent, catastrophic damage to your system. If you"
#~ msgstr "trvalé a katastrofální poškození vašeho systému. Pokud"

View File

@@ -2,12 +2,13 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:39+0000\n"
"POT-Creation-Date: 2011-09-22 11:33-0500\n"
"PO-Revision-Date: 2011-08-15 21:10+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: Danish (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/da/)\n"
@@ -111,16 +112,16 @@ msgstr ""
msgid "SOURCE FILE NOT FOUND"
msgstr ""
msgid "Unknown public key"
msgid "unknown public key"
msgstr ""
msgid "Warning: the key has been revoked."
msgid "the key has been revoked."
msgstr ""
msgid "Warning: the signature has expired."
msgid "the signature has expired."
msgstr ""
msgid "Warning: the key has expired."
msgid "the key has expired."
msgstr ""
msgid "One or more PGP signatures could not be verified!"
@@ -399,6 +400,11 @@ msgstr " -R, --repackage Pak indholdet af pakken om uden at kompilere igen"
msgid " -s, --syncdeps Install missing dependencies with %s"
msgstr ""
#, fuzzy
msgid ""
" -S, --source Generate a source-only tarball without downloaded sources"
msgstr " --source Opret en tarball kun for kilde uden hentede kilder"
msgid ""
" --allsource Generate a source-only tarball including downloaded "
"sources"
@@ -445,10 +451,6 @@ msgstr ""
msgid " --skippgpcheck Do not verify source files with PGP signatures"
msgstr ""
msgid ""
" --source Generate a source-only tarball without downloaded sources"
msgstr " --source Opret en tarball kun for kilde uden hentede kilder"
msgid "These options can be passed to %s:"
msgstr ""
@@ -624,26 +626,26 @@ msgstr ""
msgid "Manage pacman's list of trusted keys"
msgstr ""
msgid " -a, --add [<file(s)>] Add the specified keys (empty for stdin)"
msgid " -a, --add [file(s)] Add the specified keys (empty for stdin)"
msgstr ""
msgid " -d, --delete <keyid(s)> Remove the specified keyids"
msgstr ""
msgid " -e, --export [<keyid(s)>] Export the specified or all keyids"
msgid " -e, --export [keyid(s)] Export the specified or all keyids"
msgstr ""
msgid ""
" -f, --finger [<keyid(s)>] List fingerprint for specified or all keyids"
" -f, --finger [keyid(s)] List fingerprint for specified or all keyids"
msgstr ""
msgid " -h, --help Show this help message and exit"
msgstr ""
msgid " -l, --list-keys [<keyid(s)>] List the specified or all keys"
msgid " -l, --list-keys [keyid(s)] List the specified or all keys"
msgstr ""
msgid " -r, --receive <keyserver> <keyid(s)> Fetch the specified keyids"
msgid " -r, --recv-keys <keyid(s)> Fetch the specified keyids"
msgstr ""
msgid " -u, --updatedb Update the trustdb of pacman"
@@ -655,12 +657,10 @@ msgstr ""
msgid " -V, --version Show program version"
msgstr ""
#, fuzzy
msgid ""
" --config <file> Use an alternate config file (instead of"
"\\n '%s')"
msgstr ""
" --config <fil> Brug en alternativ konfigurationsfil (i steden for »%s«)"
msgid ""
" --edit-key <keyid(s)> Present a menu for key management task on keyids"
@@ -683,10 +683,22 @@ msgstr ""
msgid " --init Ensure the keyring is properly initialized"
msgstr ""
msgid " --list-sigs [<keyid(s)>] List keys and their signatures"
msgid " --keyserver Specify a keyserver to use if necessary"
msgstr ""
msgid " --reload Reload the default keys"
msgid " --list-sigs [keyid(s)] List keys and their signatures"
msgstr ""
msgid " --lsign-key <keyid> Locally sign the specified keyid"
msgstr ""
msgid ""
" --populate [keyring(s)] Reload the default keys from the (given) keyrings"
"\\n in '%s'"
msgstr ""
msgid ""
" --refresh-keys [keyid(s)] Update specified or all keys from a keyserver"
msgstr ""
msgid "You do not have sufficient permissions to read the %s keyring..."
@@ -698,32 +710,47 @@ msgstr ""
msgid "You do not have sufficient permissions to run this command..."
msgstr ""
msgid "Verifying official keys file signature..."
msgid "There is no secret key available to sign with."
msgstr ""
msgid "Use '%s' to generate a default secret key."
msgstr ""
#, fuzzy
msgid "Verifying %s..."
msgstr "Tilføjer %s..."
msgid "File %s is unsigned, cannot continue."
msgstr ""
msgid "The signature of file %s is not valid."
msgstr ""
msgid "Verifying deprecated keys file signature..."
msgid "Verifying keyring file signatures..."
msgstr ""
msgid "Verifying deleted keys file signature..."
msgid "No keyring files exist in %s."
msgstr ""
msgid "Appending official keys..."
#, fuzzy
msgid "The keyring file %s does not exist."
msgstr "%s fil (%s) findes ikke."
msgid "Appending keys from %s.gpg..."
msgstr ""
msgid "Appending deprecated keys..."
msgid "Locally signing trusted keys in keyring..."
msgstr ""
msgid "Removing deleted keys from keyring..."
msgid "Locally signing key %s..."
msgstr ""
msgid "Updating trust database..."
msgid "Disabling revoked keys in keyring..."
msgstr ""
msgid "You need to specify the keyserver and at least one key identifier"
msgstr ""
#, fuzzy
msgid "Disabling key %s..."
msgstr "Udpakker %s med Tar..."
msgid "The key identified by %s does not exist"
msgstr ""
@@ -734,9 +761,8 @@ msgstr ""
msgid "%s needs to be run as root for this operation."
msgstr ""
#, fuzzy
msgid "%s configuration file '%s' not found."
msgstr "Arkivfil »%s« blev ikke fundet."
msgstr ""
msgid "no operation specified (use -h for help)"
msgstr ""
@@ -747,6 +773,9 @@ msgstr ""
msgid "Please run %s with each operation separately\\n"
msgstr ""
msgid "Updating trust database..."
msgstr ""
msgid ""
"pacman-optimize is a little hack that should improve the performance\\nof "
"pacman when reading/writing to its filesystem-based database.\\n\\n"
@@ -922,9 +951,8 @@ msgstr ""
msgid "Removing existing entry '%s'..."
msgstr "Fjerner eksisterende punkt »%s«..."
#, fuzzy
msgid "Cannot find the gpg binary! Is GnuPG installed?"
msgstr "Kan ikke finde den binære fil xdelta3! Er xdelta3 installeret?"
msgstr ""
msgid "Signing database..."
msgstr ""
@@ -947,11 +975,14 @@ msgstr ""
msgid "'%s' does not have a valid archive extension."
msgstr "»%s« har ikke en gyldig arkivfilendelse."
msgid "An entry for '%s' already existed"
msgstr "Et punkt for »%s« findes allerede"
msgid "Computing checksums..."
msgstr ""
msgid "An entry for '%s' already existed"
msgstr "Et punkt for »%s« findes allerede"
msgid "Adding package signature..."
msgstr ""
msgid "Creating '%s' db entry..."
msgstr ""
@@ -1021,6 +1052,3 @@ msgstr ""
msgid "unrecognized option"
msgstr ""
#~ msgid "permanent, catastrophic damage to your system. If you"
#~ msgstr "permanent, katastrofal skade på dit system. Hvis"

View File

@@ -2,13 +2,15 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# Simon Schneider <SPAM.schneida@gmail.com>, 2011.
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:37+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"POT-Creation-Date: 2011-09-22 11:33-0500\n"
"PO-Revision-Date: 2011-08-26 13:24+0000\n"
"Last-Translator: jakob <jakob.matthes@gmail.com>\n"
"Language-Team: German (http://www.transifex.net/projects/p/archlinux-pacman/"
"team/de/)\n"
"Language: de\n"
@@ -27,7 +29,7 @@ msgid "Cleaning up..."
msgstr "Räume auf... "
msgid "Entering %s environment..."
msgstr ""
msgstr "Betrete %s Umgebung..."
msgid "Unable to find source file %s."
msgstr "Konnte die Quell-Datei %s nicht finden."
@@ -77,6 +79,8 @@ msgstr "Erstelle Prüfsummen für Quell-Dateien..."
msgid "Cannot find the %s binary required for generating sourcefile checksums."
msgstr ""
"Kann %s Programmdatei nicht finden, wird aber zur Erstellung der Prüfsummen "
"der Quell-Dateien benötigt."
msgid "Invalid integrity algorithm '%s' specified."
msgstr "Ungültiger Integritäts-Algorithmus '%s' spezifiziert."
@@ -105,43 +109,47 @@ msgid "Integrity checks are missing."
msgstr "Integritäts-Prüfungen fehlen."
msgid "Verifying source file signatures with %s..."
msgstr ""
msgstr "Überprüfe Signaturen der Quell-Dateien mit %s..."
msgid "SIGNATURE NOT FOUND"
msgstr ""
msgstr "SIGNATUR NICHT GEFUNDEN"
msgid "SOURCE FILE NOT FOUND"
msgstr ""
msgstr "QUELL-DATEI NICHT GEFUNDEN"
msgid "Unknown public key"
msgstr ""
#, fuzzy
msgid "unknown public key"
msgstr "Unbekannter öffentlicher Schlüssel"
msgid "Warning: the key has been revoked."
msgstr ""
#, fuzzy
msgid "the key has been revoked."
msgstr "Warnung: Der Schlüssel wurde widerrufen."
msgid "Warning: the signature has expired."
msgstr ""
#, fuzzy
msgid "the signature has expired."
msgstr "Warnung: Die Signatur ist abgelaufen."
msgid "Warning: the key has expired."
msgstr ""
#, fuzzy
msgid "the key has expired."
msgstr "Warnung: Der Schlüssel ist abgelaufen."
msgid "One or more PGP signatures could not be verified!"
msgstr ""
msgstr "Eine oder mehrere PGP-Signaturen konnten nicht überprüft werden."
msgid "Warnings have occurred while verifying the signatures."
msgstr ""
msgstr "Beim Überprüfen der Signaturen sind Warnungen aufgetreten."
msgid "Please make sure you really trust them."
msgstr ""
msgstr "Bitte stellen Sie sicher, dass Sie ihnen wirklich vertrauen."
msgid "Skipping all source file integrity checks."
msgstr ""
msgstr "Überspringe Integritäts-Prüfungen der Quell-Dateien."
msgid "Skipping verification of source file checksums."
msgstr ""
msgstr "Überspringe Überprüfung der Prüfsummen der Quell-Dateien."
msgid "Skipping verification of source file PGP signatures."
msgstr ""
msgstr "Überspringe Überprüfung der PGP Signaturen der Quell-Dateien."
msgid "Extracting Sources..."
msgstr "Entpacke Quellen..."
@@ -165,7 +173,7 @@ msgid "Removing doc files..."
msgstr "Entferne doc-Dateien... "
msgid "Purging unwanted files..."
msgstr ""
msgstr "Bereinige andere Dateien..."
msgid "Compressing man and info pages..."
msgstr "Komprimiere Man-Pages und Info-Seiten..."
@@ -174,37 +182,37 @@ msgid "Stripping unneeded symbols from binaries and libraries..."
msgstr "Entferne unnötige Symbole aus Binär-Dateien und Bibliotheken..."
msgid "Removing %s files..."
msgstr ""
msgstr "Entferne %s Dateien..."
msgid "Removing empty directories..."
msgstr "Entferne leere Verzeichnisse... "
msgid "Compressing binaries with %s..."
msgstr ""
msgstr "Komprimiere Binärdateien mit %s..."
msgid "Could not compress binary : %s"
msgstr ""
msgstr "Konnte Binärdatei nicht komprimieren: %s"
msgid "Generating %s file..."
msgstr ""
msgstr "Erstelle %s Datei..."
msgid "Cannot find library listed in %s: %s"
msgstr ""
msgstr "Konnte Bibliothek aus %s nicht finden: %s"
msgid "Please add a license line to your %s!"
msgstr "Bitte fügen Sie eine Lizenz-Zeile zu Ihrer %s hinzu!"
msgid "Example for GPL'ed software: %s."
msgstr ""
msgstr "Beispiel für GPL-lizenzierte Software: %s."
msgid "%s entry file not in package : %s"
msgstr ""
msgstr "Eingetragene %s Datei nicht im Paket : %s"
msgid "Package contains reference to %s"
msgstr "Paket enthält einen Verweis auf %s"
msgid "Missing %s directory."
msgstr ""
msgstr "Fehlendes %s Verzeichnis."
msgid "Creating package..."
msgstr "Erstelle Paket ... "
@@ -225,13 +233,13 @@ msgid "Failed to create symlink to package file."
msgstr "Konnte konnte keinen Symlink auf die Paket-Datei erstellen."
msgid "Signing package..."
msgstr ""
msgstr "Signiere Paket..."
msgid "Created signature file %s."
msgstr ""
msgstr "Signaturdatei %s erstellt."
msgid "Failed to sign package file."
msgstr ""
msgstr "Konnte Paketdatei nicht signieren."
msgid "Creating source package..."
msgstr "Erstelle Quell-Paket..."
@@ -252,10 +260,10 @@ msgid "Failed to create symlink to source package file."
msgstr "Erstellung des Symlinks zur Quell-Paket-Datei fehlgeschlagen."
msgid "Installing package %s with %s..."
msgstr ""
msgstr "Installiere Paket %s mit %s..."
msgid "Installing %s package group with %s..."
msgstr ""
msgstr "Installiere Paketgruppe %s mit %s..."
msgid "Failed to install built package(s)."
msgstr "Konnte die erstellten Pakete nicht installieren."
@@ -267,10 +275,10 @@ msgid "%s is not allowed to start with a hyphen."
msgstr "%s darf nicht mit einem Bindestrich beginnen."
msgid "%s is not allowed to contain colons, hyphens or whitespace."
msgstr ""
msgstr "%s darf keine Doppelpunkte, Bindestriche oder Leerzeichen enthalten."
msgid "%s is not allowed to contain hyphens or whitespace."
msgstr ""
msgstr "%s darf keine Bindestriche oder Leerzeichen enthalten."
msgid "%s must be an integer."
msgstr "%s muß eine ganze Zahl sein."
@@ -284,28 +292,28 @@ msgstr ""
"muss."
msgid "such as %s."
msgstr ""
msgstr "wie %s."
msgid "%s array cannot contain comparison (< or >) operators."
msgstr ""
msgstr "Array %s kann keine Vergleichsoperatoren (< oder >) enthalten."
msgid "%s entry should not contain leading slash : %s"
msgstr ""
msgstr "Eintrag %s sollte keinen führenden Bindestrich enthalten : %s"
msgid "Invalid syntax for %s : '%s'"
msgstr ""
msgstr "Ungültige Syntax für %s : '%s'"
msgid "%s file (%s) does not exist."
msgstr "Datei %s (%s) existiert nicht."
msgid "%s array contains unknown option '%s'"
msgstr ""
msgstr "Array %s enthält eine unbekannte Option '%s'"
msgid "Missing %s function for split package '%s'"
msgstr ""
msgstr "Fehlende Funktion %s für gesplittetes Paket '%s'"
msgid "Requested package %s is not provided in %s"
msgstr ""
msgstr "Angefordertes Paket %s wird nicht von %s bereitgestellt"
msgid "Sudo can not be found. Will use su to acquire root privileges."
msgstr ""
@@ -314,33 +322,50 @@ msgstr ""
msgid "Cannot find the %s binary required for building as non-root user."
msgstr ""
"Kann Programm %s nicht finden, das benötigt wird, um als nicht-root Benutzer "
"Pakete zu Bauen."
msgid "Cannot find the %s binary required for signing packages."
msgstr ""
"Kann Programm %s nicht finden, das zum Signieren von Paketen benötigt wird."
msgid "Cannot find the %s binary required for verifying source files."
msgstr ""
"Kann Programm %s nicht finden, das zum Überprüfen von Quelldateien benötigt "
"wird."
msgid "Cannot find the %s binary required for validating sourcefile checksums."
msgstr ""
"Kann Programm %s nicht finden, das zum Prüfen der Prüfsummen der "
"Quelldateien benötigt wird."
msgid "Cannot find the %s binary required for compressing binaries."
msgstr ""
"Kann Programm %s nicht finden, das zum Komprimieren der Binärdateien "
"benötigt wird."
msgid "Cannot find the %s binary required for distributed compilation."
msgstr ""
"Kann Programm %s nicht finden, das zur verteilten Kompilierung benötigt wird."
msgid "Cannot find the %s binary required for compiler cache usage."
msgstr ""
"Kann Programm %s nicht finden, das für den Kompilationscache benötigt wird."
msgid "Cannot find the %s binary required for object file stripping."
msgstr ""
"Kann Programm %s nicht finden, das zum Bereinigen der Objektdateien benötigt "
"wird."
msgid "Cannot find the %s binary required for compressing man and info pages."
msgstr ""
"Kann Programm %s nicht finden, das zur Komprimierung der Manpages und der "
"Info-Seiten benötigt wird."
msgid "Cannot find the %s binary required to determine latest %s revision."
msgstr ""
"Kann Programm %s nicht finden, das zum Feststellen der letzten %s Revision "
"benötigt wird."
msgid "Determining latest %s revision..."
msgstr "Bestimme letzte %s Revision ..."
@@ -355,7 +380,7 @@ msgid "Options:"
msgstr "Optionen:"
msgid " -A, --ignorearch Ignore incomplete %s field in %s"
msgstr ""
msgstr " -A, --ignorearch Ignoriere unvollständiges Feld %s in %s"
msgid " -c, --clean Clean up work files after build"
msgstr " -c, --clean Säubere Arbeitsverzeichnisse nach dem Build"
@@ -365,6 +390,8 @@ msgstr " -d, --nodeps Überspringt alle Abhängigkeitsprüfungen"
msgid " -e, --noextract Do not extract source files (use existing %s dir)"
msgstr ""
" -e, --noextract Entpacke keine Quelldateien (benutze bestehendes %s "
"Verzeichnis)"
msgid " -f, --force Overwrite existing package"
msgstr " -f, --force Existierendes Paket überschreiben"
@@ -373,7 +400,7 @@ msgid " -g, --geninteg Generate integrity checks for source files"
msgstr " -g, --geninteg Erstelle Integritäts-Prüfung für Quell-Dateien"
msgid " -h, --help Show this help message and exit"
msgstr ""
msgstr " -h, --help Zeige diese Hilfe und beende"
msgid " -i, --install Install package after successful build"
msgstr " -i, --install Installiere Paket nach erfolgreichem Build"
@@ -402,7 +429,14 @@ msgstr ""
" -R, --repackage Packe den Inhalt des Paketes neu, ohne etwas zu bauen"
msgid " -s, --syncdeps Install missing dependencies with %s"
msgstr " -s, --syncdeps Installiere fehlende Abhängigkeiten mit %s"
#, fuzzy
msgid ""
" -S, --source Generate a source-only tarball without downloaded sources"
msgstr ""
" --source Erstellt einen Quell-Tarball ohne die heruntergeladenen "
"Quellen"
msgid ""
" --allsource Generate a source-only tarball including downloaded "
@@ -412,10 +446,10 @@ msgstr ""
"einschließlich der heruntergeladenen Quellen"
msgid " --asroot Allow %s to run as root user"
msgstr ""
msgstr " --asroot Erlaube %s, als Root-Benutzer zu laufen"
msgid " --check Run the %s function in the %s"
msgstr ""
msgstr " --check Führe die Funktion %s in %s aus"
msgid " --config <file> Use an alternate config file (instead of '%s')"
msgstr ""
@@ -431,12 +465,14 @@ msgstr ""
msgid ""
" --key <key> Specify a key to use for %s signing instead of the default"
msgstr ""
" --key <key> Lege einen Schlüssel für das Signieren von %s fest, "
"anstatt den Standardschlüssel zu verwenden"
msgid " --nocheck Do not run the %s function in the %s"
msgstr ""
msgstr " --nocheck Führe nicht die Funktion %s in %s aus"
msgid " --nosign Do not create a signature for the package"
msgstr ""
msgstr " --nosign Erzeuge keine Signatur für das Paket"
msgid " --pkg <list> Only build listed packages from a split package"
msgstr ""
@@ -444,26 +480,22 @@ msgstr ""
"bauen"
msgid " --sign Sign the resulting package with %s"
msgstr ""
msgstr " --sign Signiere das erzeugte Paket mit %s"
msgid " --skipchecksums Do not verify checksums of the source files"
msgstr ""
msgstr " --skipchecksums Verifiziere nicht die Prüfsummen der Quelldateien"
msgid ""
" --skipinteg Do not perform any verification checks on source files"
msgstr ""
msgstr " --skipinteg Führe keinerlei Überprüfungen der Quell-Dateien aus"
msgid " --skippgpcheck Do not verify source files with PGP signatures"
msgstr ""
msgid ""
" --source Generate a source-only tarball without downloaded sources"
msgstr ""
" --source Erstellt einen Quell-Tarball ohne die heruntergeladenen "
"Quellen"
" --skippgpcheck Überprüfe nicht die Quell-Dateien an Hand der PGP-"
"Signaturen"
msgid "These options can be passed to %s:"
msgstr ""
msgstr "Diese Optionen können an %s übergeben werden:"
msgid ""
" --noconfirm Do not ask for confirmation when resolving dependencies"
@@ -477,7 +509,7 @@ msgstr ""
"heruntergeladen werden"
msgid "If %s is not specified, %s will look for '%s'"
msgstr ""
msgstr "Falls %s nicht angegeben, wird %s nach '%s' suchen"
msgid ""
"Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>."
@@ -494,7 +526,7 @@ msgid "%s not found."
msgstr "%s nicht gefunden."
msgid "You do not have write permission to create packages in %s."
msgstr ""
msgstr "Sie haben keine Schreib-Berechtigung, um Pakete in %s zu erstellen."
msgid "You do not have write permission to store packages in %s."
msgstr "Sie haben keine Schreib-Berechtigung, um Pakete in %s zu lagern."
@@ -503,45 +535,55 @@ msgid "You do not have write permission to store downloads in %s."
msgstr "Sie haben keine Schreib-Berechtigung, um Downloads in %s zu lagern."
msgid "\\0%s and %s cannot both be specified"
msgstr ""
msgstr "\\0%s und %s können nicht beide festgelegt sein."
msgid ""
"Running %s as root is a BAD idea and can cause permanent,\\ncatastrophic "
"damage to your system. If you wish to run as root, please\\nuse the %s "
"option."
msgstr ""
"%s als root laufen zu lassen, ist eine SCHLECHTE Idee und kann dauerhaften "
"Schaden auf Ihrem System anrichten. Möchten Sie dies als root tun, benutzen "
"Sie bitte die Option %s."
msgid ""
"The %s option is meant for the root user only. Please\\nrerun %s without the "
"%s flag."
msgstr ""
"Die Option %s ist nur für den root-Benutzer gedacht. Bitte führen Sie %s "
"ohne die Option %s erneut aus."
msgid ""
"Running %s as an unprivileged user will result in non-root\\nownership of "
"the packaged files. Try using the %s environment by\\nplacing %s in the %s "
"array in %s."
msgstr ""
"Wird %s als unprivilegierter Benutzer ausgeführt, führt dies zu nicht-root "
"Besitzrechten der Paket-Dateien. Versuchen Sie die Umgebung %s zu benutzen, "
"indem Sie %s in das Array %s in %s aufnehmen."
msgid "Do not use the %s option. This option is only for use by %s."
msgstr ""
"Verwenden Sie nicht die Option %s. Diese Option ist nur für die Verwendung "
"durch %s."
msgid "%s does not exist."
msgstr "%s existiert nicht."
msgid "%s contains %s characters and cannot be sourced."
msgstr ""
msgstr "%s enthält %s Zeichen und kann nicht ausgeführt werden."
msgid "The key %s does not exist in your keyring."
msgstr ""
msgstr "Der Schlüssel %s befindet sich nicht in Ihrem Schlüsselbund."
msgid "There is no key in your keyring."
msgstr ""
msgstr "Es befinden sich keine Schlüssel in Ihrem Schlüsselbund."
msgid "A package has already been built, installing existing package..."
msgstr "Es wurde bereits ein Paket gebaut, installiere existierendes Paket..."
msgid "A package has already been built. (use %s to overwrite)"
msgstr ""
msgstr "Es wurde bereits ein Paket gebaut. (benutze %s zum Überschreiben)"
msgid ""
"The package group has already been built, installing existing packages..."
@@ -549,16 +591,17 @@ msgstr ""
"Die Paket-Gruppe wurde bereits gebaut, installiere existierende Pakete..."
msgid "The package group has already been built. (use %s to overwrite)"
msgstr ""
msgstr "Die Paketgruppe wurde bereits gebaut. (benutze %s zum Überschreiben)"
msgid "Part of the package group has already been built. (use %s to overwrite)"
msgstr ""
"Ein Teil der Paketgruppe wurde bereits gebaut. (benutze %s zum Überschreiben)"
msgid "Leaving %s environment."
msgstr ""
msgstr "Verlasse %s Umgebung."
msgid "Repackaging without the use of a %s function is deprecated."
msgstr ""
msgstr "Erneutes Packen ohne die Funktion %s ist veraltet."
msgid "File permissions may not be preserved."
msgstr "Die Datei-Berechtigungen werden vielleicht nicht erhalten."
@@ -568,6 +611,7 @@ msgstr "Erstelle Paket: %s"
msgid "A source package has already been built. (use %s to overwrite)"
msgstr ""
"Es wurde bereits ein Quell-Paket gebaut. (Benutzen Sie -f zum Überschreiben)"
msgid "Source package created: %s"
msgstr "Quell-Paket erstellt: %s"
@@ -586,15 +630,19 @@ msgstr "Konnte nicht alle Abhängigkeiten auflösen."
msgid "%s was not found in %s; skipping dependency checks."
msgstr ""
"%s wurde nicht in %s gefunden; überspringe Abhängigkeits-Überprüfungen."
msgid "Skipping source retrieval -- using existing %s tree"
msgstr ""
"Überspringe Abholen der Quellen -- verwende bestehenden %s Baum"
msgid "Skipping source integrity checks -- using existing %s tree"
msgstr ""
"Überspringe Integritäts-Prüfung der Quellen -- verwende bestehenden %s Baum"
msgid "Skipping source extraction -- using existing %s tree"
msgstr ""
"Überspringe Entpacken der Quellen -- verwende bestehenden %s Baum"
msgid "The source directory is empty, there is nothing to build!"
msgstr "Das Quell-Verzeichnis ist leer, es kann nichts gebaut werden!"
@@ -606,7 +654,7 @@ msgid "Sources are ready."
msgstr "Quellen sind fertig."
msgid "Removing existing %s directory..."
msgstr ""
msgstr "Entferne existierendes %s Verzeichnis..."
msgid "Finished making: %s"
msgstr "Beendete make: %s"
@@ -644,131 +692,195 @@ msgid "Done."
msgstr "Fertig."
msgid "Manage pacman's list of trusted keys"
msgstr ""
msgstr "Verwaltet die Liste der Trusted-Keys von pacman"
msgid " -a, --add [<file(s)>] Add the specified keys (empty for stdin)"
#, fuzzy
msgid " -a, --add [file(s)] Add the specified keys (empty for stdin)"
msgstr ""
" -a, --add [<file(s)>] Füge die angegebenen Schlüssel hinzu (leer für "
"stdin)"
msgid " -d, --delete <keyid(s)> Remove the specified keyids"
msgstr ""
msgstr " -d, --delete <keyid(s)> Lösche die angegebene Schlüssel-Kennungen"
msgid " -e, --export [<keyid(s)>] Export the specified or all keyids"
#, fuzzy
msgid " -e, --export [keyid(s)] Export the specified or all keyids"
msgstr ""
" -e, --export [<keyid(s)>] Exportie die angegebenen oder alle Schlüssel-"
"Kennungen"
#, fuzzy
msgid ""
" -f, --finger [<keyid(s)>] List fingerprint for specified or all keyids"
" -f, --finger [keyid(s)] List fingerprint for specified or all keyids"
msgstr ""
" -f, --finger [<keyid(s)>] Liste alle Fingerabdrücke der angegebenen oder "
"aller Schlüssel-Kennungen auf"
msgid " -h, --help Show this help message and exit"
msgstr ""
msgstr " -h, --help Zeige diesen Hilfe und beende"
msgid " -l, --list-keys [<keyid(s)>] List the specified or all keys"
#, fuzzy
msgid " -l, --list-keys [keyid(s)] List the specified or all keys"
msgstr ""
" -l, --list-keys [<keyid(s)>] Liste die angegebenen oder alle Schlüssel auf"
msgid " -r, --receive <keyserver> <keyid(s)> Fetch the specified keyids"
#, fuzzy
msgid " -r, --recv-keys <keyid(s)> Fetch the specified keyids"
msgstr ""
" -r, --receive <keyserver> <keyid(s)> Hole die angegebenen Schlüssel-"
"Kennungen"
msgid " -u, --updatedb Update the trustdb of pacman"
msgstr ""
" -u, --updatedb Aktualisiere die Trust-Datenbank von Pacman"
msgid " -v, --verify <signature> Verify the file specified by the signature"
msgstr ""
" -v, --verify <signature> Überprüfe die angegebene Datei mit der Signatur"
msgid " -V, --version Show program version"
msgstr ""
msgstr " -V, --version Zeige Programmversion"
#, fuzzy
msgid ""
" --config <file> Use an alternate config file (instead of"
"\\n '%s')"
msgstr ""
" --config <Datei> Eine alternative Konfigurations-Datei (statt '%s') "
"verwenden"
" --config <file> Benutze eine alternative Konfigurationsdatei (an "
"Stelle von\\n '%s')"
msgid ""
" --edit-key <keyid(s)> Present a menu for key management task on keyids"
msgstr ""
" --edit-key <keyid(s)> Zeige eine Menü für das Schlüssel-Management"
msgid ""
" --gpgdir <dir> Set an alternate directory for GnuPG (instead"
"\\n of '%s')"
msgstr ""
" --gpgdir <dir> Setze ein alternatives Verzeichnis für GnuPG (an "
"Stelle\\n von '%s')"
msgid ""
" --import <dir(s)> Imports pubring.gpg and trustdb.gpg from dir(s)"
msgstr ""
" --import <dir(s)> Importiere pubring.gpg und trustdb.gpg aus den "
"Verzeichnissen dir(s)"
msgid ""
" --import-trustdb <dir(s)> Imports ownertrust values from trustdb.gpg in dir"
"(s)"
msgstr ""
" --import-trustdb <dir(s)> Importiere Trust-Werte von trustdb.gpg aus den "
"Verzeichnissen dir(s)"
msgid " --init Ensure the keyring is properly initialized"
msgstr ""
" --init Stellen Sie sicher, dass der Schlüsselbund "
"richtig initialisiert ist"
msgid " --list-sigs [<keyid(s)>] List keys and their signatures"
msgstr ""
msgid " --reload Reload the default keys"
msgstr ""
msgid "You do not have sufficient permissions to read the %s keyring..."
msgstr ""
msgid "Use '%s' to correct the keyring permissions."
msgstr ""
msgid "You do not have sufficient permissions to run this command..."
msgstr ""
msgid "Verifying official keys file signature..."
msgstr ""
msgid "The signature of file %s is not valid."
msgstr ""
msgid "Verifying deprecated keys file signature..."
msgstr ""
msgid "Verifying deleted keys file signature..."
msgstr ""
msgid "Appending official keys..."
msgstr ""
msgid "Appending deprecated keys..."
msgstr ""
msgid "Removing deleted keys from keyring..."
msgstr ""
msgid "Updating trust database..."
msgstr ""
msgid "You need to specify the keyserver and at least one key identifier"
msgstr ""
msgid "The key identified by %s does not exist"
msgstr ""
msgid "Cannot find the %s binary required for all %s operations."
msgstr ""
msgid "%s needs to be run as root for this operation."
msgid " --keyserver Specify a keyserver to use if necessary"
msgstr ""
#, fuzzy
msgid " --list-sigs [keyid(s)] List keys and their signatures"
msgstr " --list-sigs [<keyid(s)>] Liste Schlüssel und ihre Signaturen auf"
#, fuzzy
msgid " --lsign-key <keyid> Locally sign the specified keyid"
msgstr " -d, --delete <keyid(s)> Lösche die angegebene Schlüssel-Kennungen"
msgid ""
" --populate [keyring(s)] Reload the default keys from the (given) keyrings"
"\\n in '%s'"
msgstr ""
#, fuzzy
msgid ""
" --refresh-keys [keyid(s)] Update specified or all keys from a keyserver"
msgstr ""
" -l, --list-keys [<keyid(s)>] Liste die angegebenen oder alle Schlüssel auf"
msgid "You do not have sufficient permissions to read the %s keyring..."
msgstr ""
"Sie haben nicht ausreichende Berechtigungen um den Schlüsselbund %s zu lesen."
msgid "Use '%s' to correct the keyring permissions."
msgstr ""
"Benutzen Sie '%s', um die Berechtigungen des Schlüsselbundes zu korrigieren."
msgid "You do not have sufficient permissions to run this command..."
msgstr "Sie haben ungenügende Berechtigungen, um diesen Befehl auszuführen..."
msgid "There is no secret key available to sign with."
msgstr ""
msgid "Use '%s' to generate a default secret key."
msgstr ""
#, fuzzy
msgid "Verifying %s..."
msgstr "Füge %s hinzu ... "
msgid "File %s is unsigned, cannot continue."
msgstr ""
msgid "The signature of file %s is not valid."
msgstr "Die Signatur der Datei %s ist ungütig."
#, fuzzy
msgid "Verifying keyring file signatures..."
msgstr "Überprüfe Signatur der gelöschten Schlüssel..."
msgid "No keyring files exist in %s."
msgstr ""
#, fuzzy
msgid "The keyring file %s does not exist."
msgstr "Der Schlüssel mit der Kennung %s existiert nicht"
#, fuzzy
msgid "Appending keys from %s.gpg..."
msgstr "Hänge offizielle Schlüssel an..."
#, fuzzy
msgid "Locally signing trusted keys in keyring..."
msgstr "Entferne gelöschte Schlüssel aus dem Schlüsselbund..."
msgid "Locally signing key %s..."
msgstr ""
#, fuzzy
msgid "Disabling revoked keys in keyring..."
msgstr "Entferne gelöschte Schlüssel aus dem Schlüsselbund..."
#, fuzzy
msgid "Disabling key %s..."
msgstr "Erstelle Tarball aus %s..."
msgid "The key identified by %s does not exist"
msgstr "Der Schlüssel mit der Kennung %s existiert nicht"
msgid "Cannot find the %s binary required for all %s operations."
msgstr ""
"Kan das Programm %s nicht finden, das für alle %s Operationen benötigt wird."
msgid "%s needs to be run as root for this operation."
msgstr "%s muss für diese Operation als root ausgeführt werden."
msgid "%s configuration file '%s' not found."
msgstr "Repositorium \"%s\" wurde nicht gefunden."
msgstr "%s Konfigurationsdatei '%s' nicht gefunden."
msgid "no operation specified (use -h for help)"
msgstr ""
msgstr "keine Operation angegeben (benutzen Sie -h für die Hilfe)"
msgid "Multiple operations specified"
msgstr ""
msgstr "mehrere Operationen angegeben"
msgid "Please run %s with each operation separately\\n"
msgstr ""
msgstr "Bitte führen Sie %s einzeln mit jeder Operation aus\\n"
msgid "Updating trust database..."
msgstr "Aktualisiere Trust-Datenbank"
msgid ""
"pacman-optimize is a little hack that should improve the performance\\nof "
@@ -801,7 +913,7 @@ msgstr ""
"Sie müssen über die nötigen Rechte verfügen, um die Datenbank zu optimieren."
msgid "Can not create temp directory for database building."
msgstr ""
msgstr "Kann temporäres Verzeichnis zum Bauen der Datenbank nicht anlegen."
msgid "MD5sum'ing the old database..."
msgstr "Errechne MD5-Summe der alten Datenbank..."
@@ -884,7 +996,7 @@ msgid "Cannot find the xdelta3 binary! Is xdelta3 installed?"
msgstr "Kann die xdelta3-Binär-Datei nicht finden! Ist xdelta3 installiert?"
msgid "Usage: repo-add [options] <path-to-db> <package|delta> ...\\n"
msgstr ""
msgstr "Aufruf: repo-add [Optionen] <Pfad-zur-Datenbank> <Paket|Delta> ...\\n"
msgid ""
"repo-add will update a package database by reading a package file."
@@ -895,16 +1007,18 @@ msgstr ""
"werden.\\n\\n"
msgid "Options:\\n"
msgstr ""
msgstr "Optionen:\\n"
msgid " -d, --delta generate and add delta for package update\\n"
msgstr ""
" -d, --delta erzeuge und füge Delta-Datei für Paket-Update hinzu"
msgid " -f, --files update database's file list\\n"
msgstr ""
msgstr " -f, --files aktualisiere die Dateiliste der Datenbank"
msgid "Usage: repo-remove [options] <path-to-db> <packagename|delta> ...\\n\\n"
msgstr ""
"Verwendung: repo-remove [Optionen] <Pfad-zur-DB> <Paketname|Delta> ...\\n\\n"
msgid ""
"repo-remove will update a package database by removing the package name"
@@ -916,25 +1030,31 @@ msgstr ""
"\\nPakete zum Entfernen können auf der Kommandozeile angegeben werden.\\n\\n"
msgid " -q, --quiet minimize output\\n"
msgstr ""
msgstr " -q, --quiet minimiere Ausgaben\\n"
msgid " -s, --sign sign database with GnuPG after update\\n"
msgstr ""
msgstr " -s, --sign signiere Datenbank mit GnuPG nach dem Update\\n"
msgid " -k, --key <key> use the specified key to sign the database\\n"
msgstr ""
" -k, --key <key> benutze den angegebenen Schlüssel zum Signieren der "
"Datenbank\\n"
msgid " -v, --verify verify database's signature before update\\n"
msgstr ""
" -v, --verify überprüfe die Signatur der Datenbank vor dem Update\\n"
msgid ""
"\\nSee %s(8) for more details and descriptions of the available options.\\n"
"\\n"
msgstr ""
"\\nSiehe %s(8) für mehr Details und Beschreibungen der verfügbaren Optionen."
"\\n\\n"
msgid ""
"Example: repo-add /path/to/repo.db.tar.gz pacman-3.0.0-1-i686.pkg.tar.gz"
msgstr ""
"Beispiel: repo-add /path/to/repo.db.tar.gz pacman-3.0.0-1-i686.pkg.tar.gz"
msgid "Example: repo-remove /path/to/repo.db.tar.gz kernel26"
msgstr "Beispiel: repo-remove /Pfad/zum/Repo.db.tar.gz kernel26"
@@ -944,6 +1064,9 @@ msgid ""
"\\nThis is free software; see the source for copying conditions.\\nThere is "
"NO WARRANTY, to the extent permitted by law.\\n"
msgstr ""
"Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>\\n"
"\\nDieses Program ist freie Software; siehe Kopierbedingungen im Quelltext."
"\\nKeine Garantie nach geltendem Recht.\\n"
msgid "No database entry for package '%s'."
msgstr "Kein Datenbank-Eintrag für das Paket '%s'."
@@ -954,37 +1077,39 @@ msgstr "Füge 'deltas' Eintrag hinzu: %s -> %s"
msgid "Removing existing entry '%s'..."
msgstr "Entferne existierenden Eintrag '%s'..."
#, fuzzy
msgid "Cannot find the gpg binary! Is GnuPG installed?"
msgstr "Kann die xdelta3-Binär-Datei nicht finden! Ist xdelta3 installiert?"
msgstr "Kann die gpg Programmdatei nicht finden! Ist GnuPG installiert?"
msgid "Signing database..."
msgstr ""
msgstr "Signiere Datenbank..."
msgid "Failed to sign package database."
msgstr ""
msgstr "Konnte die Paketdatenbank nicht signieren."
msgid "Verifying database signature..."
msgstr ""
msgstr "Überprüfe Datenbanksignatur"
msgid "No existing signature found, skipping verification."
msgstr ""
msgstr "Keine existierende Signatur gefunden, überspringe Überprüfung."
msgid "Database signature file verified."
msgstr ""
msgstr "Datenbanksignatur überprüft"
msgid "Database signature was NOT valid!"
msgstr ""
msgstr "Datenbanksignatur ist NICHT gültig!"
msgid "'%s' does not have a valid archive extension."
msgstr "'%s' hat keine gültige Archiv-Endung."
msgid "Computing checksums..."
msgstr ""
msgid "An entry for '%s' already existed"
msgstr "Ein Eintrag für '%s' existierte bereits"
msgid "Computing checksums..."
msgstr "Berechne Prüfsumme..."
msgid "Adding package signature..."
msgstr "Füge Paket-Signatur hinzu..."
msgid "Creating '%s' db entry..."
msgstr "Erstelle '%s' Datenbank-Eintrag"
@@ -1049,10 +1174,24 @@ msgid "No packages modified, nothing to do."
msgstr "Keine Pakete modifiziert, ich kann nichts machen."
msgid "option %s requires an argument\\n"
msgstr ""
msgstr "Option %s benötigt ein Argument\\n"
msgid "unrecognized option"
msgstr ""
msgstr "unbekannte Option"
#~ msgid "permanent, catastrophic damage to your system. If you"
#~ msgstr "Idee, die dauerhaften Schaden auf Ihrem System anrichten kann."
#~ msgid " --reload Reload the default keys"
#~ msgstr " --reload Lade die Standard-Schlüssel erneut"
#~ msgid "Verifying official keys file signature..."
#~ msgstr "Überprüfe Signatur der offiziellen Schlüssel..."
#~ msgid "Verifying deprecated keys file signature..."
#~ msgstr "Überprüfe Signatur der veralteten Schlüssel..."
#~ msgid "Appending deprecated keys..."
#~ msgstr "Hänge veraltete Schlüssel an..."
#~ msgid "You need to specify the keyserver and at least one key identifier"
#~ msgstr ""
#~ "Sie müssen den Schlüssel-Server und mindestens eine Schlüsselkennung "
#~ "festlegen"

File diff suppressed because it is too large Load Diff

View File

@@ -2,12 +2,13 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-09 01:00+0000\n"
"POT-Creation-Date: 2011-09-22 11:33-0500\n"
"PO-Revision-Date: 2011-08-15 21:10+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: en_GB\n"
@@ -111,16 +112,19 @@ msgid "SOURCE FILE NOT FOUND"
msgstr "SOURCE FILE NOT FOUND"
#, fuzzy
msgid "Unknown public key"
msgstr "Warning: Unknown public key"
msgid "unknown public key"
msgstr "Unknown public key"
msgid "Warning: the key has been revoked."
#, fuzzy
msgid "the key has been revoked."
msgstr "Warning: the key has been revoked."
msgid "Warning: the signature has expired."
#, fuzzy
msgid "the signature has expired."
msgstr "Warning: the signature has expired."
msgid "Warning: the key has expired."
#, fuzzy
msgid "the key has expired."
msgstr "Warning: the key has expired."
msgid "One or more PGP signatures could not be verified!"
@@ -397,6 +401,12 @@ msgstr ""
msgid " -s, --syncdeps Install missing dependencies with %s"
msgstr " -s, --syncdeps Install missing dependencies with %s"
#, fuzzy
msgid ""
" -S, --source Generate a source-only tarball without downloaded sources"
msgstr ""
" --source Generate a source-only tarball without downloaded sources"
msgid ""
" --allsource Generate a source-only tarball including downloaded "
"sources"
@@ -443,14 +453,8 @@ msgid ""
msgstr ""
" --skipinteg Do not perform any verification checks on source files"
#, fuzzy
msgid " --skippgpcheck Do not verify source files with PGP signatures"
msgstr " --skippgpcheck Do not verify source files with pgp signatures"
msgid ""
" --source Generate a source-only tarball without downloaded sources"
msgstr ""
" --source Generate a source-only tarball without downloaded sources"
msgstr " --skippgpcheck Do not verify source files with PGP signatures"
msgid "These options can be passed to %s:"
msgstr "These options can be passed to %s:"
@@ -497,18 +501,25 @@ msgid ""
"damage to your system. If you wish to run as root, please\\nuse the %s "
"option."
msgstr ""
"Running %s as root is a BAD idea and can cause permanent,\\ncatastrophic "
"damage to your system. If you wish to run as root, please\\nuse the %s "
"option."
#, fuzzy
msgid ""
"The %s option is meant for the root user only. Please\\nrerun %s without the "
"%s flag."
msgstr "The %s option is meant for the root user only."
msgstr ""
"The %s option is meant for the root user only. Please\\nrerun %s without the "
"%s flag."
msgid ""
"Running %s as an unprivileged user will result in non-root\\nownership of "
"the packaged files. Try using the %s environment by\\nplacing %s in the %s "
"array in %s."
msgstr ""
"Running %s as an unprivileged user will result in non-root\\nownership of "
"the packaged files. Try using the %s environment by\\nplacing %s in the %s "
"array in %s."
msgid "Do not use the %s option. This option is only for use by %s."
msgstr "Do not use the %s option. This option is only for use by %s."
@@ -633,27 +644,32 @@ msgstr "Done."
msgid "Manage pacman's list of trusted keys"
msgstr "Manage pacman's list of trusted keys"
msgid " -a, --add [<file(s)>] Add the specified keys (empty for stdin)"
#, fuzzy
msgid " -a, --add [file(s)] Add the specified keys (empty for stdin)"
msgstr " -a, --add [<file(s)>] Add the specified keys (empty for stdin)"
msgid " -d, --delete <keyid(s)> Remove the specified keyids"
msgstr " -d, --delete <keyid(s)> Remove the specified keyids"
msgid " -e, --export [<keyid(s)>] Export the specified or all keyids"
#, fuzzy
msgid " -e, --export [keyid(s)] Export the specified or all keyids"
msgstr " -e, --export [<keyid(s)>] Export the specified or all keyids"
#, fuzzy
msgid ""
" -f, --finger [<keyid(s)>] List fingerprint for specified or all keyids"
" -f, --finger [keyid(s)] List fingerprint for specified or all keyids"
msgstr ""
" -f, --finger [<keyid(s)>] List fingerprint for specified or all keyids"
msgid " -h, --help Show this help message and exit"
msgstr " -h, --help Show this help message and exit"
msgid " -l, --list-keys [<keyid(s)>] List the specified or all keys"
#, fuzzy
msgid " -l, --list-keys [keyid(s)] List the specified or all keys"
msgstr " -l, --list-keys [<keyid(s)>] List the specified or all keys"
msgid " -r, --receive <keyserver> <keyid(s)> Fetch the specified keyids"
#, fuzzy
msgid " -r, --recv-keys <keyid(s)> Fetch the specified keyids"
msgstr " -r, --receive <keyserver> <keyid(s)> Fetch the specified keyids"
msgid " -u, --updatedb Update the trustdb of pacman"
@@ -665,22 +681,24 @@ msgstr " -v, --verify <signature> Verify the file specified by the signature"
msgid " -V, --version Show program version"
msgstr " -V, --version Show program version"
#, fuzzy
msgid ""
" --config <file> Use an alternate config file (instead of"
"\\n '%s')"
msgstr " --config <file> Use an alternate config file (instead of '%s')"
msgstr ""
" --config <file> Use an alternate config file (instead of"
"\\n '%s')"
msgid ""
" --edit-key <keyid(s)> Present a menu for key management task on keyids"
msgstr ""
" --edit-key <keyid(s)> Present a menu for key management task on keyids"
#, fuzzy
msgid ""
" --gpgdir <dir> Set an alternate directory for GnuPG (instead"
"\\n of '%s')"
msgstr " --gpgdir <dir> Set an alternate directory for gnupg"
msgstr ""
" --gpgdir <dir> Set an alternate directory for GnuPG (instead"
"\\n of '%s')"
msgid ""
" --import <dir(s)> Imports pubring.gpg and trustdb.gpg from dir(s)"
@@ -697,11 +715,26 @@ msgstr ""
msgid " --init Ensure the keyring is properly initialized"
msgstr " --init Ensure the keyring is properly initialised"
msgid " --list-sigs [<keyid(s)>] List keys and their signatures"
msgid " --keyserver Specify a keyserver to use if necessary"
msgstr ""
#, fuzzy
msgid " --list-sigs [keyid(s)] List keys and their signatures"
msgstr " --list-sigs [<keyid(s)>] List keys and their signatures"
msgid " --reload Reload the default keys"
msgstr " --reload Reload the default keys"
#, fuzzy
msgid " --lsign-key <keyid> Locally sign the specified keyid"
msgstr " -d, --delete <keyid(s)> Remove the specified keyids"
msgid ""
" --populate [keyring(s)] Reload the default keys from the (given) keyrings"
"\\n in '%s'"
msgstr ""
#, fuzzy
msgid ""
" --refresh-keys [keyid(s)] Update specified or all keys from a keyserver"
msgstr " -l, --list-keys [<keyid(s)>] List the specified or all keys"
msgid "You do not have sufficient permissions to read the %s keyring..."
msgstr "You do not have sufficient permissions to read the %s keyring..."
@@ -712,32 +745,51 @@ msgstr "Use '%s' to correct the keyring permissions."
msgid "You do not have sufficient permissions to run this command..."
msgstr "You do not have sufficient permissions to run this command..."
msgid "Verifying official keys file signature..."
msgstr "Verifying official keys file signature..."
msgid "There is no secret key available to sign with."
msgstr ""
msgid "Use '%s' to generate a default secret key."
msgstr ""
#, fuzzy
msgid "Verifying %s..."
msgstr "Adding %s..."
msgid "File %s is unsigned, cannot continue."
msgstr ""
msgid "The signature of file %s is not valid."
msgstr "The signature of file %s is not valid."
msgid "Verifying deprecated keys file signature..."
msgstr "Verifying deprecated keys file signature..."
msgid "Verifying deleted keys file signature..."
#, fuzzy
msgid "Verifying keyring file signatures..."
msgstr "Verifying deleted keys file signature..."
msgid "Appending official keys..."
msgid "No keyring files exist in %s."
msgstr ""
#, fuzzy
msgid "The keyring file %s does not exist."
msgstr "The key identified by %s does not exist"
#, fuzzy
msgid "Appending keys from %s.gpg..."
msgstr "Appending official keys..."
msgid "Appending deprecated keys..."
msgstr "Appending deprecated keys..."
msgid "Removing deleted keys from keyring..."
#, fuzzy
msgid "Locally signing trusted keys in keyring..."
msgstr "Removing deleted keys from keyring..."
msgid "Updating trust database..."
msgstr "Updating trust database..."
msgid "Locally signing key %s..."
msgstr ""
msgid "You need to specify the keyserver and at least one key identifier"
msgstr "You need to specify the keyserver and at least one key identifier"
#, fuzzy
msgid "Disabling revoked keys in keyring..."
msgstr "Removing deleted keys from keyring..."
#, fuzzy
msgid "Disabling key %s..."
msgstr "Tar'ing up %s..."
msgid "The key identified by %s does not exist"
msgstr "The key identified by %s does not exist"
@@ -748,9 +800,8 @@ msgstr "Cannot find the %s binary required for all %s operations."
msgid "%s needs to be run as root for this operation."
msgstr "%s needs to be run as root for this operation."
#, fuzzy
msgid "%s configuration file '%s' not found."
msgstr "%s configuation file '%s' not found."
msgstr "%s configuration file '%s' not found."
msgid "no operation specified (use -h for help)"
msgstr "no operation specified (use -h for help)"
@@ -761,6 +812,9 @@ msgstr "Multiple operations specified"
msgid "Please run %s with each operation separately\\n"
msgstr "Please run %s with each operation separately\\n"
msgid "Updating trust database..."
msgstr "Updating trust database..."
msgid ""
"pacman-optimize is a little hack that should improve the performance\\nof "
"pacman when reading/writing to its filesystem-based database.\\n\\n"
@@ -948,9 +1002,8 @@ msgstr "Adding 'deltas' entry : %s -> %s"
msgid "Removing existing entry '%s'..."
msgstr "Removing existing entry '%s'..."
#, fuzzy
msgid "Cannot find the gpg binary! Is GnuPG installed?"
msgstr "Cannot find the gpg binary! Is gnupg installed?"
msgstr "Cannot find the gpg binary! Is GnuPG installed?"
msgid "Signing database..."
msgstr "Signing database..."
@@ -973,11 +1026,14 @@ msgstr "Database signature was NOT valid!"
msgid "'%s' does not have a valid archive extension."
msgstr "'%s' does not have a valid archive extension."
msgid "An entry for '%s' already existed"
msgstr "An entry for '%s' already existed"
msgid "Computing checksums..."
msgstr "Computing checksums..."
msgid "An entry for '%s' already existed"
msgstr "An entry for '%s' already existed"
msgid "Adding package signature..."
msgstr ""
msgid "Creating '%s' db entry..."
msgstr "Creating '%s' db entry..."
@@ -1048,29 +1104,17 @@ msgstr "option %s requires an argument\\n"
msgid "unrecognized option"
msgstr "unrecognised option"
#~ msgid "Running %s as root is a BAD idea and can cause"
#~ msgstr "Running %s as root is a BAD idea and can cause"
#~ msgid " --reload Reload the default keys"
#~ msgstr " --reload Reload the default keys"
#~ msgid "permanent, catastrophic damage to your system. If you"
#~ msgstr "permanent, catastrophic damage to your system. If you"
#~ msgid "Verifying official keys file signature..."
#~ msgstr "Verifying official keys file signature..."
#~ msgid "wish to run as root, please use the %s option."
#~ msgstr "wish to run as root, please use the %s option."
#~ msgid "Verifying deprecated keys file signature..."
#~ msgstr "Verifying deprecated keys file signature..."
#~ msgid "Please rerun %s without the %s flag."
#~ msgstr "Please rerun %s without the %s flag."
#~ msgid "Appending deprecated keys..."
#~ msgstr "Appending deprecated keys..."
#~ msgid "Running %s as an unprivileged user will result in non-root"
#~ msgstr "Running %s as an unprivileged user will result in non-root"
#~ msgid "ownership of the packaged files. Try using the %s environment by"
#~ msgstr "ownership of the packaged files. Try using the %s environment by"
#~ msgid "placing %s in the %s array in %s."
#~ msgstr "placing %s in the %s array in %s."
#~ msgid " --config <file> Use an alternate config file"
#~ msgstr " --config <file> Use an alternate config file"
#~ msgid " (instead of '%s')"
#~ msgstr " (instead of '%s')"
#~ msgid "You need to specify the keyserver and at least one key identifier"
#~ msgstr "You need to specify the keyserver and at least one key identifier"

View File

@@ -2,13 +2,14 @@
# Copyright (C) YEAR Pacman Development Team <pacman-dev@archlinux.org>
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Arch Linux Pacman package manager\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
"POT-Creation-Date: 2011-08-09 15:51-0500\n"
"PO-Revision-Date: 2011-08-08 22:38+0000\n"
"Last-Translator: toofishes <dpmcgee@gmail.com>\n"
"POT-Creation-Date: 2011-09-22 11:33-0500\n"
"PO-Revision-Date: 2011-09-02 18:45+0000\n"
"Last-Translator: neiko <neikokz+tsfx@gmail.com>\n"
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/"
"archlinux-pacman/team/es/)\n"
"Language: es\n"
@@ -18,7 +19,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
msgid "WARNING:"
msgstr "PRECAUCIÓN:"
msgstr "ATENCIÓN:"
msgid "ERROR:"
msgstr "ERROR:"
@@ -27,7 +28,7 @@ msgid "Cleaning up..."
msgstr "Limpiando..."
msgid "Entering %s environment..."
msgstr ""
msgstr "Entrando a ambiente %s..."
msgid "Unable to find source file %s."
msgstr "No se puede abrir el archivo fuente %s."
@@ -76,6 +77,8 @@ msgstr "Generando la verificación para los archivos fuente..."
msgid "Cannot find the %s binary required for generating sourcefile checksums."
msgstr ""
"No se pudo encontrar el binario %s necesario para generar las sumas de "
"verificación de las fuentes."
msgid "Invalid integrity algorithm '%s' specified."
msgstr "El algoritmo de integridad especificado '%s' no es válido."
@@ -104,43 +107,47 @@ msgid "Integrity checks are missing."
msgstr "Faltan las pruebas de integridad."
msgid "Verifying source file signatures with %s..."
msgstr ""
msgstr "Comprobando las firmas de las fuentes con %s..."
msgid "SIGNATURE NOT FOUND"
msgstr ""
msgstr "FIRMA NO ENCONTRADA"
msgid "SOURCE FILE NOT FOUND"
msgstr ""
msgstr "FUENTES NO ENCONTRADAS"
msgid "Unknown public key"
msgstr ""
#, fuzzy
msgid "unknown public key"
msgstr "Clave pública desconocida"
msgid "Warning: the key has been revoked."
msgstr ""
#, fuzzy
msgid "the key has been revoked."
msgstr "Atención: la clave ha sido revocada."
msgid "Warning: the signature has expired."
msgstr ""
#, fuzzy
msgid "the signature has expired."
msgstr "Atención: la firma ha caducado."
msgid "Warning: the key has expired."
msgstr ""
#, fuzzy
msgid "the key has expired."
msgstr "Atención: la clave ha caducado."
msgid "One or more PGP signatures could not be verified!"
msgstr ""
msgstr "¡Una o más firmas PGP no pudieron ser verificadas!"
msgid "Warnings have occurred while verifying the signatures."
msgstr ""
msgstr "Ha habido avisos al verificar las firmas."
msgid "Please make sure you really trust them."
msgstr ""
msgstr "Asegúrese de que realmente confía en ellas."
msgid "Skipping all source file integrity checks."
msgstr ""
msgstr "Omitiendo todas las comprobaciones de integridad de las fuentes."
msgid "Skipping verification of source file checksums."
msgstr ""
msgstr "Omitiendo la verificación de integridad de las fuentes."
msgid "Skipping verification of source file PGP signatures."
msgstr ""
msgstr "Omitiendo la verificación PGP de las fuentes."
msgid "Extracting Sources..."
msgstr "Descomprimiendo fuentes..."
@@ -164,7 +171,7 @@ msgid "Removing doc files..."
msgstr "Quitando los archivos doc..."
msgid "Purging unwanted files..."
msgstr ""
msgstr "Limpiando archivos innecesarios..."
msgid "Compressing man and info pages..."
msgstr "Comprimiendo las páginas man e info..."
@@ -173,37 +180,37 @@ msgid "Stripping unneeded symbols from binaries and libraries..."
msgstr "Quitando los símbolos no requeridos de los binarios y bibliotecas..."
msgid "Removing %s files..."
msgstr ""
msgstr "Eliminando archivos de %s..."
msgid "Removing empty directories..."
msgstr "Quitando directorios vacíos... "
msgid "Compressing binaries with %s..."
msgstr ""
msgstr "Comprimiendo los binarios con %s..."
msgid "Could not compress binary : %s"
msgstr ""
msgstr "Error al comprimir el binario: %s"
msgid "Generating %s file..."
msgstr ""
msgstr "Generando el archivo %s..."
msgid "Cannot find library listed in %s: %s"
msgstr ""
msgstr "No se pudo encontrar la librería especificada en %s: %s"
msgid "Please add a license line to your %s!"
msgstr "Por favor, ¡añada una línea de licencia a su %s!"
msgid "Example for GPL'ed software: %s."
msgstr ""
msgstr "Ejemplo para software bajo la licencia GPL: %s."
msgid "%s entry file not in package : %s"
msgstr ""
msgstr "Archivo de entrada %s inexistente en el paquete: %s"
msgid "Package contains reference to %s"
msgstr "El paquete contiene referencias a %s"
msgid "Missing %s directory."
msgstr ""
msgstr "Falta el directorio %s."
msgid "Creating package..."
msgstr "Creando el paquete..."
@@ -224,13 +231,13 @@ msgid "Failed to create symlink to package file."
msgstr "Error al crear un enlace simbólico al paquete."
msgid "Signing package..."
msgstr ""
msgstr "Firmando paquete..."
msgid "Created signature file %s."
msgstr ""
msgstr "Creado el archivo de firma %s."
msgid "Failed to sign package file."
msgstr ""
msgstr "Error al firmar el paquete."
msgid "Creating source package..."
msgstr "Creando paquete fuente..."
@@ -251,10 +258,10 @@ msgid "Failed to create symlink to source package file."
msgstr "Falló al crear enlace simbólico al archivo del paquete origen."
msgid "Installing package %s with %s..."
msgstr ""
msgstr "Instalando el paquete %s con %s..."
msgid "Installing %s package group with %s..."
msgstr ""
msgstr "Instalando el grupo de paquetes %s con %s..."
msgid "Failed to install built package(s)."
msgstr "Error al instalar el/los paquete(s) compilado(s)."
@@ -266,10 +273,10 @@ msgid "%s is not allowed to start with a hyphen."
msgstr "No está permitido que %s comience con un guion."
msgid "%s is not allowed to contain colons, hyphens or whitespace."
msgstr ""
msgstr "%s no puede tener dos puntos, guiones o espacios en blanco."
msgid "%s is not allowed to contain hyphens or whitespace."
msgstr ""
msgstr "%s no puede tener guiones o espacios en blanco."
msgid "%s must be an integer."
msgstr "%s debe ser un entero"
@@ -283,28 +290,28 @@ msgstr ""
"%s"
msgid "such as %s."
msgstr ""
msgstr "como %s."
msgid "%s array cannot contain comparison (< or >) operators."
msgstr ""
msgstr "La matriz %s no puede contener operadores de comparación (< o >)."
msgid "%s entry should not contain leading slash : %s"
msgstr ""
msgstr "La entrada %s no debería contener barras: %s"
msgid "Invalid syntax for %s : '%s'"
msgstr ""
msgstr "Sintaxis no válida para %s: '%s'"
msgid "%s file (%s) does not exist."
msgstr "El archivo %s (%s) no existe."
msgid "%s array contains unknown option '%s'"
msgstr ""
msgstr "La matriz %s contiene una opción desconocida: '%s'"
msgid "Missing %s function for split package '%s'"
msgstr ""
msgstr "Falta la función %s para el paquete dividido '%s'"
msgid "Requested package %s is not provided in %s"
msgstr ""
msgstr "El paquete requerido %s no está provisto en %s"
msgid "Sudo can not be found. Will use su to acquire root privileges."
msgstr ""
@@ -313,33 +320,48 @@ msgstr ""
msgid "Cannot find the %s binary required for building as non-root user."
msgstr ""
"No se pudo encontrar el binario requerido %s para compilar como usuario "
"normal."
msgid "Cannot find the %s binary required for signing packages."
msgstr ""
msgstr "No se pudo encontrar el binario requerido %s para firmar paquetes."
msgid "Cannot find the %s binary required for verifying source files."
msgstr ""
"No se pudo encontrar el binario requerido %s para verificar las fuentes."
msgid "Cannot find the %s binary required for validating sourcefile checksums."
msgstr ""
"No se pudo encontrar el binario requerido %s para verificar la integridad de "
"las fuentes."
msgid "Cannot find the %s binary required for compressing binaries."
msgstr ""
"No se pudo encontrar el binario requerido %s para comprimir los binarios."
msgid "Cannot find the %s binary required for distributed compilation."
msgstr ""
"No se pudo encontrar el binario requerido %s para la compilación distribuida."
msgid "Cannot find the %s binary required for compiler cache usage."
msgstr ""
"No se pudo encontrar el binario requerido %s para el uso de caché del "
"compilador."
msgid "Cannot find the %s binary required for object file stripping."
msgstr ""
"No se pudo encontrar el binario requerido %s para eliminar los símbolos de "
"los archivos objeto."
msgid "Cannot find the %s binary required for compressing man and info pages."
msgstr ""
"No se pudo encontrar el binario requerido %s para comprimir las páginas man "
"e info."
msgid "Cannot find the %s binary required to determine latest %s revision."
msgstr ""
"No se pudo encontrar el binario requerido %s para determinar la última "
"revisión de %s."
msgid "Determining latest %s revision..."
msgstr "Determinando ultima revisión de %s..."
@@ -354,7 +376,7 @@ msgid "Options:"
msgstr "Opciones:"
msgid " -A, --ignorearch Ignore incomplete %s field in %s"
msgstr ""
msgstr " -A, --ignorearch Ignorar campo %s incompleto en %s"
msgid " -c, --clean Clean up work files after build"
msgstr " -c, --clean Limpiar archivos tras la compilación"
@@ -363,7 +385,7 @@ msgid " -d, --nodeps Skip all dependency checks"
msgstr " -d, --nodeps Saltar la verificación de dependencias"
msgid " -e, --noextract Do not extract source files (use existing %s dir)"
msgstr ""
msgstr " -e, --noextract No extraer las fuentes (usar el directorio %s)"
msgid " -f, --force Overwrite existing package"
msgstr " -f, --force Sobreescribe el paquete existente"
@@ -373,7 +395,7 @@ msgstr ""
" -g, --geninteg Generar verificaciones de integridad para los fuentes"
msgid " -h, --help Show this help message and exit"
msgstr ""
msgstr " -h, --help Mostrar este mensaje de ayuda y salir"
msgid " -i, --install Install package after successful build"
msgstr " -i, --install Instalar el paquete tras una compilación exitosa"
@@ -400,7 +422,14 @@ msgid " -R, --repackage Repackage contents of the package without rebuilding"
msgstr " -R, --repackage Vuelve a crear el paquete sin recompilar"
msgid " -s, --syncdeps Install missing dependencies with %s"
msgstr " -s, --syncdeps Instalar las dependencias faltantes para %s"
#, fuzzy
msgid ""
" -S, --source Generate a source-only tarball without downloaded sources"
msgstr ""
" --source Genera un paquete de fuentes, sin incluir las fuentes "
"descargadas"
msgid ""
" --allsource Generate a source-only tarball including downloaded "
@@ -410,10 +439,10 @@ msgstr ""
"fuentes descargadas"
msgid " --asroot Allow %s to run as root user"
msgstr ""
msgstr " --asroot Permitir la ejecución de %s como root"
msgid " --check Run the %s function in the %s"
msgstr ""
msgstr " --check Ejecutar la función %s en el %s"
msgid " --config <file> Use an alternate config file (instead of '%s')"
msgstr ""
@@ -429,12 +458,14 @@ msgstr ""
msgid ""
" --key <key> Specify a key to use for %s signing instead of the default"
msgstr ""
" --key <key> Especificar la clave a usar para firmar %s en lugar de la "
"clave por defecto"
msgid " --nocheck Do not run the %s function in the %s"
msgstr ""
msgstr " --nocheck No ejecutar la función %s en el %s"
msgid " --nosign Do not create a signature for the package"
msgstr ""
msgstr " --nosign No crear una firma para el paquete"
msgid " --pkg <list> Only build listed packages from a split package"
msgstr ""
@@ -442,26 +473,23 @@ msgstr ""
"dividido"
msgid " --sign Sign the resulting package with %s"
msgstr ""
msgstr " --sign Firmar el paquete resultante con %s"
msgid " --skipchecksums Do not verify checksums of the source files"
msgstr ""
" --skipchecksums No verificar las sumas de verificación de las fuentes"
msgid ""
" --skipinteg Do not perform any verification checks on source files"
msgstr ""
" --skipinteg No ejecutar ninguna verificación de integridad de las "
"fuentes"
msgid " --skippgpcheck Do not verify source files with PGP signatures"
msgstr ""
msgid ""
" --source Generate a source-only tarball without downloaded sources"
msgstr ""
" --source Genera un paquete de fuentes, sin incluir las fuentes "
"descargadas"
msgstr " --skippgpcheck No verificar las fuentes con las firmas PGP"
msgid "These options can be passed to %s:"
msgstr ""
msgstr "Estas opciones pueden ser pasadas a %s:"
msgid ""
" --noconfirm Do not ask for confirmation when resolving dependencies"
@@ -474,7 +502,7 @@ msgstr ""
" --noprogressbar No muestra la barra de progreso al descargar los archivos"
msgid "If %s is not specified, %s will look for '%s'"
msgstr ""
msgstr "Si %s no es especificado, %s buscará '%s'"
msgid ""
"Copyright (c) 2006-2011 Pacman Development Team <pacman-dev@archlinux.org>."
@@ -491,7 +519,7 @@ msgid "%s not found."
msgstr "no fue encontrado %s."
msgid "You do not have write permission to create packages in %s."
msgstr ""
msgstr "No tiene permiso de escritura para crear paquetes en %s."
msgid "You do not have write permission to store packages in %s."
msgstr "No tiene permisos de escritura para guardar las descargas en %s."
@@ -500,45 +528,52 @@ msgid "You do not have write permission to store downloads in %s."
msgstr "No tiene permiso de escritura para guardar las descargas en %s."
msgid "\\0%s and %s cannot both be specified"
msgstr ""
msgstr "\\0%s y %s no pueden ser especificados a la vez"
msgid ""
"Running %s as root is a BAD idea and can cause permanent,\\ncatastrophic "
"damage to your system. If you wish to run as root, please\\nuse the %s "
"option."
msgstr ""
"Ejecutar %s como root es una MALA idea y puede causar un daño\\npermanente y "
"catastrófico a su sistema. Si desea ejecutarlo como root,\\nuse la opción %s."
msgid ""
"The %s option is meant for the root user only. Please\\nrerun %s without the "
"%s flag."
msgstr ""
"La opción %s es para ser usada sólo por el root. Vuelva\\na ejecutar %s sin "
"%s."
msgid ""
"Running %s as an unprivileged user will result in non-root\\nownership of "
"the packaged files. Try using the %s environment by\\nplacing %s in the %s "
"array in %s."
msgstr ""
"Ejecutar %s como un usuario normal hará que los archivos\\nempaquetados no "
"pertenezcan a root. Intente usar el entorno\\n%s poniendo %s en la matriz %s "
"en %s."
msgid "Do not use the %s option. This option is only for use by %s."
msgstr ""
msgstr "No use la opción %s. Esta opción sólo debe ser usada por %s."
msgid "%s does not exist."
msgstr "%s no existe."
msgid "%s contains %s characters and cannot be sourced."
msgstr ""
msgstr "%s contiene caracteres %s y no puede ser usado."
msgid "The key %s does not exist in your keyring."
msgstr ""
msgstr "La clave %s no existe en su llavero."
msgid "There is no key in your keyring."
msgstr ""
msgstr "No hay ninguna clave en su llavero."
msgid "A package has already been built, installing existing package..."
msgstr "El paquete ya ha sido compilado, instalando el paquete preexistente..."
msgid "A package has already been built. (use %s to overwrite)"
msgstr ""
msgstr "Un paquete ya ha sido creado. (use %s para sobreescribirlo)"
msgid ""
"The package group has already been built, installing existing packages..."
@@ -547,16 +582,17 @@ msgstr ""
"existentes..."
msgid "The package group has already been built. (use %s to overwrite)"
msgstr ""
msgstr "El grupo de paquetes ya ha sido creado. (use %s para sobreescribirlo)"
msgid "Part of the package group has already been built. (use %s to overwrite)"
msgstr ""
"Parte del grupo de paquetes ya ha sido creado. (use %s para sobreescribirlo)"
msgid "Leaving %s environment."
msgstr ""
msgstr "Abandonando el entorno %s."
msgid "Repackaging without the use of a %s function is deprecated."
msgstr ""
msgstr "Volver a empaquetar sin usar una función %s está obsoleto."
msgid "File permissions may not be preserved."
msgstr "Puede que no se preserven los permisos del archivo."
@@ -565,7 +601,7 @@ msgid "Making package: %s"
msgstr "Creando el paquete: %s"
msgid "A source package has already been built. (use %s to overwrite)"
msgstr ""
msgstr "Un paquete de fuentes ya fue compilado. (use %s para sobreescribirlo)"
msgid "Source package created: %s"
msgstr "Paquete fuente creado: %s"
@@ -583,16 +619,16 @@ msgid "Could not resolve all dependencies."
msgstr "No se pudieron resolver todas las dependencias."
msgid "%s was not found in %s; skipping dependency checks."
msgstr ""
msgstr "%s no fue encontrado en %s; no habrá comprobaciones de dependencias."
msgid "Skipping source retrieval -- using existing %s tree"
msgstr ""
msgstr "No obteniendo fuentes -- usando el árbol %s ya existente"
msgid "Skipping source integrity checks -- using existing %s tree"
msgstr ""
msgstr "No comprobando la integridad -- usando el árbol %s ya existente"
msgid "Skipping source extraction -- using existing %s tree"
msgstr ""
msgstr "No extrayendo las fuentes -- usando el árbol %s ya existente"
msgid "The source directory is empty, there is nothing to build!"
msgstr "El directorio de las fuentes esta vacío, ¡no hay nada que compilar!"
@@ -604,13 +640,13 @@ msgid "Sources are ready."
msgstr "Las fuentes están listas."
msgid "Removing existing %s directory..."
msgstr ""
msgstr "Eliminando el directorio %s..."
msgid "Finished making: %s"
msgstr "Terminado haciendo: %s"
msgid "Usage: %s [pacman_db_root]"
msgstr "Uso: %s [pacman_db_root]"
msgstr "Uso: %s [raíz_bd_pacman]"
msgid ""
"Copyright (c) 2010-2011 Pacman Development Team <pacman-dev@archlinux.org>."
@@ -642,131 +678,186 @@ msgid "Done."
msgstr "Hecho."
msgid "Manage pacman's list of trusted keys"
msgstr ""
msgstr "Administrar la lista de claves confiadas por pacman"
msgid " -a, --add [<file(s)>] Add the specified keys (empty for stdin)"
#, fuzzy
msgid " -a, --add [file(s)] Add the specified keys (empty for stdin)"
msgstr ""
" -a, --add [<archivo(s)>] Añade las claves especificadas (vacío para stdin)"
msgid " -d, --delete <keyid(s)> Remove the specified keyids"
msgstr ""
msgstr " -d, --delete <keyid(s)> Elimina las keyids especificadas"
msgid " -e, --export [<keyid(s)>] Export the specified or all keyids"
msgstr ""
#, fuzzy
msgid " -e, --export [keyid(s)] Export the specified or all keyids"
msgstr " -e, --export [<keyid(s)>] Exporta los keyids especificados o todos"
#, fuzzy
msgid ""
" -f, --finger [<keyid(s)>] List fingerprint for specified or all keyids"
" -f, --finger [keyid(s)] List fingerprint for specified or all keyids"
msgstr ""
" -f, --finger [<keyid(s)>] Lista las huellas de los keyids especificados o "
"todos"
msgid " -h, --help Show this help message and exit"
msgstr ""
msgstr " -h, --help Mostrar este mensaje de ayuda y salir"
msgid " -l, --list-keys [<keyid(s)>] List the specified or all keys"
msgstr ""
#, fuzzy
msgid " -l, --list-keys [keyid(s)] List the specified or all keys"
msgstr " -l, --list-keys [<keyid(s)>] Lista los keyids especificados o todos"
msgid " -r, --receive <keyserver> <keyid(s)> Fetch the specified keyids"
#, fuzzy
msgid " -r, --recv-keys <keyid(s)> Fetch the specified keyids"
msgstr ""
" -r, --receive <keyserver> <keyid(s)> Obtiene los keyids especificados"
msgid " -u, --updatedb Update the trustdb of pacman"
msgstr ""
msgstr " -u, --updatedb Actualizar la trustdb de pacman"
msgid " -v, --verify <signature> Verify the file specified by the signature"
msgstr ""
" -v, --verify <firma> Verifica el archivo especificado por la firma"
msgid " -V, --version Show program version"
msgstr ""
msgstr " -V, --version Muestra la versión del programa"
#, fuzzy
msgid ""
" --config <file> Use an alternate config file (instead of"
"\\n '%s')"
msgstr ""
" --config <arch> Usa un archivo de configuración alternativo (en vez de "
"'%s')"
" --config <archivo> Usa un archivo de configuración alternativo"
"\\n (en lugar de '%s')"
msgid ""
" --edit-key <keyid(s)> Present a menu for key management task on keyids"
msgstr ""
" --edit-key <keyid(s)> Muestra un menú para la administración de las\\n"
"\t\t\t claves en keyids"
msgid ""
" --gpgdir <dir> Set an alternate directory for GnuPG (instead"
"\\n of '%s')"
msgstr ""
" --gpgdir <dir> Configura un directorio alternativo para GnuPG"
"\\n (en lugar de '%s')"
msgid ""
" --import <dir(s)> Imports pubring.gpg and trustdb.gpg from dir(s)"
msgstr ""
" --import <dir(s)> Importa pubring.gpg y trustdb.gpg de dir(s)"
msgid ""
" --import-trustdb <dir(s)> Imports ownertrust values from trustdb.gpg in dir"
"(s)"
msgstr ""
" --import-trustdb <dir(s)> Importa los valores de confianza en los "
"propietarios\\n del trustdb.gpg de dir(s)"
msgid " --init Ensure the keyring is properly initialized"
msgstr ""
" --init Asegurarse de que el llavero está inicializado"
"\\n correctamente"
msgid " --list-sigs [<keyid(s)>] List keys and their signatures"
msgstr ""
msgid " --reload Reload the default keys"
msgstr ""
msgid "You do not have sufficient permissions to read the %s keyring..."
msgstr ""
msgid "Use '%s' to correct the keyring permissions."
msgstr ""
msgid "You do not have sufficient permissions to run this command..."
msgstr ""
msgid "Verifying official keys file signature..."
msgstr ""
msgid "The signature of file %s is not valid."
msgstr ""
msgid "Verifying deprecated keys file signature..."
msgstr ""
msgid "Verifying deleted keys file signature..."
msgstr ""
msgid "Appending official keys..."
msgstr ""
msgid "Appending deprecated keys..."
msgstr ""
msgid "Removing deleted keys from keyring..."
msgstr ""
msgid "Updating trust database..."
msgstr ""
msgid "You need to specify the keyserver and at least one key identifier"
msgstr ""
msgid "The key identified by %s does not exist"
msgstr ""
msgid "Cannot find the %s binary required for all %s operations."
msgstr ""
msgid "%s needs to be run as root for this operation."
msgid " --keyserver Specify a keyserver to use if necessary"
msgstr ""
#, fuzzy
msgid " --list-sigs [keyid(s)] List keys and their signatures"
msgstr " --list-sigs [<keyid(s)>] Muestra las claves y sus firmas"
#, fuzzy
msgid " --lsign-key <keyid> Locally sign the specified keyid"
msgstr " -d, --delete <keyid(s)> Elimina las keyids especificadas"
msgid ""
" --populate [keyring(s)] Reload the default keys from the (given) keyrings"
"\\n in '%s'"
msgstr ""
#, fuzzy
msgid ""
" --refresh-keys [keyid(s)] Update specified or all keys from a keyserver"
msgstr " -l, --list-keys [<keyid(s)>] Lista los keyids especificados o todos"
msgid "You do not have sufficient permissions to read the %s keyring..."
msgstr "No tiene permisos suficientes para leer el llavero %s..."
msgid "Use '%s' to correct the keyring permissions."
msgstr "Use '%s' para corregir los permisos del llavero."
msgid "You do not have sufficient permissions to run this command..."
msgstr "No tiene permisos suficientes para ejecutar este comando..."
msgid "There is no secret key available to sign with."
msgstr ""
msgid "Use '%s' to generate a default secret key."
msgstr ""
#, fuzzy
msgid "Verifying %s..."
msgstr "Añadiendo %s... "
msgid "File %s is unsigned, cannot continue."
msgstr ""
msgid "The signature of file %s is not valid."
msgstr "La firma del archivo %s no es válida."
#, fuzzy
msgid "Verifying keyring file signatures..."
msgstr "Verificando la firma del archivo de claves eliminadas..."
msgid "No keyring files exist in %s."
msgstr ""
#, fuzzy
msgid "The keyring file %s does not exist."
msgstr "La clave identificada por %s no existe"
#, fuzzy
msgid "Appending keys from %s.gpg..."
msgstr "Añadiendo claves oficiales..."
#, fuzzy
msgid "Locally signing trusted keys in keyring..."
msgstr "Quitando las claves eliminadas del llavero..."
msgid "Locally signing key %s..."
msgstr ""
#, fuzzy
msgid "Disabling revoked keys in keyring..."
msgstr "Quitando las claves eliminadas del llavero..."
#, fuzzy
msgid "Disabling key %s..."
msgstr "Empaquetando %s..."
msgid "The key identified by %s does not exist"
msgstr "La clave identificada por %s no existe"
msgid "Cannot find the %s binary required for all %s operations."
msgstr ""
"No se pudo encontrar el binario %s requerido para las operaciones de %s."
msgid "%s needs to be run as root for this operation."
msgstr "%s debe ser ejecutado como root para esta operación."
msgid "%s configuration file '%s' not found."
msgstr "No fue encontrado el archivo de repositorio '%s'."
msgstr "El archivo de configuración '%s' de %s no fue encontrado."
msgid "no operation specified (use -h for help)"
msgstr ""
msgstr "no se especificó ninguna operación (use -h para obtener ayuda)"
msgid "Multiple operations specified"
msgstr ""
msgstr "Se especificaron varias operaciones"
msgid "Please run %s with each operation separately\\n"
msgstr ""
msgstr "Por favor, ejecute %s con cada operación por separado\\n"
msgid "Updating trust database..."
msgstr "Actualizando la base de datos de claves en las que se confía..."
msgid ""
"pacman-optimize is a little hack that should improve the performance\\nof "
@@ -797,7 +888,7 @@ msgid "You must have correct permissions to optimize the database."
msgstr "Debes tener los permisos adecuados para optimizar la base de datos."
msgid "Can not create temp directory for database building."
msgstr ""
msgstr "No se pudo crear el directorio temporal para crear la base de datos."
msgid "MD5sum'ing the old database..."
msgstr "Calculando md5 de la base de datos antigua..."
@@ -879,7 +970,7 @@ msgid "Cannot find the xdelta3 binary! Is xdelta3 installed?"
msgstr "¡No se pudo encontrar el binario xdelta3! ¿xdelta3 está instalado?"
msgid "Usage: repo-add [options] <path-to-db> <package|delta> ...\\n"
msgstr ""
msgstr "Uso: repo-add [opciones] <ruta-a-la-bd> <paquete|delta> ...\\n"
msgid ""
"repo-add will update a package database by reading a package file."
@@ -890,16 +981,21 @@ msgstr ""
"\\n\\n"
msgid "Options:\\n"
msgstr ""
msgstr "Opciones:\\n"
msgid " -d, --delta generate and add delta for package update\\n"
msgstr ""
" -d, --delta genera y añade un diferencia para la actualización del"
"\\n paquete\\n"
msgid " -f, --files update database's file list\\n"
msgstr ""
" -f, --files actualiza la lista de archivos de la base de datos\\n"
msgid "Usage: repo-remove [options] <path-to-db> <packagename|delta> ...\\n\\n"
msgstr ""
"Uso: repo-remove [opciones] <ruta-a-la-bd> <nombre-del-paquete|delta> ...\\n"
"\\n"
msgid ""
"repo-remove will update a package database by removing the package name"
@@ -911,25 +1007,34 @@ msgstr ""
"eliminarse especificándolos en la línea de comandos.\\n\\n"
msgid " -q, --quiet minimize output\\n"
msgstr ""
msgstr " -q, --quiet reducir salida\\n"
msgid " -s, --sign sign database with GnuPG after update\\n"
msgstr ""
" -s, --sign firmar la base de datos con GnuPG tras la actualización"
"\\n"
msgid " -k, --key <key> use the specified key to sign the database\\n"
msgstr ""
" -k, --key <clave> usar la clave especificada para firmar la base de datos"
"\\n"
msgid " -v, --verify verify database's signature before update\\n"
msgstr ""
" -v, --verify verificar la firma de la base de datos antes de "
"actualizar\\n"
msgid ""
"\\nSee %s(8) for more details and descriptions of the available options.\\n"
"\\n"
msgstr ""
"\\nVea %s(8) para obtener más detalles y una descripción de las opciones"
"\\ndisponibles.\\n"
msgid ""
"Example: repo-add /path/to/repo.db.tar.gz pacman-3.0.0-1-i686.pkg.tar.gz"
msgstr ""
"Ejemplo: repo-add /ruta/al/repo.db.tar.gz pacman-3.0.0-1-i686.pkg.tar.gz"
msgid "Example: repo-remove /path/to/repo.db.tar.gz kernel26"
msgstr "Ejemplo: repo-remove /ruta/al/repo.db.tar.gz kernel26"
@@ -939,6 +1044,10 @@ msgid ""
"\\nThis is free software; see the source for copying conditions.\\nThere is "
"NO WARRANTY, to the extent permitted by law.\\n"
msgstr ""
"Copyright (c) 2006-2011 el equipo de desarrollo de pacman <pacman-"
"dev@archlinux.org>\\n\\nEsto es software libre; vea las fuentes para ver las "
"condiciones de copia.\\nNO HAY GARANTÍA, en la medida permitida por la ley."
"\\n"
msgid "No database entry for package '%s'."
msgstr "No hay registros en la base de datos para el paquete '%s'."
@@ -949,37 +1058,39 @@ msgstr "Agregando entradas 'diferenciales': %s -> %s"
msgid "Removing existing entry '%s'..."
msgstr "Quitando la entrada existente '%s'..."
#, fuzzy
msgid "Cannot find the gpg binary! Is GnuPG installed?"
msgstr "¡No se pudo encontrar el binario xdelta3! ¿xdelta3 está instalado?"
msgstr "¡No se pudo encontrar el binario gpg! ¿Está GnuPG instalado?"
msgid "Signing database..."
msgstr ""
msgstr "Firmando base de datos..."
msgid "Failed to sign package database."
msgstr ""
msgstr "Error al firmar la base de datos de paquetes."
msgid "Verifying database signature..."
msgstr ""
msgstr "Verificando la firma de la base de datos..."
msgid "No existing signature found, skipping verification."
msgstr ""
msgstr "No se encontró firma alguna, omitiendo verificación."
msgid "Database signature file verified."
msgstr ""
msgstr "Archivo de firma de la base de datos verificado."
msgid "Database signature was NOT valid!"
msgstr ""
msgstr "¡La firma de la base de datos NO era válida!"
msgid "'%s' does not have a valid archive extension."
msgstr "'%s' no tiene una extensión de archivo válida."
msgid "Computing checksums..."
msgstr ""
msgid "An entry for '%s' already existed"
msgstr "Una entrada para '%s' ya existía"
msgid "Computing checksums..."
msgstr "Calculando sumas de verificación..."
msgid "Adding package signature..."
msgstr "Añadiendo la firma al paquete..."
msgid "Creating '%s' db entry..."
msgstr "Creando entradas en la bd de '%s'"
@@ -1044,10 +1155,24 @@ msgid "No packages modified, nothing to do."
msgstr "No se modificaron paquetes, nada que hacer."
msgid "option %s requires an argument\\n"
msgstr ""
msgstr "la opción %s requiere un argumento\\n"
msgid "unrecognized option"
msgstr ""
msgstr "opción desconocida"
#~ msgid "permanent, catastrophic damage to your system. If you"
#~ msgstr "un daño catastrófico y permanente en su sistema. Si"
#~ msgid " --reload Reload the default keys"
#~ msgstr " --reload Recarga las claves por defecto"
#~ msgid "Verifying official keys file signature..."
#~ msgstr "Verificando la firma del archivo de claves oficiales..."
#~ msgid "Verifying deprecated keys file signature..."
#~ msgstr "Verificando la firma del archivo de claves obsoletas..."
#~ msgid "Appending deprecated keys..."
#~ msgstr "Añadiendo claves obsoletas..."
#~ msgid "You need to specify the keyserver and at least one key identifier"
#~ msgstr ""
#~ "Debe especificar el servidor de claves y al menos un identificador de "
#~ "clave"

Some files were not shown because too many files have changed in this diff Show More