Age | Commit message (Collapse) | Author |
|
And extract all the common code to a macro.
Signed-off-by: morganamilo <morganamilo@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Rather than use M/s which can be either MB or MiB, specify that it uses
MiB (consistent with the displayed total size).
Fixes FS#59201
Signed-off-by: Sever Oraz <severoraz@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Requires modification to our comment about fall through to match compilers
expectations. Works for GCC and Clang.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: morganamilo <morganamilo@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
List all available updates in -Qu output, but include [ignored] beside
those that will not be updated in a -Su operation due to thier repo Usage
value (in addition to those that are Ignored).
Fixes FS#59854.
The following people provided initial patches to print [ignored] on -Qu
operations, which highlighted a larger problem to be fixed first:
With-thanks-to: morganamilo <morganamilo@gmail.com>
With-thanks-to: Michael Straube <michael.straube@posteo.de>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
The behaviour of "pacman -Qu" was very strange... It would only consider
packages from repos with Usage = Search (or All), and ignore those with
Usage = Sync, Install or Upgrade.
This is because the function alpm_sync_newversion() used ALPM_DB_USAGE_SEARCH
for its filtering. Given this function is documented (at least in the source)
to "Check for new version of pkg in sync repos", I would expect that to look at
all repos. However, just changing this parameter, would result in a fairly
silent change in behaviour of this function. Instead, rename the function
and remove this filtering altogether. Users of this function can filter
the dbs passed to this function to achieve their desired output.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
sync:
As pointed out by Andrew Gregory there could be an error when adding
duplicates if they are two separate packages with the same name. Add a
check in alpm_add_pkg() to test whether the duplicate is actually the
same package, and if so, log a debug message and return success to skip
the package. If the duplicate is a different package return
ALPM_ERR_TRANS_DUP_TARGET and treat that error just like any other error
in pacman.
remove:
Change alpm_remove_pkg() to just log a debug message and return success
to skip duplicates. Remove the handling of ALPM_ERR_TRANS_DUP_TARGET in
pacman.
Also fixes FS#49377.
Suggested-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Michael Straube <michael.straube@posteo.de>
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>
|
|
Provide both build systems in parallel for now, to ensure that we work
out all the differences between the two. Some time from now, we'll give
up on autotools.
Meson tends to be faster and probably easier to read/maintain. On my
machine, the full meson configure+build+install takes a little under
half as long as a similar autotools-based invocation.
Building with meson is a two step process. First, configure the build:
meson build
Then, compile the project:
ninja -C build
There's some mild differences in functionality between meson and
autotools. specifically:
1) No singular update-po target. meson only generates individual
update-po targets for each textdomain (of which we have 3). To make
this easier, there's a build-aux/update-po script which finds all
update-po targets and runs them.
2) No 'make dist' equivalent. Just run 'git archive' to generate a
suitable tarball for distribution.
|
|
Currently when attempting to sync a group where all packages are
ignored, either by ignorepkg, ignoregroup or --needed, pacman
will error with "target not found".
Instead, if a group has no packages check if the group exists
before throwing an error.
Signed-off-by: morganamilo <morganamilo@gmail.com>
|
|
When doing "pacman -Fs", show the "(groupname)"
message just like "pacman -Ss".
And refactor group printing to its own function.
Signed-off-by: morganamilo <morganamilo@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Fixes FS#60106
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: morganamilo <morganamilo@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
When doing "pacman -Fs", show the "[installed: version]"
message just like "pacman -Ss".
Signed-off-by: morganamilo <morganamilo@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>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
The use of --sysroot in the real world has flagged some issues that need
addressing. Undeprecate --root for now.
This reverts commit a278356f75866f89232e3e6230bbf9fb2dc1893c.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
pacman-conf returned All for any repo Usage query because it was
checking if any repo options were enabled rather than if all options
were enabled.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Also remove any translations that are less than 75% complete. These will
be readded once translation completion passes our minimum threshold.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Many of these are pointless (e.g. there is no need to explicitly turn on
spellchecking and language dictionaries for the manpages by default).
The only useful modelines are the ones enforcing the project coding
standards for indentation style (and "maybe" filetype/syntax, but
everything except the asciidoc manpages and makepkg.conf is already
autodetected), and indent style can be applied more easily with
.editorconfig
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
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 all files to the relevant POTFILES.in. This avoids missing
translations added to old files.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This prevents a valgrind warning from deep inside wcstombs.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
make update-copyright OLD=2017 NEW=201
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Query operations act on the local db, not the filesystem. Also, a
valid use case for -Qo is to discover what package owns a deleted file
so it can be reinstalled.
Closes FS#55856.
Signed-off-by: Ivy Foster <iff@escondida.tk>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
S_ISDIR is int and "returns non-zero" if the file is a directory.
Signed-off-by: Ivy Foster <iff@escondida.tk>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
The --root option was widely misunderstood, and is now replaced by
--sysroot.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Fixes FS#49093
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Parsing pacman's configuration file is non-trivial and extremely
difficult to do correctly from scripts; even our own do it incorrectly.
pacman-conf is a dedicated tool specifically to allow scripts to parse
config files, getting the same value that pacman itself would use.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Default values for configuration settings were being set during alpm
setup and in some cases were never saved back to the original config
struct. Refactoring all default settings into a separate function and
saving them onto the original config struct will allow pacman-conf to
resolve the defaults without having to setup alpm.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
To allow pacman-conf to parse the configuration file without having to
also setup alpm.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Passing an empty string to pacman -Qo results in:
error: No package owns <first directory in $PATH>
Catch empty strings and report an error.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
I think two ways to ask for this are enough for everyone, and we have
never documented this anyway.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Add missing braces to some one-line if blocks.
Signed-off-by: Michael Straube <straubem@gmx.de>
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>
|
|
This is primarily to help users who are not aware that -F operations use
a separate set of databases that need to be separately downloaded.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
snprintf prints at most n bytes including the terminating '\0'. The
extra reserved byte was never being used.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
gcc7 issues a warning about a potential overflow if left unchecked.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Copying a string into a buffer that has just been determined to not be
able to hold it is obviously incorrect. The actual error handling
appears to have been unintentionally removed in
47762ab687959e48acc2de8592fcf3ba3cfa502b.
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>
|
|
--root is not sufficient to properly operate on a mounted guest system.
Using --root still uses the host system's configuration and there is no
way to correctly use the guest configuration without manually modifying
any Include directives. --sysroot provides an easier way to operate on
a guest system by chrooting immediately after option parsing before
configuration parsing or performing any operations. It is currently
limited to the root user, but that's enough for restoring a guest system
to a working state, which is the primary intended use case.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
--force is widely misunderstood and the same effect can now be achieved
with --overwrite, which is better named and can be used more safely.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|