Age | Commit message (Collapse) | Author | Files | Lines |
|
This makes it easier to guarantee we use the correct size for the
involved variable.
|
|
|
|
Warned-by: cppcheck
|
|
The problem with assert() is that it does not print the contents of
the variables. It also can be disabled on NDEBUG. But we always want
these consistency checks no matter what, and they are not performance
sensitive anyway.
Enable -Wno-nonnull-compare so that we can keep doing run-time non-NULL
checks in functions, instead of just compile-time checks.
|
|
The ar format is not standardized and some systems might provide a
different format than the one used by dpkg. For example on AIX.
|
|
Honor SOURCE_DATE_EPOCH, so that we can control the output and generate
reproducible split packages.
|
|
Regression introduced in commit ce4f0311e6e7a7b5125c4e881a0f2d3a8e1eea45.
|
|
Switch current code to use dpkg_ar instead of taking a filename and a
file descriptor arguments.
|
|
It should make the code more clear, and in many cases it avoids having
to use a temporary variable.
|
|
|
|
This avoids confusing the project-wide macro with the DPKG_VERSION_
namespaced ones.
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
|
|
That is "" or '', and not the unbalanced `' pair.
|
|
This reduces the dpkg-deb calls to just one instead of one per field. In
addition we also reduce the parsing and dumping to a single instance.
|
|
|
|
|
|
|
|
Use the more meaningful DISCARD_PART_ prefix instead of the cryptic and
now confusing DS_ one (previously coming from the discardsome() function).
|
|
This makes it possible to embed libcompat inside libdpkg, so that the
static library that we ship is self contained with the required
compatibility code, specifically the MD5 functions.
This also prepares the build system for when we start building a
shared library, although it disables it by default.
Closes: #746122
|
|
Warned-by: coverity
|
|
|
|
|
|
Change scandepot() to return the queue, and discard_parts() to take it
as argument.
|
|
Use underscores to split symbol names, and rename discardsome() to
discard_parts().
|
|
|
|
|
|
Switch all program to use the new function instead of open-coding it.
|
|
|
|
These will perform any necessary action when starting and exiting a
dpkg-based program.
|
|
|
|
The output buffer is already setup in main().
|
|
|
|
|
|
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.
|
|
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>
|
|
As a side effect this mkes the messages more clear as the caller has
more context to describe the error conditions.
Closes: #621763
|
|
This allows to use the correct depotdir whenever dpkg is being called
with --admindir.
|
|
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
|
|
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.
|
|
This unifies the behaviour with the deb binary format.
|
|
This simplifies the parsing and checking and avoids having to treat the
format versions as floats, which can cause parse errors depending on the
locale (this only affected the old deb format).
|
|
|
|
|
|
|
|
Having to keep this information twice is error-prone as it easily gets
out of sync. Having to translate it is bothersome. It's not consistent
across dpkg tools, some do print it some don't. It's currently not
accurate, as the output would need to include the holders for all files
that end up being part of the binary. And listing it in the --versions
output is visually annoying and the wrong place.
Just keep this where it belongs, at the file comment headers, above the
license information.
|
|
This function is an equivalent of the GNU basename, but this one will
work consistently on any system regardless of libc used.
|
|
|
|
|
|
|