summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-06-30dpkg-query: Add --control-list and --control-show to --help outputGuillem Jover1-0/+3
Missed in commit 1a60e5317318ab0d4097b524a2b5cd39ab905f11.
2012-06-30dpkg: Do not translate SE Linux context to human readable formRussell Coker1-2/+8
The SE Linux context in computer readable form get translated to human readable form if the mcstransd daemon is running. But if the daemon fails inbetween then dpkg might try to write wrong data to disk. To avoid the flakines implied in relying on the state of that daemon, just never translate the context. As a side effect this should incur in a slight speed up. [guillem@debian.org: - Coding style fixes. - Added code comment. ] Closes: #679641 Signed-off-by: Guillem Jover <guillem@debian.org>
2012-06-30dpkg-query: Add an Architecture column to --list outputGuillem Jover1-12/+28
Even if the output format is designed to be human readable, and for machine parseable output «dpkg-query -W» should be used instead, there's probably scripts in the wild parsing «dpkg-query -l». Thus, the new column is inserted before the Description column which is unreliable to parse anyway as its value will always contain spaces, which are the column separators, and as such should be pretty safe. The arch-qualified package names will still be printed, as that allows to copy-and-paste package names as input to dpkg commands w/o any possibility of ambiguity. Closes: #673190 Suggested-by: Jonathan Nieder <jnieder@gmail.com>
2012-06-30Recognize -? as an alias for --help in all commandsGuillem Jover1-1/+1
2012-06-30Align --version with --help on help outputGuillem Jover3-3/+3
2012-06-30Change all programs to accept -? instead of -h for help outputGuillem Jover4-8/+8
This switch frees the -h option to be used in the distant future for other purposes, it also uses a character that does not have any other obvious meaning for help output, and which is pretty safe to be used blindly by the user in the same way as --help.
2012-06-30Avoid full stop and double newline at the end of errors and warningsJonathan Nieder9-21/+21
Error messages like "couldn't parse control information from foo.deb" are not full sentences, so don't punctuate them like one. The main purpose of this patch is stylistic consistency, but perhaps it can also make copy-and-paste from messages like dpkg-query: no path found matching pattern /usr/bin/agrep. a little easier. Most actual full sentences should remain untouched. A few full sentences are error messages at heart, so this patch converts those to lower-case sentence fragment form, too. [guillem@debian.org: - Add missed strings. - Minor tweaks to strings. ] Closes: #624000 Requested-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Guillem Jover <guillem@debian.org>
2012-06-30Switch to new notice() output functionGuillem Jover12-95/+74
This switches all ad-hoc stderr printing for error notices to the notice() function.
2012-06-30libdpkg: Switch buffer I/O code to use struct dpkg_errorGuillem Jover4-15/+30
As a side effect this mkes the messages more clear as the caller has more context to describe the error conditions. Closes: #621763
2012-06-30libdpkg: Change pkg_format_parse() to take a dpkg_error argumentGuillem Jover1-1/+5
This fixes two issues at once: the more detailed inner message is relied back to the more general outter printer which allows a clearer error message, and it makes the pkg-format module stop printing things at all which is bad for a library,
2012-06-30dpkg-query: Add new --control-list and --control-show commandsGuillem Jover2-0/+84
These replace the now deprecated --control-path command, as these do not rely on any specific database layout.
2012-06-30dpkg-query: Refactor pkg_infodb_check_filetype() from control_path()Guillem Jover1-8/+13
2012-06-30dpkg-query: Refactor pkg_infodb_is_internal() from pkg_infodb_print_filename()Guillem Jover1-3/+12
2012-06-30dpkg: Switch showdiff() to command_get_pager()Guillem Jover1-6/+2
2012-06-08dpkg: Activate all path components for file triggersGuillem Jover1-2/+2
File triggers have been activated up to now explicitly whenever seen, and only the requested pathname. While unpacking or removing, this is not an issue as dpkg will traverse the hierarchy and trigger parent directories during the process. Because conffiles get a two staged installation, first unpacked into <conffile>.dpkg-new and then installed in place on configure, a trigger activated only after unpack will not see the <conffile> at its final location or see it at all if it correctly ignores those file extensions. This is an issue for conffiles or explicit dpkg-trigger file triggers, as an interest on parent paths will not activate the trigger as those parents are not traversed. With the subsequent cause of missed updates because code has not been run on the actual installation of conffiles. Closes: #675613, #676061, #676062, #676107, #676118, #676122
2012-06-06dpkg: Add missing space before && operandGuillem Jover1-1/+1
2012-06-06dpkg: Remove unneeded showdiff() forward declarationGuillem Jover1-1/+0
2012-06-06dpkg-divert: Do not warn on missing db .list file for never installed packagesGuillem Jover1-1/+2
When the package has never been installed before, and the unpack has not yet finished, the package will be present on the database but the files list file will not, which would produce a bogus warning. Check if the package has ever been configured, before printing the warning. Closes: #673518
2012-06-06dpkg: Use enum dep_check values instead of literal stringsGuillem Jover2-5/+6
2012-05-23Check parsed integers for out of range errorsGuillem Jover2-16/+21
Verify that the numbers are not out of the range; i.e. that no negative values are allowed if not appropriate, and that no overflows occur. Closes: #580038
2012-05-23dpkg: Use ohshit() instead of ohshite() on strtoul() errorGuillem Jover1-1/+1
There's no guarantee that errno will be set for all error conditions checked. Regression introduced in commit 20e7af7b6ee4ab703b5d0e6f091fe3f565550a2b.
2012-05-10Use new str_is_set() instead of ad-hoc checksGuillem Jover1-2/+3
2012-05-10Use DPKG_BIT to define bit flags instead of literal octal valuesGuillem Jover2-20/+20
If we are defining bit flags, it's more natural to just name the bits by their index instead of using octal values. Use the opportunity to assign bit indices in increasing order, as some flags had been inserted in alphabetical/group order but keeping the other flag's values.
2012-05-10dpkg: Make enum conffopt declaration private by moving to configure.cGuillem Jover2-18/+19
There's no other users, and no public function expecting such argument, so just hide this implementation detail where it belongs.
2012-05-10libdpkg: Rename versionsatisfied3() to dpkg_version_relate()Guillem Jover2-3/+4
At the same time reorder the arguments and place the relation operator in the middle, which is a more natural way to express it.
2012-05-10libdpkg: Rename versioncompare() to dpkg_version_compare()Guillem Jover4-8/+11
2012-05-10libdpkg: Rework enum depverrel into new enum dpkg_relationGuillem Jover4-9/+10
Use more meaningful enum value names, and simplify them by having the minimum amount of values required.
2012-05-09libdpkg: Rename struct versionrevision to dpkg_versionGuillem Jover1-7/+7
2012-05-04dpkg: Move maintainer script handling into a new script moduleGuillem Jover3-287/+342
2012-05-04build: Use MKDIR_P instead of obsolete mkdir_pGuillem Jover1-3/+3
Autoconf provides an AC_PROG_MKDIR_P macro defining MKDIR_P which is called by AM_INIT_AUTOMAKE; the obsolete mkdir_p, currently aliased to MKDIR_P will disappear with automake 1.13.
2012-04-27dpkg: Add missing list and md5sums database file checks to --auditGuillem Jover1-0/+21
This will report about any package missing the list or md5sums files from the database, so that they can be reinstalled.
2012-04-27dpkg: Switch struct badstatinfo value member to an union of int and char *Guillem Jover1-12/+15
This will allow to pass strings to the checkers.
2012-04-27dpkg: Generate md5sums info files if none were present in the binary packageGuillem Jover4-1/+81
This is the first step in allowing to verify installed package files consistency. Next step will be to track file metadata and then add options to verify the requested packages. Closes: #155676, #155799
2012-04-27Use new str_is_set()/str_is_unset() instead of ad-hoc checksGuillem Jover2-2/+3
2012-04-27dpkg-divert: Add test case for ignored rename request from diverting packageColin Watson1-2/+43
Signed-off-by: Guillem Jover <guillem@debian.org>
2012-04-27dpkg-divert: Do not rename files owned by the diverting packageGuillem Jover1-1/+34
If the file is already owned by the package diverting it, that will actually mess up the filesystem for no good reason, just ignore the request and issue a message stating so. Closes: #588077
2012-04-14build: Switch from --without- to --disable- for programs to be builtGuillem Jover1-1/+1
The standard way to select if a specific component of the build is to be enabled or disabled is through --enable-foo and --disable-foo options, --with-foo and --without-foo are used for selecting external modules to be used.
2012-04-09Use implicit __func__ in internerr() instead of explicit literal stringsGuillem Jover1-2/+1
2012-04-09Use a dot or ellipsis where appropriate instead of ..Guillem Jover2-2/+2
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
2012-04-03Print errors while reading file list files on a new lineGuillem Jover1-1/+0
Closes: #552517
2012-04-03Move pkg_infodb_get_dir() and pkg_infodb_get_file() to infodb-format.cGuillem Jover6-45/+37
These functions have never belonged in the filesdb module, but were put there temporarily for convenience.
2012-04-03Rename pkgadmin*() to pkg_infodb_get_*()Guillem Jover9-30/+33
2012-04-03Change pkgadmindir() to initialize infodir itselfGuillem Jover1-9/+4
This will guarantee there's never a time a call site can get NULL from the function, and detangles it from the in-core filesdb initialization.
2012-04-01Rename pif variables to pkgbinGuillem Jover2-10/+10
2012-04-01Rename pigp variables to pkgGuillem Jover1-5/+5
2012-04-01Use cmp() == 0 instead of !cmp()Guillem Jover7-17/+20
2012-03-31dpkg-divert: Check all dpkg-divert filename argumentsGuillem Jover2-5/+23
This makes sure the filename is absolute and does not contain newlines. Closes: #21722
2012-03-31dpkg-divert: Use call_divert_badusage() to test for single argumentsGuillem Jover1-3/+3
2012-03-31dpkg-divert: Only check for --divert being absolute when setting itGuillem Jover2-4/+5
There's no point in checking it at --add time because even if it was not specified and it got constructed from filename, it can never be non-absolute as filename has already been checked for that.
2012-03-31Rename file iterator variables to iterGuillem Jover4-39/+47