Age | Commit message (Collapse) | Author |
|
Declaring the variable as local on the same line as the assignment
results in result of the assignment being returned rather than the
result of the function on the righthand side of the assignment.
Declaring the variable as local on a separate line means the result
of the function on the r.h.s. is returned and our error function
will be invoked if necessary (although it is practically impossible
to ever trigger it...).
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Simplify the source tarball generation by unifying the handling of
local and remote files. This also allows local files to be found
in $SRCDEST (FS#26580) and makepkg will abort on missing local source
files (only possible to trigger in combination with --skipinteg).
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We don't need two log messages back-to-back about the same thing here.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
PGP keyservers are pieces of sh** when it comes to searching for
subkeys, and only allow it if you submit an 8-character fingerprint
rather than the recommended and less chance of collision 16-character
fingerprint.
Add a second remote lookup for the 8-character version of a key ID if we
don't find anything the first time we look up the key. This fixes
FS#27612 and the deficiency has been sent upstream to the GnuPG users
mailing list as well.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Add 1 failing for the -Su case, and the same case using -S (and
passing).
This is based on a real (current) issue of upgrading staging chroots
with the new pacman in staging for a libarchive build, and a new
toolchain in testing.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Commit 43cad9c8 made the building of all docs depend on the Makefile.
However, the Makefile is generated after running ./configure so is
always newer than any pregenerated docs. This means that people
building from released pacman tarballs are forced to rebuild the
docs (and thus have asciidoc installed). That defeats the purpose
of prebuilding the documentation. Have the documentatin depends on
Makefile.am instead as this is probably what was intended.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Timothy Redaelli <timothy.redaelli@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Pacman assumes that the final character of a line specifing a repo
in pacman.conf is a "]". But it did not clean whitespace from the
line after removing any comments. So lines like:
[allanbrokeit] # could break system
caused pacman not to recognize the repo. Adjust config parsing to
strip comments before trimming whitespace from the end of the string.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
If CDPATH is set, this could possibly write to stdout.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
pacsysclean sort installed packages by decreasing installed size. It's
useful for finding large unused package when doing system clean-up. This
script is an improved version of other similar scripts posted on the
forums. Thanks goes to Dan for fixing and improving my original script.
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We were using the size of a pointer, not the size of the whole
archive_read_buffer struct. Thanks to Clang/LLVM 3.0 and Allan/Dave in
IRC for finding this one.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This prevents user error in adding a file generated via `gpg --sign`
rather than `--detach-sign`, for example. The same 16KiB limit is used
we use in our pacman download code.
The section is moved above the checksum generation to avoid presenting
info messages to the user if the signature isn't valid.
Addresses a shortcoming pointed out in FS#27453.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We had a 16 KiB limit on database signatures, we should do the same here
too to have a slight sanity check, even if we can't do so for the
package itself yet.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Be consistent with all other contrib scripts and support the "--help"
command line switch. Fixes FS#27258.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Whereas comm will check inputs to see if they're sorted (and warn when
they aren't), grep doesn't even care about ordering. In this particular
instance -- neither do we. We're only interested that the two lists are
equivalent.
Fixes FS#26580.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Both currently marked as failing.
* sync303.py encapsulates the broken behavior reported in FS#27214.
* sync304.py shows how packages depending on a specific version of a
package in SyncFirst can cause breakage of the dependency resolver.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Some late-arriving translation updates and add the correct dates to the
index.txt releases table.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
* Add last-minute changes to NEWS
* Don't treat '_' or '_n' special in scripts when finding translatable
strings; this breaks with one use of `read` and a dummy _ variable
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This applies to pkgver, pkgrel, and epoch and ensures that any trailing
whitespace outside of the context of the variable declaration itself is
properly trimmed. The Bash parser will ignore this, and so should we.
We don't need to worry about leading space because it would force a
syntax error, or fail validation.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Fixes FS#26806.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
When doing a bare -U operation on a local package that doesn't pull in
any dependencies from the sync databases, we can get away with missing
database files. This makes the check conditional on no sync targets
found in the target list. This is not the prettiest code here so we have
a bit of hackish behavior required to straighten both the behavior and
the nonsensical error message out.
Addresses FS#26899.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Commit e7b56f48 allowed makepkg to handle pgp signatures with the
.sign extension. Update the man page to reflect this.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Bump the version, update the translation template files, and fill in
NEWS with relevant commits and changes since 4.0.0.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This prevent bsdtar from exploding when install= or changelog= are
present without a value.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Detached sgnature files with extension .sign are accepted by gnupg.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Allan's original message: Occasionally when the download rate showed
100.0 the output got messed up. This was caused by the rounding of a
number between 99.95 and 100. Adjust the threshold to avoid this
rounding issue.
Dan: make this fix, but also show values between 0 and 9.995 with two
decimal places since we have the room.
Original-fix-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
The point of this early compare to NULL byte check was so we could bail
early and skip the strcmp() call. Given we weren't doing the check
right, this never exited early. Fix it to work as intended.
Noticed-by: Pepe Juárez <trulustapa@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This seems to fix FS#26652.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Replacing the strdup when after the first NULL check assures that we get
continue with payload->remote_name defined.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Dan: fix mask calculation, add it to the success/fail block instead.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This takes the place of three previously used constants:
ARCHIVE_DEFAULT_BYTES_PER_BLOCK, BUFFER_SIZE, and CPBUFSIZE.
In libarchive 3.0, the first constant will be no more, so we can ensure
we are forward-compatible by removing our usage of it now. The rest are
unified for consistency.
By default, we will use the value of BUFSIZ provided by <stdio.h>, which
is 8192 on Linux. If that is undefined, a default value is provided.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
Doesn't do a whole lot of good to compare against values that are never
set. Fixes bug where -vvv output wasn't grouping packages together
properly.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
|
|
There aretwo seperate issues in the same block of file conflict
checking code here:
1) If realpath errored, such as when a symlink was broken, we would call
'continue' rather than simply exit this particular method of
resolution. This was likely just a copy-paste mistake as the previous
resolving steps all use loops where continue makes sense. Refactor
the check so we only proceed if realpath is successful, and continue
with the rest of the checks either way.
2) The real problem this code was trying to solve was canonicalizing
path component (e.g., directory) symlinks. The final component, if
not a directory, should not be handled at all in this loop. Add a
!S_ISLNK() condition to the loop so we only call this for real files.
There are few other small cleanups to the debug messages that I made
while debugging this problem- we don't need to keep printing the file
name, and ensure every block that sets resolved_conflict to true prints
a debug message so we know how it was resolved.
This fixes the expected failures from symlink010.py and symlink011.py,
while still ensuring the fix for fileconflict007.py works.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
These should all prevent installation, and yet two of the three tests
currently fail. Not good.
The best way to see what is going on here is to diff the three new tests
side by side- there is only a small difference between the three tests,
and that is in the destination of the symlink in question that should
never be overwritten.
symlink010.py: myprogsuffix -> myprog
symlink011.py: myprogsuffix -> broken
symlink012.py: myprogsuffix -> otherprog
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
There is some pecular behavior going on here when a package is loaded
that has no files, as is very common in our test suite. When we enter
the realloc/sort code, a package without files will call the following:
files = realloc(NULL, 0);
One would assume this is a no-op, returning a NULL pointer, but that is
not the case and valgrind later reports we are leaking memory. Fix the
whole thing by skipping the reallocation and sort steps if the pointer
is NULL, as we have nothing to do.
Note that the package still gets marked as 'files loaded', becuase
although there were none, we tried and were successful.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Extend the return values of compute_download_size to allow callers to
know that a .part file exists for the package.
This extra value isn't currently used, but it'll be needed later on.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
The fix for -Wl,--as-needed in commit b0f9477f assumes that
--as-needed/--no-as-needed is the only option given in a -Wl line.
However, it is perfectly valid to specify multiple flags comma
separated after a single -Wl (e.g. the default LDFLAGS in Arch
Linux makepkg.conf).
Adjust the fix so it detect --as-needed in a more general context
> readelf -d lib/libalpm/.libs/libalpm.so.?.?.? | grep NEEDED | wc -l
Before: 13
After: 5
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Update for libtool-2.4.2 while keeping the fix for --as-needed from
commit b0f9477f.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This adds a logger to the CURLE_OK case so we can always know the return
code if it was >= 400, and debug log it regardless. Also adjust another
logger to use the cURL error message directly, as well as use fstat()
when we have an open file handle rather than stat().
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
pkgrel, as with pkgver, simply mustn't contain hyphens.
Signed-off-by: lolilolicon <lolilolicon@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|