summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp/edspsystem.cc
Commit message (Collapse)AuthorAgeFilesLines
* Modernize standard library includesJulian Andres Klode2024-02-201-2/+2
| | | | | | This was automated with sed and git-clang-format, and then I had to fix up the top of policy.cc by hand as git-clang-format accidentally indented it by two spaces.
* apt(8): Wait for frontend and cache lockJulian Andres Klode2020-02-261-1/+1
| | | | | | 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.
* 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.
* eipp: let apt make a plan, not make stuff planeDavid Kalnischkies2016-06-291-1/+1
| | | | | | | | | | | | | | Julian noticed on IRC that I fall victim to a lovely false friend by calling referring to a 'planer' all the time even through these are machines to e.g. remove splinters from woodwork ("make stuff plane"). The term I meant is written in german in this way (= with a single n) but in english there are two, aka: 'planner'. As that is unreleased code switching all instances without any transitional provisions. Also the reason why its skipped in changelog. Thanks: Julian Andres Klode Gbp-Dch: Ignore
* eipp: provide the internal planer as an external oneDavid Kalnischkies2016-06-271-0/+18
| | | | | | Testing the current implementation can benefit from being able to be feed an EIPP request and produce a fully compliant response. It is also a great test for EIPP in general.
* edsp: optionally store a compressed copy of the last scenarioDavid Kalnischkies2016-06-081-0/+3
| | | | | | | | For bugreports and co it could be handy to have the scenario and all the settings used in it around later for inspection for EDSP like protocols. EDSP might not be the most interesting as the user can still interrupt the process before the solution is applied and users tend to have an opinion on the "rightness" of a solution, so it is disabled by default.
* edsp: prevent it from trying to write a cacheDavid Kalnischkies2016-06-061-0/+6
| | | | | | | | | | | | | | | EDSP(-like) protocols are one-shot processes working on data which exists only as long as they run (as they get feed via a pipe), so trying to write a cache for it is pretty pointless, especially as it will usually fail as the cache files tend to be owned by root, but the process is run as a unpriviledged user (either _apt if called by root, otherwise the user of the caller). So this was in fact only observeable with our testcases which run as non-root and the worst which happens is that a valid cache is overridden with an invalid one which the next run will detect and not use. Git-Dch: Ignore
* refactor EDSP classes for better internal reuseDavid Kalnischkies2016-06-051-73/+53
| | | | | | | | | The classes are all marked as hidden, so changing them is no problem ABI wise and will help with introducing protocols similar to EDSP. The change has no observeable behavior difference, its just code juggling. Git-Dch: Ignore
* edspsystem.cc: include <stdlib.h> for mkdtempFredrik Fornwall2016-02-031-0/+1
| | | | | | | Include <stdlib.h> to ensure that mkdtemp(3) is defined to improve general portability and fix a specific build failure on Android. Closes: #807367
* wrap every unlink call to check for != /dev/nullDavid Kalnischkies2015-11-041-2/+2
| | | | | | | | | | | | | | | | Unlinking /dev/null is bad, we shouldn't do that. Also, we should print at least a warning if we tried to unlink a file but didn't manage to pull it of (ignoring the case were the file is /dev/null or doesn't exist in the first place). This got triggered by a relatively unlikely to cause problem in pkgAcquire::Worker::PrepareFiles which would while temporary uncompressed files (which are set to keep compressed) figure out that to files are the same and prepare for sharing by deleting them. Bad move. That also shows why not printing a warning is a bad idea as this hide the error for in non-root test runs. Git-Dch: Ignore
* use a less generic special trigger filename for stdinDavid Kalnischkies2015-09-141-2/+2
| | | | Git-Dch: Ignore
* implement autobit and pinning in EDSP solver 'apt'David Kalnischkies2015-09-141-2/+44
| | | | | | | | The parser creates a preferences as well as an extended states file based on the EDSP scenario file, which isn't the most efficient way of dealing with this as thes text files have to be parsed again by another layer of the code, but it needs the least changes and works good enough for now. The 'apt' solver is in the end just a test solver like dump.
* Cleanup includes after running iwyuMichael Vogt2015-08-171-2/+0
|
* elimate duplicated code in pkgIndexFile subclassesDavid Kalnischkies2015-08-101-6/+2
| | | | | | | | Trade deduplication of code for a bunch of new virtuals, so it is actually visible how the different indexes behave cleaning up the interface at large in the process. Git-Dch: Ignore
* add volatile sources support in libapt-pkgDavid Kalnischkies2015-08-101-2/+1
| | | | | | | | | | | | | | | | | | | Sources are usually defined in sources.list (and co) and are pretty stable, but once in a while a frontend might want to add an additional "source" like a local .deb file to install this package (No support for 'real' sources being added this way as this is a multistep process). We had a hack in place to allow apt-get and apt to pull this of for a short while now, but other frontends are either left in the cold by this and/or the code for it looks dirty with FIXMEs plastering it and has on top of this also some problems (like including these 'volatile' sources in the srcpkgcache.bin file). So the biggest part in this commit is actually the rewrite of the cache generation as it is now potentially a three step process. The biggest problem with adding support now through is that this makes a bunch of previously mostly unusable by externs and therefore hidden classes public, so a bit of further tuneing on this now public API is in order…
* make all d-pointer * const pointersDavid Kalnischkies2015-08-101-6/+2
| | | | | | | | | | | | | | 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 internal interfaces as hiddenDavid Kalnischkies2014-11-081-2/+2
| | | | | | | We have a bunch of classes which are of no use for the outside world, but were still exported and so needed to preserve ABI/API. Marking them as hidden to not export them any longer is a big API break in theory, but in practice nobody is using them – as if they would its a bug.
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-7/+8
| | | | | | | | 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)
* warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-131-3/+3
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* * edsp/edspsystem.cc:David Kalnischkies2012-04-231-1/+1
| | | | - check with RealFileExists for scenario file as otherwise a directory like one provided with RootDir triggers the usage of EDSP
* do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies2011-09-191-1/+1
|
* reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-1/+4
|
* strip the Dir::state from the config name as it will never be thereDavid Kalnischkies2011-03-311-4/+4
|
* rename the 'universe' to 'scenario' to reflect the naming in the draftDavid Kalnischkies2011-03-311-5/+5
|
* add a special scenario filename for using stdinDavid Kalnischkies2011-03-311-2/+9
|
* add a first round of stuff needed for talking between APT and solversDavid Kalnischkies2011-03-301-0/+117
based on a very early draft for EDSP by Stefano APT can now write a scenario as well as load most stuff from it.