Age | Commit message (Collapse) | Author |
|
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
When attempting to install a package (either via -S or -U) and the
signature is missing, the current error message "invalid or corrupted
package (PGP signature)" is very unclear. Instead inform the user
that the package is missing the required signature.
Partial fix for FS#34741.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
The previous implementation was overly complex with unnecessary checks
and nested conditionals. By reordering the tests and changing them to
all be checks for positive hash matches rather than non-matches, we can
collapse several cases and make the process much more linear. This
removes the need to set hash_orig = "" just to reach some of the checks
and corrects a faulty assumption that files are equivalent when the
hashing process fails.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
p1 and p2 both come directly from the upgrade list without being copied
so they can be compared directly instead of comparing their names.
Also fix minor style violation.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
We currently use the pacman version number in the libalpm.pc file. It makes
more sense to use the libalpm version.
Fixes FS#34967.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Remove a question that hasn't been used since the 3.0 days. To prevent
us from having an ugly enum of questions that is missing a bitmask, this
changes the API of the hidden --ask option.
Signed-off-by: Connor Behan <connor.behan@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Add details to the doxygen for the initialization and relase functions
of the library.
Signed-off-by: Richard Pougnet <richard@pougnet.ca>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Pull updates from transifex. Add new "id" translation. Regerate po
files with updated filelists...
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Be complete with files listed. Comment out files where code is used
or heavily based on other projects so will never have translatable
strings.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
I imported this translation from transifex without realising that there
was no strings translated despite being "acitve" on transifex for quite
some time. Remove it until translation begins...
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
We shouldn't assume a frontend program didn't explicitly set the LC_TIME
setting to a value not in the environment, which is what we previously
assumed. Save the old locale before forcing the 'C' locale and restore
it when we are done.
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Run update-po and fix the few errors reported.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Languages: eo, nl, hr, ko, ja, fa, ar, sl, gl, id
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Currently pacman either prints 'adding' or 'upgrading' when installing
a package. This make pacman print and log the other possible actions:
'downgrade' and 'reinstall'
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This also rearranges some code to ensure that declarations and code
aren't mixed.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Since 882bff36 literals would be searched before replacers, resulting in a
package being replaced by another not actually being replaced under certain
conditions (e.g. they're both in the same repo).
This change effectively reversed the expectations in test sync132. This patch
switches the order back to replacers first, thus making sure if a package is
replacing another one, the change will always happen, even if both are in the
same repo.
Note that a package replacing another one in a repo with higher priority will
not be done, see FS#11737 and test sync1105
Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
During a sysupgrade, if a package is replaced by another, and an update for the
former package is found (on another repo) the replaced package would be
re-installed.
Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Although technically correct, this results in my system taking ~30 seconds
to resolve all filelists when removing a package that has a directory not
owned by any package. The check for if any package own the empty directory
is a rare enough occurance, and it will be even rarer when that directory
has a directory symlink in its path, so just revert this at this stage.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
alpm_filelist_contains is listed in alpm.h and should be public but was
not exported.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Avoids the segfault seen in FS#33911.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Fix FS#31556 by printing filename instead of entryname. Thus,
removing a lot of confusion from the output.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Pacman currently bails when trying to extract a file over a directory
when using --force. Instead of ignoring all conflict, perform the
check and skip any file-file conflicts. Conflicts between directories
and files are still flagged and cause the transation to abort.
As a bonus, we now know about files changing packages when using
--force, so we can skip removing them fixing upgrade046.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
alpm_filelist_contains was being used to search for resolved paths, but
searching in the unresolved paths, causing it to miss matches. We
always search unresolved paths and search the resolved paths if
available because _alpm_filelist_resolve is not public and requires
a context handle, so it can't be called from alpm_filelist_contains.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
We were comparing files based on resolved paths but returning the
original file_t structures, which were not necessarily in the same
order. The extra file_t information was only being used to determine if
the file was a directory which can be accomplished by testing for
a trailing slash, so just return the resolved path.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
We were comparing files based on resolved paths but returning the
original file_t structures, which were not necessarily in the same
order. The additional file_t information was never used, so just return
the resolved path.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
alpm_filelist_intersection returns a list of pointers to internal file_t
struct's, so only the list itself should be freed.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
'/' should not be appended to the resolved root when root is "/".
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Arch Linux typically runs into this with /sys when upgrading the
filesystem package in build chroots, but LXC users might also run into
this, since their /sys is shared from the host and must, for security
reasons, be mounted RO.
I've neglected to add any tests for this because they would require root
in order to run. Current tests all pass with this patch and I've
confirmed the desired behavior in a VM. Incidentally, the first hunk of
this patch (skipping can_remove_file checks for directories) resolves the
case of API mountpoints being removed since they eventually fall into
unlink_file and fail with "contains files". However, this patch should
still be the Right Thing To Do™, as we can't possibly remove a directory
that is also a mountpoint.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
[Allan] Do not skip checking if directories can be removed. Instead test
if directories are mountpoints in can_remove_file.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
We record whether the default SigLevel is set in order to add upon
it for the *FileSigLevel entries. When using the only valid value
of "SigLevel = Never" with non-gpgme builds, we need to ignore
the ALPM_SIG_PACKAGE_SET flag when determining if we have a valid
value for the database SigLevel.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Fixes all clang warnings with -Wformat-literal.
Also, fix genuine formating issue discovered once adding these attributes
and add a cast to prevent a gcc warning.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This also lead me to notice that in _alpm_gpgme_checksig many things
were not being cleaned up. Fix this by having CHECK_ERR goto gpg_error
and make the required adjustments.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
When installing a package with "pacman -U" that has a detached
signature, check if the needed key is in the keyring and download
if necessary.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Offer to remove the bad package when a signature fails to validate
as is done for checksum failures.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Now that the keyring is checked for all needed keys before the
validation, we can not reach a point of a missing key when doing
validity checks for sync operations.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Keys used to create signatures are checked for presence in the keyring
before package validation is performed.
Signed-off-by: Allan McRae <allan@archlinux.org>
Conflicts:
lib/libalpm/alpm.h
Signed-off-by: Allan McRae <allan@archlinux.org>
|