Age | Commit message (Collapse) | Author | Files | Lines |
|
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.
|
|
This continues the work to generalize and make these interfaces
available to other users beside dpkg itself.
|
|
|
|
This will be needed when moving the fsys hash implementation into
libdpkg.
|
|
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 comparison function pkg_sorter_by_listfile_phys_offs passed to qsort
does not satisfy qsort symmetry requirements, for some inputs
pkg_sorter_by_listfile_phys_offs(a, b) != -
pkg_sorter_by_listfile_phys_offs(b, a)
This may cause various qsort misbehaviors e.g. failing to properly sort
the input array (on some platforms qsort could even abort although that
seems to not be the case for glibc-based systems).
Closes: #808912
Signed-off-by: Guillem Jover <guillem@debian.org>
Stable-Candidate: 1.16.x 1.17.x
|
|
|
|
That is "" or '', and not the unbalanced `' pair.
|
|
The notices about duplicate entries not being processed got suppressed
when the requeueing insertion protection got enabled. Add a new variable
to track when packages or archives have been processed more than once.
Regression introduced in commit ce27f5dc0c3dc6ed7656d09784ea461407765d7d.
|
|
We should not requeue packages already in the queue. Just protect it
in a similar way in how the deferred triggers queue is protected. In
the future these can be unified.
|
|
Times have changed, and it's common to have at least these many files.
This reduces the amount of collisions. Eventually we should switch to
dynamically growing hash tables.
|
|
Use it instead of what seems to be a custom hash function. This seems
to reduce dispersion somewhat.
As a side effect this fixes an integer overflow.
Addresses: #760741
Warned-by: ASan
Reported-by: Bálint Réczey <balint@balintreczey.hu>
|
|
|
|
|
|
The current names are way too generic, and prone to collide with actual
color variables or similar.
|
|
|
|
|
|
|
|
Properly reset the pkg_prev pointer for each file iteration, by moving
the variable declaration inside the loop.
Regression introduced in commit a2ee7d0bb4d56afb82438f09a50251acfa690643.
Reported-by: Raphaël Hertzog <hertzog@debian.org>
|
|
Using a list of package arrays waste at least 10 pointers per path that
is not shared by multiple packages, which adds up to significant amount
with lots of installed paths and 64-bit pointers.
Also the new waste we get from each pkg_list node for each shared file is
really minor, as the common thing is for num. paths >>> num. packages.
|
|
|
|
These just clutter the code base, as adding modelines for each possible
editor out there does not scale, and they are currently not exhaustive
anyway.
|
|
|
|
|
|
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>
|
|
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
|
|
Closes: #552517
|
|
These functions have never belonged in the filesdb module, but were put
there temporarily for convenience.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
The usage of the new layout is conditional to a prior database
upgrade that should write a version number greater than 0 in
<admindir>/info/format.
The file is parsed when needed from pkg_infodb_get_format().
Based-on-patch-by: Raphaël Hertzog <hertzog@debian.org>
Patch-sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
This will be used for checksum generation at unpack time, and for shared
file verification.
|
|
Regression introduced in commit 0b8652b226a7601dfd71471797d15168a7337242.
Spotted-by: Raphaël Hertzog <hertzog@debian.org>
|
|
Replace pkg->set->name with varbuf_add_pkgbin_name(), pkgbin_name() or
pkg_name(). This only changes informative output, so no behaviour change
should result from this.
Based-on-patch-by: Raphaël Hertzog <hertzog@debian.org>
Patch-sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
[hertzog@debian.org:
- Switch dselect method option file. ]
|
|
LP: #369898
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Although all users of replacingfilesandsaid are previously calling
clear_istobes() to make sure it's initialized, doing so when allocating
clientdata is safer from an API point of view.
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
The code does not do anything yet with this new argument, but it will
allow it to access the multiarch information, once the on-disk layout
is changed.
|
|
Remove now unused struct pkginfo name member.
|
|
This fixes two related issues when the FIGETBSZ ioctl fails, it avoids
a file descriptor leak because we can get the block size before the
loop, and avoids a segfault when sorting the package array due to the
cliendata possibly being NULL on some of the package entries because
we can bail out before performing the actual sorting.
We use the Linux specific statfs(2), because it does way less work than
statvfs(3) and the surrounding code is already non-portable due to its
dependency on FIEMAP.
LP: #872734
|