Age | Commit message (Collapse) | Author | Files | Lines |
|
Unify the formatting of the --help switch for pacman utils, if it exists.
All of the pacman utils will now output help text using the following
format:
util-name (pacman) v<pacman version>
one line description of util's purpose
Usage: util-name [options]
-b, --bar whatever --bar does
-f, --foo whatever --foo does
-h, --help display this help message
Reported-by: Karol Błażewicz <karol.blazewicz at gmail.com>
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
|
|
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This commit:
-- replaces space-based indents with tabs per the coding standards
-- removes extraneous whitespace (e.g. extra spaces between function args)
-- adds missing braces for a one-line if statement
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
|
|
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This ensures that important events will be logged and consistent
regardless of the frontend. The need for global context in the event
callback is also removed. The event is logged before any post_* scripts
run, so this also moves the post_* script output underneath the event in
the log.
Fixes FS#36504
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Self-executing tests were not being run through the tap log driver.
This caused `make check` to ignore discrepancies between the expected
number of tests and the actual number of tests.
Also, fix some uncommented output from test scripts that could confuse
TAP parsers.
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>
|
|
The extract_sources function should be just extracting sources.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
The call to bsdtar to check if a file needs extracted returns 1 if it does
not. We then propegate this return value accidentally which can cause
makepkg to report an error later on. Explicitly return 0 in this case.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
There was a brief window between opening the file descriptor and
creating a stream to it. If the process was interrupted during that
window the lock file would not be removed correctly.
The pid is no longer printed to the lock file as this was virtually
meaningless for lock files on NFS.
Fixes FS#35603
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This brings file siglevels in line with how db siglevels are handled.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This reverts a portion of 86eefc1a3a341.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
It is fairly common that packages contain static libraries with no
shared counterpart. These should not be removed with !staticlibs.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
remote was being used to loop over itself, making the FREELIST
ineffective.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Improves consistency and makes it clear that targs will be modified by
_alpm_recursedeps.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
getopt_long returns -1 when it has finished parsing all args. A return
value of 0 indicates that a flag was set directly by getopt_long and
parsing should continue.
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>
|
|
It appears there are a lot of packages with arch=('i686 x86_64')
floating around. Quote the arch array when passing as a parameter
to detect such things.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
I've tracked this back to e223366 and it looks like this just forces KiB
because back then humanize_size didn't exist, but the size was just
divided by 1024 to keep it somewhat readable. When humanize_size got
introduced in 3c8a448 this was just carried over.
The unit detected for "Download Size" is reused for "Installed Size" to
make it easier to read.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
If someone gives the pacman binary setuid permissions, the geteuid check
allows it to start running but subsequently fail. As we do not support
setting pacman setuid, use getuid to check permissions instead.
FS#37174.
Signed-off-by: Vladimir A. Nazarenko <naszar@ya.ru>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This allows existing front-ends other than pacman to continue working
normally.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Necessary for metapackages.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Detecting indirect dependencies by traversing a package's entire
dependency tree is prohibitively slow for larger transactions. Instead
add local packages to the dependency graph. This additionally requires
delaying dependency ordering for sync operations so that removed
packages may be excluded from dependency detection.
tests/sync012.py was also updated to ensure that the dependency cycle
was actually detected.
Fixes FS#37380
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Add "[ignored]" in the "pacman -Qu" output after packages that have their
upgrades ignored.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This function is useful for frontends to annotate package upgrades
that will be ignored.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Detail the current standard of generating two databases - with and
without the file list.
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>
|
|
These are useful for frontends.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Validate the new pkgver efore blindly ramming it into the PKGBUILD.
This gives us good feedback and prevents corrupting the PKGBUILD, e.g.
==> Starting pkgver()...
==> ERROR: pkgver is not allowed to contain colons, hyphens or whitespace.
==> ERROR: pkgver() generated an invalid version: a horse is not a pkgver
As an additional failsafe, exchange a valid for invalid character as
command separator in @SEDINPLACE@ expressions. For even more paranoia,
exit if sed fails for any reason.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Currently you can manually create and then install a package with a
version not containing a pkgrel. The created local database entry is
invalid as the directory name can not be split by _alpm_splitname due
to the assumtion of hyphens separating name-pkgver-pkgrel.
Ensure the package has a valid version when it is loaded. Fixes FS#35514.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
After updating the pkgver, we still need to safely source the BUILDFILE.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
FS#35936
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Most of the redundant "cd $srcdir" in the prototypes were removed in commit
5f80d7af. Fix the rest.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
On 32bit systems, the progress bar intergrity checking can show values
greater than 100% with large transactions. This is due to the total
size of all package files being greater than a size_t. Use uint64_t
for these sizes.
Fixes FS#36608
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
[Allan: Adjust wording due to remove al license warning]
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
$ ./autogen.sh
./autogen.sh: 3: ./autogen.sh: BASH_SOURCE: parameter not set
The -u flag causes this (and lots of other mysterious problems). Since
there aren't even any variables in this script, it makes no sense to
use it.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
If any package in a sync transaction is missing a required signature,
we give an uninformative error message (which may or may not state that
the missing signature is the issue). Always output the package with
the missing signature.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Function pointer gets uselessly compared for NULL in
every iteration. Move the condition to do it just once.
Signed-off-by: slavomir vlcek <svlc@inventati.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Reported by 2to3: optional in Python 2, but required in 3.
Signed-off-by: Jeremy Heiner <ScalaProtractor@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Reported by 2to3. Python 3 throws out the old range, renames the old
xrange to be the new range, leaving no xrange. A shim could be used,
but using the less efficient version does not have a noticeable impact
on the run time. This observed (lack of an) effect is as described in
the Python 2 docs for xrange. The largest range created is only 1000
elements big, and the memory cost of those ranges is negligible when
compared to that of all the pmpkg instances created.
Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
The .items, .keys, and .values methods in Python 2 make copies, so the
test framework uses the .iter* flavors of those methods. But in Python
3 those .iter* (and even the 2.7 .view*) flavors are removed and the
original methods return views.
Measurements were taken under Python2 to see what impact the copying
had, and there was none. Thus it is not worth the effort to avoid.
Reported as a compatibility issue by 2to3.
Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
Reported as a compatibility issue by 2to3.
Signed-off-by: Jeremy Heiner <ScalaProtractor@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
This was the only compatibility issue reported by "python2 -3".
Signed-off-by: Jeremy Heiner <ScalaProtractor at gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|