summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debsystem.h
Commit message (Collapse)AuthorAgeFilesLines
* Drop usage of macro APT_OVERRIDE for simple overrideDavid Kalnischkies2025-01-051-10/+10
| | | | | | | | | We were rather inconsistent in using it and as our public headers contain deduction guides (a c++17 feature) it seems silly to try to hide a c++11 feature in a macro, so lets stop this charade and drop the macro and while we are changing all these lines lets apply [[nodiscard]] (another c++17 feature) and other suggestions from clang-tidy and formatting for a little more consistency.
* Restore dpkg::chroot-directory functionalityDavid Kalnischkies2021-06-101-0/+1
| | | | | | | | | | | | | | | | | | | If we call dpkg inside a chroot we have to ensure that the temporary directory we construct to call dpkg --recursive is inside the chroot and that we strip the path to the chroot from the directory name we pass to dpkg. Note that the added test succeeds before and (hopefully) after as we can't really chroot here or fiddle with the needed settings as we are already setting up apt to work with a quasi-chroot. The test perhaps helps in ensuring we don't break it too much in the future though. (Broken five years (and one day) ago this seems to have an immense user base at the moment, but it might in the future via mmdebstrap) References: f495992428a396e0f98886c9a761a804aa161c68 Reported-By: Johannes Schauer Marin Rodrigues on IRC Tested-By: Johannes Schauer Marin Rodrigues
* Add basic support for the Protected fieldJulian Andres Klode2020-06-291-0/+1
| | | | This will be mapped to Important for the time being.
* apt(8): Wait for frontend and cache lockJulian Andres Klode2020-02-261-3/+2
| | | | | | This is a rework of !6 with additional stuff for the frontend lock, so we can lock the frontend lock and then keep looping over dpkg lock.
* pkgsystem: Drop more virtual workaround shenanigansJulian Andres Klode2020-02-261-5/+5
|
* Run unifdef -DAPT_{8,9,10,15}_CLEANER_HEADERSJulian Andres Klode2019-06-121-3/+0
|
* Add support for dpkg frontend lockJulian Andres Klode2018-08-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The dpkg frontend lock is a lock dpkg tries to acquire except if the frontend already acquires it. This fixes a race condition in the install command where the dpkg lock is not held for a short period of time between different dpkg invocations. For this reason we also define an environment variable DPKG_FRONTEND_LOCKED for dpkg invocations so dpkg knows not to try to acquire the frontend lock because it's held by a parent process. We can set DPKG_FRONTEND_LOCKED only if the frontend lock really is held; that is, if our lock count is greater than 0 - otherwise an apt client not using the LockInner family of functions would run dpkg without the frontend lock set, but with DPKG_FRONTEND_LOCKED set. Such a process has a weaker guarantee: Because dpkg would not lock the frontend lock either, the process is prone to the existing races, and, more importantly, so is a new style process. Closes: #869546 [fixups: fix error messages, add public IsLocked() method, and make {Un,}LockInner return an error on !debSystem]
* Remove obsolete RCS keywordsGuillem Jover2018-05-071-1/+0
| | | | Prompted-by: Jakub Wilk <jwilk@debian.org>
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-1/+1
| | | | | | | | | | | | | This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
* Drop cacheiterators.h includeJulian Andres Klode2017-07-121-1/+0
| | | | | Including cacheiterators.h before pkgcache.h fails because pkgcache.h depends on cacheiterators.h.
* provide public interface to hold/unhold packagesDavid Kalnischkies2015-11-041-1/+2
| | | | | | We had this code lying around in apt-mark for a while now, but other frontends need this (and similar) functionality as well, so its high time that we provide a public interface in libapt for this stuff.
* implement a public pkgSystem::ArchitecturesSupportedDavid Kalnischkies2015-11-041-0/+1
|
* implement a public pkgSystem::MultiArchSupportedDavid Kalnischkies2015-11-041-0/+5
| | | | | | Some codepaths need to check if the system (in our case usually dpkg) supports MultiArch or not. We had copy-pasted the check so far into these paths, but having it as a system check is better for reusability.
* add c++11 override marker to overridden methodsDavid Kalnischkies2015-08-101-8/+8
| | | | | | | | | C++11 adds the 'override' specifier to mark that a method is overriding a base class method and error out if not. We hide it in the APT_OVERRIDE macro to ensure that we keep compiling in pre-c++11 standards. Reported-By: clang-modernize -add-override -override-macros Git-Dch: Ignore
* make all d-pointer * const pointersDavid Kalnischkies2015-08-101-1/+1
| | | | | | | | | | | | | | Doing this disables the implicit copy assignment operator (among others) which would cause hovac if used on the classes as it would just copy the pointer, not the data the d-pointer points to. For most of the classes we don't need a copy assignment operator anyway and in many classes it was broken before as many contain a pointer of some sort. Only for our Cacheset Container interfaces we define an explicit copy assignment operator which could later be implemented to copy the data from one d-pointer to the other if we need it. Git-Dch: Ignore
* mark private methods as hiddenDavid Kalnischkies2014-09-301-1/+1
| | | | | | | | | | We are the only possible users of private methods, so we are also the only users who can potentially export them via using them in inline methods. The point is: We don't need these symbols exported if we don't do this, so marking them as hidden removes some methods from the API without breaking anything as nobody could have used them. Git-Dch: Ignore
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-1/+9
| | | | | | | | Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-1/+3
|
* apt-pkg/tagfile.h: add dpointer placeholder, make destructor virtual; ↵Michael Vogt2011-01-281-1/+1
| | | | apt-pkg/deb/debsystem.h: make destructor virtual
* apt-pkg/deb/debsystem.{cc,h}: add dpointerMichael Vogt2011-01-271-6/+5
|
* * removed the pragma messMichael Vogt2006-10-021-4/+0
|
* G++ 3.2 fixesArch Librarian2004-09-201-3/+3
| | | | | | Author: jgg Date: 2003-01-11 07:16:33 GMT G++ 3.2 fixes
* 'apt-cache policy' preferences debug tool.Arch Librarian2004-09-201-1/+7
| | | | | | Author: jgg Date: 2001-04-29 05:13:51 GMT 'apt-cache policy' preferences debug tool.
* Join with aliencodeArch Librarian2004-09-201-0/+41
Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode