Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
The current implementation demanded libdpkg users to define thisname
themselves, which is not really a nice interface to offer to programs.
Closes: #631757
|
|
Instead define it in myopt.c and initialize it through a new argument to
myopt().
|
|
This avoids a temporary variable, given that now the function is
strongly prototyped.
|
|
|
|
This was spotted by a run with the clang static analyzer.
|
|
The interface to get and set the database directory is dpkg_db_get_dir()
and dpkg_db_set_dir().
|
|
Use dpkg_db_get_dir() and dpkg_db_get_path() to globally retrieve the
database directory instead of passing it around.
|
|
Remove now unused pkgadmindir_init().
|
|
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.
|
|
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>
|
|
|
|
Do that in the --help output and in the man page.
|
|
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.
|
|
This allows the strings to be terminated, thus printable or accessed
through the standard C string functions, and at the same time
appendable.
|
|
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).
|
|
The use of badusage() here is not appropriate.
|
|
Always set DPKG_ADMINDIR from dpkg so that all subprocesses inherit
the variable and there's no possible security risk from a user process
setting the variable to write onto a user controlled area.
As usual, the order in which the admindir value is overridden is the
following: built-in default, environment variable and command line
option.
Closes: #97076
Suggested-by: Brendan O'Dea <bod@debian.org>
|
|
Make the varbuf API a bit more consistent.
|
|
Make the varbuf API a bit more consistent.
|
|
Make the varbuf API a bit more consistent.
|
|
Make the varbuf API a bit more consistent.
|
|
|
|
|
|
Conflicts:
debian/changelog
dselect/po/es.po
po/es.po
po/pt.po
scripts/po/es.po
src/archives.c
|
|
The code was only printing a delimiting new line on the second to last
stanza. Invert the logic and do it always except on the last one.
Closes: #606315
|
|
|
|
Remove trailing spaces. Remove blank lines not separating different code
blocks. Remove blank lines at the end of the file.
|
|
Global review, which includes the following changes to try to increase
consistency, update and improve the source code comments:
- Spelling fixes.
- Use American English forms.
- Uppercase NULL, NUL and ASCII.
- Use “Note: ” instead of the slightly cryptic “NB: ” form.
- Write comments as proper sentences, including capitalizations and
ending dots.
- Move comments before the code, function or variable they refer to.
- Move general function comments outside the body.
- Convert function and variable description comments to doxygen.
- Use one space before dot, exclamation and question marks.
- Use ‘’ or “” instead of `' style quoting.
- Remove author names from comments, already visible from “git blame”.
- Mark strings for translators with “TRANSLATORS: ”.
- Remove useless or outdated comments.
- Fix comment indentation.
- Standardize comment format:
/* Short text comment. */
/* Long text,
* comment. */
/*
* Section text.
*/
|
|
|
|
|
|
|
|
|
|
This corrects the current program name printed by other tools.
|
|
Reported-by: Ask Hjorth Larsen <asklarsen@gmail.com>
|
|
Reduce repeated code, and localize it where it belongs.
|
|
|
|
This makes it obvious the file contains the main() function for
dpkg-query in line with the rest of the tools.
|