| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
Opens the test file(s), test output, and any log files in the test
environment in an editor after the tests run for review. Simplifies
debugging tests by avoiding the need to use --keep-root and manually
opening the relevant files. The editor used can be set with --editor or
$EDITOR, falling back to vim.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When replacing a file with a directory, any files under that directory
do not need to be checked for conflicts. This prevents possible
false-positive conflicts where the file being replaced is a symlink.
We were already skipping the directory children when the file was owned
by the previous version of a package being upgraded. This extends that
to other packages being removed.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Some database files (install, mtree, and changelog) are extracted
directly from the package, but DBONLY was skipping extraction
altogether, causing those files to be missing after the transaction.
Fixes #52052
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>
|
|
|
|
|
|
|
| |
Also add pactest which captures this leak when run under valgrind.
Reported-by: Sergey Petrenko
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cyclic dependencies (A depends on B, B depends on A) were not selected
because neither package could be removed individually, so
can_remove_package would always return false for both. By preselecting
all dependencies then filtering back out any dependencies still required
by any packages that will not be uninstalled, groups of unneeded cyclic
dependencies can be found.
Fixes FS#41031
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
When printing a list of URLs of packages to be updated, pacman was ignoring any
replacements that would be made in the update process.
Fixes FS#35812
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Relying on localdb to determine which trigger operations should match is
completely broken for PostTransaction hooks because the localdb has
already been updated. Store a copy of the old version of any packages
being updated to use instead.
Fixes FS#47996
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Check if we overwrote an exiting pacnew file before unlinking it.
Otherwise, updating to a version with an unchanged file would delete
existing pacnew files.
FS#47993
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test introduced herein illustrates a behavior that may be unexpected
to package writers.
It creates a package "pkg3" that is configured to depend on a
"dependency" which version is between 3 and 4, inclusive. Two other
packages are already present, providing "dependency" in version 2 and 5,
respectively. So, the situation looks roughly like this:
pkg1 pkg3 pkg2
provides depends on provides
| <------------> |
version __________2____________3____________4____________5___________...
This seems to be enough to satisfy pacman when installing "pkg3". From
an iterative standpoint, this is completely logical: First, the
requirement "dependency>=3" is checked. There is a package that
satisfies this restriction, it is called "pkg2". Afterwards,
"dependency<=4" is covered in the same way by "pkg1".
Nonetheless, what a package writer intends when specifying
depends=('dependency>=3' 'dependency<=4')
is most probably that pacman should only allow this package to be
installed when there indeed is a package present that provides a version
of "dependency" that lies _between_ 3 and 5.
Signed-off-by: Dominik Fischer <d dot f dot fischer at web dot de>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
| |
make update-copyright OLD=2015 NEW=2016
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
|
| |
When replacing a file with a directory, any files inside the new
directory cannot possibly exist on the filesystem and can be skipped.
This allows cross-package symlink-to-directory transitions when there
are files with the same name under both the symlinked directory and the
new directory.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
When a symlink to a directory is changing to a directory, any package file
inside the new directory can create an unexpected conflict with the filesystem.
Reported by Neofytos and Luca from Chakra.
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>
|
|
|
|
|
|
|
| |
Newlines clutter tap output and can potentially confuse TAP parsers.
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: 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: Allan McRae <allan@archlinux.org>
|
|
|
|
|
| |
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
Paths from noupgrade, the transaction skip_remove, and package backup
lists were combined into a single list matched using fnmatch causing
paths with glob characters to match unrelated files.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
LIBCURL was never set in the Makefile so XferCommand was always being
set in the test file. This removes the only substitution in our test
files which will prevent the TESTS file from being rebuilt every time
configure is run.
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>
|
|/
|
|
|
|
|
|
| |
Leave user files in place and save new config files with a .pacnew
extension. This reduces the complexity of file extraction and respects
the principle that pacman shouldn't modify files it didn't create.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a cmd property to tests (defaults to pacman) which is resolved
using directories specified with --bindir (defaults to PATH). The
ability to manually specify a particular binary is preserved in order to
allow running individual tests with differently named binaries such as
lt-pacman.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
--confirm cancels the effect of a previous --noconfirm.
This makes it easier for scripts to default to --noconfirm
but allow users to override it.
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>
|
|
|
|
|
|
|
|
|
| |
This prevents an exception in the event backup entries are not in the
correct format and brings the test in line with alpm's backup parsing
which splits on the last tab rather than the first.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
| |
Needed for checking directories with PKG_FILES.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
| |
This allows to ignore specific dependencies.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
|
|
|
|
|
|
|
| |
When we check the database version directly, there is no longer a
need to scan for depends files.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
| |
If a user manually creates the local database directory, or has an empty
local database for some other reason, we silently add a version file
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
| |
The version of the local pacman database is stored in its root in the file
ALPM_DB_VERSION. The version is starting at 9, corresponding to the
next libalpm library version.
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
The actual test object is only used to run the test. Storing test cases
as strings limits the test object scope and allows it to be garbage
collected, reducing memory usage when multiple tests are run.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
Only a few of our tests need file snapshots at all and most of them only
need a few files. Taking snapshots of the entire test environment for
every single test is a massive waste.
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>
|
|
|
|
|
|
|
|
|
|
| |
If a directory has been replaced by a symlink, -Qk currently stats the
symlink target rather than the symlink itself and doesn't check that the
actual file type matches the package file list. This will make it
difficult to discover errors once 4.2 is released and replacing
directories with symlinks is no longer supported.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
|
|
|
|
|
| |
Setting up the temporary directory and environment is pointless if there
are no tests to run.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Using fakeroot or fakechroot as the command with subprocess.call
prevents the detection and reporting of a missing pacman binary. Some
tests even pass when run with a non-existent binary. Checking manually
allows us to provide a meaningful error message and prevent the false
positives.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
|
|
| |
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
|
|
|
|
|
| |
This test currently fails.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
| |
Matches the behavior for sync packages.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
|
| |
glob() returns an empty list if input does not match any files, causing
non-existent test files to be silently skipped. Treating arguments as
files causes pactest to immediately bail out with an appropriate error
message on non-existent files.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|
|
|
|
|
|
|
|
|
| |
"Always" is not a valid siglevel. sign002.py was succeeding because
pacman failed to parse the resulting config file rather than a failed
signature check.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
|