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 be needed when moving the fsys hash implementation into
libdpkg.
|
|
|
|
|
|
|
|
When parsing the statoverride database from dpkg-statoverride do
not consider it an error and refuse to operate at all if the user
or group names are not known to the system, just preserve them.
Closes: #563307
|
|
|
|
This untangles the types, and makes it possible to use functions that
use such enums as arguments from C++ code, as otherwise the enum would
need to be declared within the struct namespace.
|
|
This will help once we move them out of the structs.
|
|
|
|
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.
|
|
|
|
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.
|
|
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
|
|
These functions have never belonged in the filesdb module, but were put
there temporarily for convenience.
|
|
|
|
|
|
|
|
|
|
This will be used for checksum generation at unpack time, and for shared
file verification.
|
|
A diversion is recorded against a package name, thus a pkgset. This is
due to the fact that different instances of the same pkgset cannot have
conflicting pathnames, if they do the pathname object should be the
same.
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.
|
|
Found by codespell.
|
|
This generalizes the function to exclude any desired file namenode
flag and not just fnnf_elide_other_lists. It also gets rid of the
bool variable which is generally a bad interface to change function
behaviour when it should really be a named flag or a mask.
|
|
These functions are not really part of the modstatdb module, and by
moving them out they get detangled and will make it possible to extend
them w/o pulling additional code into binaries not using the functions.
|
|
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.
*/
|
|
Create a new file_stat struct, and use it instead of the
filestatoverride one.
|
|
|
|
Because the filtered file is left in the new file list, the code that
verifies if the old file is present (maybe with a different name) in
the new list matches the stat information. So we mark and treat filtered
files as if they were already not present on the file system.
Reported-by: Martin Pitt <martin.pitt@ubuntu.com>
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
|
|
This way it's done in one pass afterwards, to avoid massive I/O
degradation due to the serialization from each write + fsync. This
restores extraction times to numbers closer to the ones before the
fsync patch introduced in 1.15.6.
|
|
Add a missing “of the License” after “version 2”. Move “but” and “GNU”
at the end of line to the next line. This matches more closely the
paragraph found in the license text for the GPL version 2.
|
|
Use the <http://www.gnu.org/licenses/> URL, instead of in most cases
the outdated FSF address, which is way more stable, as the latter has
changed several times in the past.
|
|
This is a private macro, internal to the file database handling code,
currently in dpkg only.
|
|
|
|
|
|
Some 'Copyright <year>' entries didn't have a copyright symbol.
Add it and switch the rest from '(C)' to '©', but we don't do this
on program output which for now should remain pure ascii.
|
|
Closes: #17243, #68981, #215374, #217622, #248693, #308285
|
|
|
|
This is part of the fix for #108587.
* lib/dpkg-db.h (conffile): Add `obsolete' field.
* lib/dump.c (w_conffiles): Write "obsolete" at the
end of conffile entry if obsolete is set.
* lib/fields.c (f_conffiles): Parse entries for
obsolete conffiles correctly.
* src/filesdb.h (filenamenode.flags): Add new
flag for obsolete conffiles.
* src/remove.c (removal_bulk_remove_configfiles):
Handle obsolete conffiles.
* src/archives.c (newconff_append): New function
to append a filenamenode to a fileinlist.
(addfiletolist): New function to add a filenamenode
to a tarcontext.
(tarobject): Use new addfiletolist function.
Handle case where a new package takes over
an obsolete conffile from another package.
* src/archives.h: Add declaration of the
addfiletolist function.
* src/processarc.c (process_archive): Use new
newconff_append function from archives.c.
Detect obsoleted conffiles and mark them as such.
* src/help.c (chmodsafe_unlink): Make it possible
to differentiate between failed chmod and failed
unlink by adding a new `failed' argument which
will be set to the name of the failed command.
(chmodsafe_unlink_statted): New function that
can be called if we already have a stat result for
the file/directory to be removed.
(ensure_pathname_nonexisting): Give better error
messages by utilizing the changes to
chmodsafe_unlink.
* src/main.h: Reflect changes in archives.c
and help.c (add declarations for newconff_append
and chmodsafe_unlink_statted and change the
one of chmodsafe_unlink).
(conffopt): Add new isold flag.
|
|
later merged into a branch with the full history from
CVS and arch
|
|
* Bin-MU; recompile against Debian unstable, to make dselect actually
installable.
-- Scott James Remnant <scott@netsplit.com> Fri, 11 Mar 2005 09:00:14 +0000
|