Age | Commit message (Collapse) | Author | Files | Lines |
|
This new option works in both dpkg and dpkg-statoverride. And dpkg will
pass it to its children, which means dpkg-statoverride called from a
maintainer script will automatically pick it up.
Ref: #811037
|
|
Deprecate --force option which will be considered an alias for
--force-all for now.
|
|
|
|
This will make it possible for third-party tools, and also for other
dpkg tools to have access to the force options specified for dpkg.
Closes: #666147
|
|
|
|
|
|
This makes it easier to generalize to be used by other modules with
different force options, and to operate on the force options.
|
|
This will make it possible to reason more easily about what is
getting enabled.
|
|
We will be using the same logic for other commands.
|
|
This unifies all force related code in a single file, and will make it
possible to use it in other programs.
|
|
We do not really need to normalize the return code, which was confusing
the cppcheck for which we required a supression.
|
|
The wrapper function should be generic, so leaking this SELinux specific
detail there is just wrong.
|
|
This makes the tar extractor track and report back parse errors, so that
we can give more descriptive messages.
|
|
These are handling a package hash, and db seems to imply some kind of
on-disk storage. Rename the pkgiterator too to pkg_hash_iter to make it
consistent.
|
|
|
|
|
|
This makes it easier to guarantee we use the correct size for the
involved variable.
|
|
Warned-by: cppcheck
|
|
|
|
|
|
The introduction of dependency satisfiability for trigger processing,
which was in the original spec but not the implementation, there has
been countless problems with bogus detection of trigger cycles.
The problem is that whenever we try to process triggers for a package,
we might not be able to due to dependency unsatisfiaiblity, which means
we have to put the package back into the queue. If we add the state into
the cycle detection tracker, then multiple visits to these packages will
hit the cycle detection for artificially generated cycles. But we cannot
avoid performing the checks because that will miss dynamic cycles coming
from maintainer scripts, for example.
To avoid most of these problems (while possibly not fixing all potential
ones), we should delay trigger processsing entirely until we have
emptied the processing queue as much as possible. We do that by
introducing a new dependency try level, after the dependency cycle
breaking one.
We will also make the trigger cycle detection unconditional of the
dependency try, because for the trigproc try-queued it will not matter
anymore as we will only ented on higher dependency tries, and for the
other trigproc types we should not care about any queue-specific
dependency try level.
Closes: #810724, #854478, #911620
|
|
We should only reset the cycle detection in case we are not bailing out
from the processing with an error, otherwise we could come back to this
package and detect an artificial trigger cycle.
|
|
This makes the code stop skipping unsatisfiable dependency checks.
|
|
Each of these reasons for processing triggers have different requirements
and attributes:
- The required one, must perform all checks as it is done as part of a
simple loop to guarantee Pre-Depends satisfiability.
- The try-deferred one, must not fail on unsatisfiable dependencies, as
we are doing opportunistic trigger processing, after a normal
processing queue run.
- The try-queued one, must perform all checks and fail hard if any
unsatisfiable scenario occurs.
|
|
We should not leave the package that could be used to make progress by
way of trigger processing in this variable, because it might not have
its dependencies satisfied, which means we'll be trying to process it on
every next loop, and get into artificialy detected trigger cycles.
|
|
This moves the description closer to the type defining its values, which
makes more sense than in the configure function.
|
|
Thiw makes the code way easier to understand as there no magic numbers
anymore. It will also make it trivial to add new levels in-between.
|
|
Once we are giving up on a package that we will stop processing, we need
to mark it as PKG_ISTOBE_NORMAL so that the dependency checks know they
cannot expect this package to be processed anymore. Otherwise we might
end up never detecting that we are not making progress, as we expect to
process this package at a later point, when that will never happen
anymore. This then would end up causing asserts in the process queue
loop.
Closes: #901127, #910819
|
|
|
|
Assign hare->next to hare instead of using the temporary variable, so
that it's quicker to spot as an iterator assignment.
|
|
Initialize the next member when we are allocating the struct.
|
|
Makes its usage more obvious.
|
|
This makes it possible to disable any pager usage from these programs.
For dpkg this also becomes a configuration option.
Closes: #909754
|
|
Let's just handle opening the file and passing its data to the pager
ourselves, as that gives us more control, and then can decide not to
run a pager at all, and do not need to mess with arguments which might
need to be passed to «sh -c».
|
|
This makes it possible to use alternative installation directories.
And will make these commands honor those directories when specified
for dpkg, and passed down to the maintainer script via the DPKG_ROOT
environment variable.
|
|
Ignore EPERM for chown and chmod based syscalls. And give a more
meaningful error message on chroot().
Closes: #614126
|
|
When not passing any argument these commands will dump the entire
database. This way external programs will have a proper public
interface to get all package records, even when there are unmerged
journal entries.
Closes: #616342
|
|
|
|
Do not flush the output on each entry output, instead wait until we have
finished to flush it all out. This should speed up the output.
|
|
Fixes: commit 44b0bf1a576e3b0cfcb4c87f18d4195c3ffccb8f
|
|
The current code, checks whether we are running on a terminal, and then
truncates the output fields so that it can fit within. This causes data
loss and can confuse the user depending where the cut point has happened.
Instead we remove that logic, and always redirect the outout through a
pager in case we are running on a terminal, which gives full information
and does not necessarily emit ugly output.
Closes: #898603
|
|
Use it instead of open-coding it, or piping it via a shell invocation,
which required metacharacter escaping.
|
|
We also namespace the pager function with the module name.
|
|
|
|
We separate the function in one that takes one callback, and another
that takes two. This simplifies most of the call sites which only need
one callback.
|
|
We only need the device and inode numbers for a given file to be able to
compare them for identity. Avoid storing the entire struct stat which is
rather fat.
|
|
This will prepare the ground for external programs to start using
libdpkg to access the dpkg fsys database via a proper API, instead
of messing with the on-disk layout in so many improper ways.
|
|
This is not really part of the fsys db handling, and we are not
making use of it anymore in it, so let's move it somewhere else
more appropriate.
|
|
This will make it possible to move the fsys database parsing and dumping
code out from dpkg into libdpkg.
This is general package information, even if some clients might not be
interested in its contents, such as frontends that just manage metadata
and drive dpkg itself.
|
|
For functions that are supposed to just check the state of a package in
a read-only way, make sure the clientdata is allocated, instead of just
calling ensure_package_clientdata().
|