summaryrefslogtreecommitdiff
path: root/src/filesdb.h
AgeCommit message (Collapse)AuthorFilesLines
2018-08-30libdpkg: Move db-fsys code from src to lib/dpkgGuillem Jover1-75/+0
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.
2018-08-30dpkg: Move struct perpackagestate handling into its own fileGuillem Jover1-2/+0
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.
2018-05-03libdpkg: Move filesystem nodename hash implementation into a new moduleGuillem Jover1-121/+1
2018-05-03dpkg: Add new fsys_hash_entries() function to abstract nfiles accessGuillem Jover1-0/+1
This will be needed when moving the fsys hash implementation into libdpkg.
2016-10-30dpkg: Add new files_db_reset() functionGuillem Jover1-0/+1
2015-10-18Update Ian Jackson's email addressGuillem Jover1-1/+1
2014-10-06dpkg: Add new struct filenamenode_queueGuillem Jover1-0/+7
2014-08-09dpkg-statoverride: Do not abort when user and group names are unknownGuillem Jover1-1/+6
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
2014-08-09dpkg: Use filenamenodeflags enum instead of wrongly using fnnflagsGuillem Jover1-2/+2
2014-06-02Move enum definitions out of structsGuillem Jover1-20/+22
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.
2014-06-02dpkg: Give names to anonymous public enums inside structsGuillem Jover1-2/+2
This will help once we move them out of the structs.
2013-12-07Use https:// URLs instead of http:// when possibleGuillem Jover1-1/+1
2013-10-26dpkg: Use a simple list to track packages owning a fileGuillem Jover1-1/+1
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.
2013-10-17dpkg: Add md5sums control file parsing supportGuillem Jover1-0/+1
2012-05-10Use DPKG_BIT to define bit flags instead of literal octal valuesGuillem Jover1-12/+12
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-04-27dpkg: Generate md5sums info files if none were present in the binary packageGuillem Jover1-1/+4
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-03Move pkg_infodb_get_dir() and pkg_infodb_get_file() to infodb-format.cGuillem Jover1-4/+0
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 Jover1-3/+3
2012-03-31Rename file iterator variables to iterGuillem Jover1-4/+4
2012-03-31Rename iterfiles*() functions to files_db_iter_*()Guillem Jover1-3/+3
2012-03-27Mark enum and struct member comments as doxygen descriptionsGuillem Jover1-17/+19
2012-03-16dpkg: Compute and track hashes for newly unpacked fileGuillem Jover1-0/+3
This will be used for checksum generation at unpack time, and for shared file verification.
2011-11-14Update diversions to work with pkgset instead of pkginfoRaphaël Hertzog1-1/+1
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>
2011-10-30Switch pkgadminfile() to get an explicit pkgbin as argumentGuillem Jover1-3/+4
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.
2011-08-20Fix spelling errorsGuillem Jover1-1/+1
Found by codespell.
2011-05-15dpkg: Change write_filelist_except() to take a mask intead of a boolGuillem Jover1-1/+1
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.
2011-03-14Move pkgadmindir() and pkgadminfile() to the filesdb moduleGuillem Jover1-0/+3
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.
2010-11-19Cleanup white spacesGuillem Jover1-1/+1
Remove trailing spaces. Remove blank lines not separating different code blocks. Remove blank lines at the end of the file.
2010-11-19Cleanup and improve source code commentsGuillem Jover1-48/+62
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. */
2010-11-19Refactor file_stat codeGuillem Jover1-13/+11
Create a new file_stat struct, and use it instead of the filestatoverride one.
2010-06-25dpkg: Use iterators instead of exposing packageslump directlyGuillem Jover1-9/+4
2010-06-19dpkg: Remove filtered files on upgradeGuillem Jover1-0/+1
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>
2010-05-19Use bool instead of int wherever appropriateGuillem Jover1-1/+2
2010-03-25dpkg: Defer the fsync and rename for normal files in tar extractionGuillem Jover1-0/+2
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.
2009-11-08Unify text in license headersGuillem Jover1-5/+5
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.
2009-11-08Replace FSF address by pointing to the gnu.org URLGuillem Jover1-3/+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.
2009-09-15Move LISTFILE macro from libdpkg to dpkgGuillem Jover1-0/+2
This is a private macro, internal to the file database handling code, currently in dpkg only.
2009-07-13Move filesdbinit declaration to filesdb.hGuillem Jover1-0/+2
2009-06-17Refactor statdb field parsing functionsGuillem Jover1-0/+4
2008-06-30Switch to use UTF-8 copyright symbol and add missing onesGuillem Jover1-1/+1
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.
2008-03-30Implement triggers supportIan Jackson1-0/+2
Closes: #17243, #68981, #215374, #217622, #248693, #308285
2008-03-25Move duplicate ensure_package_clientdata functions to src/filesdb.cGuillem Jover1-0/+2
2006-02-10Improve processing of disappearing conffiles (Ian Jackson).Frank Lichtenheld1-0/+1
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.
2006-01-18Import latest release as a temporary trunk which should beFrank Lichtenheld1-0/+1
later merged into a branch with the full history from CVS and arch
2005-03-11dpkg (1.13.1.0.1) experimental; urgency=lowScott James Remnant1-0/+148
* 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