summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp
Commit message (Collapse)AuthorAgeFilesLines
* use a less generic special trigger filename for stdinDavid Kalnischkies2015-09-142-3/+3
| | | | Git-Dch: Ignore
* implement autobit and pinning in EDSP solver 'apt'David Kalnischkies2015-09-144-8/+94
| | | | | | | | 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-173-8/+0
|
* Annotate more methods with APT_OVERRIDEJulian Andres Klode2015-08-111-1/+1
| | | | | | Gbp-Dch: ignore Reported-By: g++ -Wsuggest-override Thanks: g++ -Wsuggest-override
* parse packages from all architectures into the cacheDavid Kalnischkies2015-08-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Now that we can dynamically create dependencies and provides as needed rather than requiring to know with which architectures we will deal before running we can allow the listparser to parse all records rather than skipping records of "unknown" architectures. This can e.g. happen if a user has foreign architecture packages in his status file without dpkg knowing about this architecture (or apt configured in this way). A sideeffect is that now arch:all packages are (correctly) recorded as available from any Packages file, not just from the native one – which has its downsides for the resolver as mixed-arch source packages can appear in different architectures at different times, but that is the problem of the resolver and dealing with it in the parser is at best a hack (and also depends on a helpful repository). Another sideeffect is that his allows :none packages to appear in Packages files again as we don't do any kind of checks now, but given that they aren't really supported (anymore) by anyone we can live with that.
* elimate duplicated code in pkgIndexFile subclassesDavid Kalnischkies2015-08-103-45/+54
| | | | | | | | 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…
* add c++11 override marker to overridden methodsDavid Kalnischkies2015-08-104-14/+16
| | | | | | | | | 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-106-11/+7
| | | | | | | | | | | | | | 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
* add d-pointer, virtual destructors and de-inline de/constructorsDavid Kalnischkies2015-06-165-1/+8
| | | | | | | | To have a chance to keep the ABI for a while we need all three to team up. One of them missing and we might loose, so ensuring that they are available is a very tedious but needed task once in a while. Git-Dch: Ignore
* populate the Architecture field for PackageFilesDavid Kalnischkies2015-06-151-1/+1
| | | | | | | | | | | This is mainly visible in the policy, so that you can now pin by b= and let it only effect Packages files of this architecture and hence the packages coming from it (which do not need to be from this architecture, but very likely are in a normal repository setup). If you should pin by architecture in this way is a different question… Closes: 687255
* store Release files data in the CacheDavid Kalnischkies2015-06-123-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | We used to read the Release file for each Packages file and store the data in the PackageFile struct even through potentially many Packages (and Translation-*) files could use the same data. The point of the exercise isn't the duplicated data through. Having the Release files as first-class citizens in the Cache allows us to properly track their state as well as allows us to use the information also for files which aren't in the cache, but where we know to which Release file they belong (Sources are an example for this). This modifies the pkgCache structs, especially the PackagesFile struct which depending on how libapt users access the data in these structs can mean huge breakage or no visible change. As a single data point: aptitude seems to be fine with this. Even if there is breakage it is trivial to fix in a backportable way while avoiding breakage for everyone would be a huge pain for us. Note that not all PackageFile structs have a corresponding ReleaseFile. In particular the dpkg/status file as well as *.deb files have not. As these have only a Archive property need, the Component property takes over this duty and the ReleaseFile remains zero. This is also the reason why it isn't needed nor particularily recommended to change from PackagesFile to ReleaseFile blindly. Sticking with the earlier is usually the better option.
* mark internal interfaces as hiddenDavid Kalnischkies2014-11-085-9/+7
| | | | | | | 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.
* drop stored StringItems in favor of in-memory mappingsDavid Kalnischkies2014-09-271-1/+1
| | | | | | | | | | | | | | | Strings like Section names or architectures are needed vary often. Instead of writing them each time we need them, we deploy sharing for these special strings. Until now, this was done with a linked list of strings in which we would search, which was stored in the cache. It turns out we can do this just as well in memory as well with a bunch of std::map's. In memory means here that it isn't available anymore if we have a partly invalid cache, but that isn't much of a problem in practice as the status file is compared to the other files we parse very small and includes mostly duplicates, so the space we would gain by storing is more or less equal to the size of the stored linked list…
* cleanup datatypes mix used in binary cacheDavid Kalnischkies2014-06-181-1/+1
| | | | | | | | We had a wild mixture of (unsigned) int, long and long long here without much sense, so this commit adds a few typedefs to get some sense in the typesystem and ensures that a ID isn't sometimes computed as int, stored as long and compared with a long long… as this could potentially bite us later on as the size of the archive only increases over time.
* follow method attribute suggestions by gccDavid Kalnischkies2014-03-133-6/+6
| | | | | Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-136-17/+42
| | | | | | | | 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-133-6/+6
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* do not dereference the storage for the unique strings as the pointer canDavid Kalnischkies2012-06-161-1/+2
| | | | | change at the time of writing the strings, so first store it temporary and then save the index in the (possibily new) pointer location
* * 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
* atleast libapt should announce to itself that it is clean…David Kalnischkies2011-12-151-2/+2
| | | | (and be it if it tries to announce that…)
* revert 2184.1.3: forward declaration instead of headersDavid Kalnischkies2011-12-132-0/+10
| | | | | The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users
* * apt-pkg/contrib/fileutl.{h,cc}:David Kalnischkies2011-12-101-5/+2
| | | - implement a ModificationTime method for FileFd
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-193-4/+3
|
* do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies2011-09-194-10/+10
|
* reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-133-1/+8
|
* add some more dpointer placeholdersMichael Vogt2011-06-082-0/+6
|
* parse correctly the Hold: lines into Pkg->SelectedState = HoldDavid Kalnischkies2011-05-021-2/+5
|
* rename edspwriter to straight edsp in toplevel as it does more thanDavid Kalnischkies2011-03-312-192/+0
| | | | | | just writing stuff… it also reads and can work for both: - APT talking to an external solver - an external solver (understanding EDSP) talking to APT
* add the methods we will need to write to make working with EDSP possibleDavid Kalnischkies2011-03-312-2/+24
|
* strip the Dir::state from the config name as it will never be thereDavid Kalnischkies2011-03-311-4/+4
|
* parse the state of the package from the scenario file correctlyDavid Kalnischkies2011-03-311-30/+8
|
* rename the 'universe' to 'scenario' to reflect the naming in the draftDavid Kalnischkies2011-03-315-11/+11
|
* add a special scenario filename for using stdinDavid Kalnischkies2011-03-312-3/+14
|
* be able to write solutions, tooDavid Kalnischkies2011-03-302-0/+21
|
* add a first round of stuff needed for talking between APT and solversDavid Kalnischkies2011-03-308-0/+550
based on a very early draft for EDSP by Stefano APT can now write a scenario as well as load most stuff from it.