summaryrefslogtreecommitdiff
path: root/apt-pkg
AgeCommit message (Collapse)Author
2015-08-18Merge remote-tracking branch 'upstream/debian/experimental' into ↵Michael Vogt
feature/srv-records
2015-08-18Merge branch 'debian/experimental' into feature/srv-recordsMichael Vogt
Conflicts: cmdline/apt-helper.cc cmdline/makefile
2015-08-17Re-add support for G++ 4.8 and configure travis to use itJulian Andres Klode
This makes tests work again! Gbp-Dch: ignore
2015-08-17Really fix all iwyu issuesMichael Vogt
Git-Dch: ignore
2015-08-17Fix all the wrong removals of includes that iwyu got wrongMichael Vogt
Git-Dch: ignore
2015-08-17Cleanup includes after running iwyuMichael Vogt
2015-08-16Make pkgCache::Priority() static, it does not need the instanceJulian Andres Klode
It still compiles after the change, so just merge it. Closes: #448627
2015-08-16Use terminfo's typical save_cursor/restore_cursor sequencesJames McCoy
Not all terminals understand DOS' escape sequences for save/restore cursor, so use the more typical sequences from terminfo. Closes: #772521 Signed-off-by: James McCoy <jamessan@debian.org>
2015-08-15Add GetPriority(VerIterator) to pkgDepCache::PolicyJulian Andres Klode
Also unify the case of considerFiles and ConsiderFiles to be ConsiderFiles in all cases. Gbp-Dch: ignore
2015-08-15cachefile.cc: Do not ignore return value of pkgDepCache::Init()Julian Andres Klode
Currently, this always returns true, but it might start returning false at some point in the future... Gbp-Dch: ignore
2015-08-14Also add 'in combination with the other options.' to another errorJulian Andres Klode
Gbp-Dch: ignore
2015-08-14Set Acquire::Changelogs::URI::Origin::Tanglu for Tanglu changelogsJulian Andres Klode
2015-08-14Make apt compile with clang++ againMichael Vogt
This allows us to run the clang static analyzer and to run the testsuite with the clang MemorySanitizer.
2015-08-14Say "in combination with the other options" if an option is not understoodJulian Andres Klode
Closes: #762758
2015-08-14Merge branch 'debian/experimental' of https://github.com/DonKult/apt into ↵Julian Andres Klode
debian/experimental
2015-08-13Use setresuid() and setresgid() where availableJulian Andres Klode
2015-08-13Deprecate SPtrArray<T> and convert everyone to unique_ptr<T[]>Julian Andres Klode
More standardization
2015-08-13Mark SPtr as deprecated, and convert users to std::unique_ptrJulian Andres Klode
Switch to std::unique_ptr, as this is safer than SPtr.
2015-08-13C++11: Switch from auto_ptr to unique_ptrJulian Andres Klode
This is nicer
2015-08-12Drop the Section field from pkgCache::Package againJulian Andres Klode
This somehow got back, we don't really know why. Emulate the Section() method in the PkgIterator by looking at the section of the head of the VersionList.
2015-08-12policy: Be more strict about parsing pin files, and document prio 0Julian Andres Klode
Treat invalid pin priorities and overflows as an error. Closes: #429912
2015-08-12Only make Upgradable() return true for packages with a candidateJulian Andres Klode
If there is no candidate, the package should not be considered upgradeable. LP: #896689
2015-08-12Add a parameter ConsiderFiles to GetPriority(VerIterator)Julian Andres Klode
This allows us to exclude files from being considered for the priority, so it will return only specific-version matches.
2015-08-12Do not set unhonored DPKG_NO_TSTP variable for dpkgGuillem Jover
Support for that variable was removed in dpkg in 1.15.6, in commit 6f037003e8b96878b485efb7cbd1f846e3bf4e97. Closes: #765366
2015-08-12Replace all "press enter" occurrences with "press [Enter]"Luca Bruno
Thanks: Andre Felipe Machado for initial patch Closes: 414848
2015-08-11Annotate more methods with APT_OVERRIDEJulian Andres Klode
Gbp-Dch: ignore Reported-By: g++ -Wsuggest-override Thanks: g++ -Wsuggest-override
2015-08-11ExecFork: Use /proc/self/fd to determine which files to closeJulian Andres Klode
This significantly reduces the number of files that have to be closed and seems to be faster, despite the additional reads. On systems where /proc/self/fd is not available, we fallback to the old code that closes all file descriptors >= 3. Closes: #764204
2015-08-11Make QItem a subclass of DescItemJulian Andres Klode
CurrentItem previously was a DescItem, so let's make QItem a DescItem to not break things.
2015-08-11Re-introduce None as a deprecated alias for NoJulian Andres Klode
Gbp-Dch: ignore
2015-08-11Drop C++11 elements from headersJulian Andres Klode
2015-08-11Fix an obscure warning from GCCJulian Andres Klode
It complained about the previous code: apt-pkg/sourcelist.cc: In destructor ‘pkgSourceList::~pkgSourceList()’: apt-pkg/sourcelist.cc:278:4: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations] for (pkgIndexFile * const File : VolatileFiles) ^ There really cannot be an overflow, though. Rewriting it like this seems to fix it.
2015-08-11Simply ignore cruft in the status files, do not treat it as prio 0Julian Andres Klode
This was broken in case all other sources were < 0.
2015-08-11Replace INT_MIN with std::numeric_limits<int>::minJulian Andres Klode
This should fix travis compilation errors. Gbp-Dch: ignore
2015-08-10initialize PinVers to a nullptrDavid Kalnischkies
This makes test-bug-254770-segfault-if-cache-not-buildable happy. Git-Dch: Ignore
2015-08-10move manual-bit from 'oldlibs' pkg to its dependenciesDavid Kalnischkies
oldlibs used to be in APT::Never-MarkAuto-Sections so that old transition packages can be removed without causing the then (autoinstalled) renamed package to be autoremoved. It isn't ideal through as ideally you want the oldlibs package to be removed after nothing depends on it anymore regardless of if you have once installed it by hand or not – and if you had the package talking over (the dependencies) should carry the manual bit now as they are the real deal now. As an added bonus if the package has no dependencies because it is an oldlibs without a direct replacement you should move away from (like lib1 and lib2 are currently in the archive, but there will hopefully only be lib2 in the release) you get a lib1 marked as auto. If the user still needs the oldlibs package for some reason all he has to do is mark it as manual once as this move is only performed if a installed package changes its section from a not-Move-Autobit-Sections to a Move-Autobit-Sections.
2015-08-10move APT::Never-MarkAuto-Sections handling to MarkDeleteDavid Kalnischkies
Having the handling in MarkInstall means that it just effects installation of the metapackage, but if the dependencies change the new dependencies aren't protected (and the old dependencies are still protected for no 'reason'). Having it in MarkDelete means that if a metapackage is sheduled for removal all its currently installed dependencies are marked as manual, which helps against both as in this case there is no new/old and additionally if a user decides the installation of a metapackage was wrong he can just remove it explicitely avoid the manual marking entirely.
2015-08-10no value for MultiArch field is 'no', not 'none'David Kalnischkies
Git-Dch: Ignore
2015-08-10change to libapt-pkg abi 5.0 with versioned symbolsDavid Kalnischkies
We changed an aweful lot of stuff, so 5.0 is properly better than 4.X as a semantic version and as we are at it lets add some trivial symbol versioning as well: We just mark all exported symbols with the same version for now. This isn't really the proper thing to do as if we add symbols in later versions (with the same abi) they will get the same symbols version, but our .symbols file will protect us from the problems arising from this as it will ensure that a package acutally depends on a version of the abi high enough to include the symbol.
2015-08-10mark again deps of pkgs in APT::Never-MarkAuto-Sections as manualDavid Kalnischkies
In 50ef3344c3afaaf9943142906b2f976a0337d264 (and similar for other branches), while 'fixing' the edgecase of a package being in multiple sections (e.g. moved from libs to oldlibs in newer releases) I accidently broke the feature itself completely by operating on the package itself and no longer on its dependencies… The behaviour isn't ideal in multiple ways, which we are hopefully able to fix with new ideas as mentioned in the buglog, but until then the functionality of this "hack" should be restored. Reported-By: Raphaël Hertzog <hertzog@debian.org> Tested-By: Adam Conrad <adconrad@ubuntu.com> Closes: 793360 LP: 1479207 Thanks: Raphaël Hertzog and Adam Conrad for detailed reports and initial patches
2015-08-10drop extra newline in 'Failed to fetch' and 'GPG error' messageDavid Kalnischkies
I never understood why there is an extra newline in those messages, so now is as good time as any to drop them. Lets see if someone complains with a good reason to keep it…
2015-08-10enhance "hit paywall" error message to mention the probable causeDavid Kalnischkies
Reporting errors from Done() is bad for progress reporting and such, so factoring this out is a good idea and we start with moving the supposed- to-be clearsigned file isn't clearsigned out first – improving the error message in the process as we use the same message for a similar case (NODATA) as this is what I have to look at with the venue wifi at DebCamp and the old errormessage doesn't really say anything.
2015-08-10drop obsolete explicit :none handling in pkgCacheGenDavid Kalnischkies
We archieve the same without the special handling now, so drop this code. Makes supporting this abdomination a little longer bearable as well. Git-Dch: Ignore
2015-08-10parse packages from all architectures into the cacheDavid Kalnischkies
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.
2015-08-10eliminate dead file-provides code in cache generationDavid Kalnischkies
The code was never active in production, it just sits there collecting dust and given that it is never tested probably doesn't even work anymore the way it was supposed to be (whatever that was exactly in the first place). So just remove it before I have to "fix" it again next time. Git-Dch: Ignore
2015-08-10elimate duplicated code in pkgIndexFile subclassesDavid Kalnischkies
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
2015-08-10add volatile sources support in libapt-pkgDavid Kalnischkies
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…
2015-08-10just-in-time creation for (explicit) negative depsDavid Kalnischkies
Now that we deal with provides in a more dynamic fashion the last remaining problem is explicit dependencies like 'Conflicts: foo' which have to apply to all architectures, but creating them all at the same time requires us to know all architectures ending up in the cache which isn't needed to be the same set as all foreign architectures. The effect is visible already now through as this prevents the creation of a bunch of virtual packages for arch:all packages and as such also many dependencies, just not very visible if you don't look at the stats… Git-Dch Ignore
2015-08-10just-in-time creation for (implicit) ProvidesDavid Kalnischkies
Expecting the worst is easy to code, but has its disadvantages e.g. by creating package structures which otherwise would have never existed. By creating the provides instead at the time a package structure is added we are well prepared for the introduction of partial architectures, massive amounts of M-A:foreign (and :allowed) and co as far as provides are concerned at least. We have something relatively similar for dependencies already. Many tests are added for both M-A states and the code cleaned to properly support implicit provides for foreign architectures and architectures we 'just' happen to parse. Git-Dch: Ignore
2015-08-10hide implicit deps in apt-cache again by defaultDavid Kalnischkies
Before MultiArch implicits weren't a thing, so they were hidden by default by definition. Adding them for MultiArch solved many problems, but having no reliable way of detecting which dependency (and provides) is implicit or not causes problems everytime we want to output dependencies without confusing our observers with unneeded implementation details. The really notworthy point here is actually that we keep now a better record of how a dependency came to be so that we can later reason about it more easily, but that is hidden so deep down in the library internals that change is more the problems it solves than the change itself.
2015-08-10use a smaller type for flags storage in the cacheDavid Kalnischkies
We store very few flags in the cache, so keeping storage space for 8 is enough for all of them and still leaves a few unused bits remaining for future extensions without wasting bytes for nothing. Git-Dch: Ignore