Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Initialize the lockfile on modstatdb_init() via the fnis array. Make
sure we call modstatdb_init() and modstatdb_done() in case we are not
calling modstatdb_open() and modstatdb_shutdown().
|
|
We'll need to reuse the modstatdb_init() function name for further
refactoring.
|
|
The options were either explicit or dependent on the main status
options, now they are always explicit. This detangles the actions
on the available file from the ones on the status file. Rename the
enum flags accordingly.
|
|
Some times we need to write back the status file, but not the available
file. Add a new flag to handle those cases.
Based-on-patch-by: Michel Lespinasse <walken@zoy.org>
|
|
For commands that only make use of information from the status file,
there's no need to make them read and parse the available file. This
change does not alter the current behaviour, and commands that were
previously updating the available file will continue doing so.
Removing further access to it is pending a decision on how to treat
globally the available file, which needs interaction with the package
manager frontend developers.
Closes: #397121
Based-on-patch-by: Michel Lespinasse <walken@zoy.org>
|
|
|
|
Regression introduced in commit 97205c1bab2d5fd18e9dd33f5329db209b866634.
|
|
Do that in the --help output and in the man page.
|
|
When passing the DPKG_ADMINDIR environment variable to the maintainer
scripts we need to trim the installation directory name from admindir,
otherwise the directory won't be found.
Regression introduced in commit e63e1fa4a4afdf98847f13f2506a0aeea68c33c7.
Based-on-patch-by: Steve Langasek <steve.langasek@linaro.org>
Improved-by: Jonathan Nieder <jrnieder@gmail.com>
|
|
Regression introduced in commit dc98261980767f258046f8a4c2e020fcdc92c8b6-
Reported-by: Martin Pitt <martin.pitt@ubuntu.com>
Suggested-by: Colin Watson <cjwatson@ubuntu.com>
|
|
|
|
Move the common code into a new function which will call an action
pointer function on matched files to perform the specific logic.
|
|
This will allow further refactoring now that the infodb traversal code
is the same eveyrwhere.
|
|
|
|
|
|
Instead of directly preparing the arguments on traversal, store the
information of the matched files, which we'll be acting on later in
the code. This will allow for further refactoring.
|
|
|
|
On unpack sync the info database directory instead of the temporary
control information directory, and print the correct pathname on
error instead of the last file acted on that directory.
|
|
|
|
This allows the strings to be terminated, thus printable or accessed
through the standard C string functions, and at the same time
appendable.
|
|
Instead of appending two NUL characters to be able to track the end of
the NUL terminated lines from find's output. Just handle the number of
lines we have already counted previously.
|
|
|
|
It's easier to read if the varbuf calls affecting the same variable are
close together, rather than dispersed around in the code.
|
|
This simplifies the API, and unifies the different call sites, the
extremely small performance penalty is irrelevant in these cases.
|
|
The current names are not descriptive enough, so rename parg to arg_ptr,
farg to arg_func, and finally arg to arg_int (which disambiguates what
kind of data it's holding).
|
|
Move the force type (normal, default, dangerous) and force description
to struct forceinfo, so that its printing can be automated.
This has multiple purposes (similar to the debuginfo output automation);
there's one less place to modify when adding a new force flag, the ouput
is easier to modify w/o fuzzying the translated strings, it's easier for
the translators to deal with new force flag additions.
|
|
|
|
Add an entry for "all" to forceinfos, so that the code paths are more
clear on what each is doing. This will also make further refactoring
easier.
|
|
|
|
|
|
Add a new array of struct debuginfo to hold debug flag information, so
that it can be handled automatically.
This has multiple purposes; it will guarantee the output value always
matches the one defined in the code, there's one less place to modify
when adding a new debug flag, the ouput is easier to modify w/o fuzzying
the translated strings, it's easier for the translators to deal with new
debug flag additions, it will not allow for the source reference name to
be translated thus avoiding errors.
|
|
Move the conflictor and cflict_index variables to processarc.c and
make them static. And create a new push_conflictor() function to hide
the implementation details. This fixes a warning on variable shadowing.
|
|
|
|
Remove cidirbuf and make cidir a static function scope variable.
|
|
Inline the strlen() call instead of using the intermediate variable.
|
|
|
|
Instead of letting removal_bulk_remove_files() tell the caller it has
found a postrm script in its branch and calling pkg_has_postrm_script()
on the other, just unconditionally call it always.
This removes the need to pass back the value via out_foundpostrm, which
makes further refactoring slightly more convoluted.
|
|
|
|
|
|
mkdtemp() takes the string allocated by path_make_temp_template() and
modifies it, but there's not enough allocated room for the subsequent
string appends done starting from cidirrest, for the control files.
Regression introduced in commit ffccc65580189420a0a64736bba0fb661de56dcb.
|
|
The commit 58e7276b69be105735eccb3c18c2b28d3a2ec2e5 didn't explicitly
document this behavioural change, do so now.
|
|
This reverts commit 13637ddfaf473fa5fd67264da9f38841eeed7401.
The changes in commit 58e7276b69be105735eccb3c18c2b28d3a2ec2e5 were
intentional, supported here meant (although the commit did not
document this properly) that the non-compliant package can still be
installed, although --force-architecture is now required.
|
|
Refactoring done in commit 58e7276b69be105735eccb3c18c2b28d3a2ec2e5
introduced a regression: a package without an architecture field
can no longer be installed without --force-architecture.
|
|
In case the package didn't have an Architecture field, warn and
initialize it to an empty string, so that it can be safely used for
string comparisons, printing, etc.
This fixes a potential segfault when setting the environment variable
DPKG_MAINTSCRIPT_ARCH from a package w/o an Architecture field, which
are a thing from the distant past, but still should be supported.
|
|
This disambiguates the usage and avoids unneeded shadowing.
|
|
The “arch” name is unambiguous in this context, and as we are going to
be using it more often, let's avoid unnecessary typing.
|
|
|
|
The use of badusage() here is not appropriate.
|
|
This will happen when removing the last package from an installation,
which does never happen on normal conditions on Debian-based systems.
But it can happen either on other distributions where dpkg is a foreign
package manager, or on test databases.
|