summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* po-fixups: fill Project-Id-Version and Encoding correctlyGuillem Jover2015-08-1234-34/+34
| | | | Closes: 612996
* travis: add ppa:ubuntu-toolschain-r/test as source for gcc-5David Kalnischkies2015-08-124-5/+18
| | | | | | | | This makes travis-ci able to run our tests again. Sometimes. If it doesn't spontaneously fails with internal gcc errors… Git-Dch: Ignore
* apt.cron.daily: Reference 10periodic instead of 02periodicJulian Andres Klode2015-08-121-1/+1
| | | | LP: #1332106
* debian/control: Rename libapt-pkg4.15 -> libapt-pkg5.0Julian Andres Klode2015-08-111-1/+1
|
* debian/gbp.conf: Set multimaint-merge = TrueJulian Andres Klode2015-08-111-1/+2
| | | | Gbp-Dch: ignore
* Annotate more methods with APT_OVERRIDEJulian Andres Klode2015-08-116-15/+15
| | | | | | Gbp-Dch: ignore Reported-By: g++ -Wsuggest-override Thanks: g++ -Wsuggest-override
* Bump apt-inst SONAME to 2.0 to adjust for the ABI break in apt-pkgJulian Andres Klode2015-08-115-74/+74
|
* Merge changelog entries from sid-gcc5Julian Andres Klode2015-08-111-0/+56
|
* po: Update Simplified Chinese programs translationZhou Mo2015-08-111-13/+13
| | | | | * fix a wrong translation. * update some translations.
* po: update zh_CN translation slightlyZhou Mo2015-08-111-4/+4
|
* ExecFork: Use /proc/self/fd to determine which files to closeJulian Andres Klode2015-08-111-5/+19
| | | | | | | | | | 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
* Make QItem a subclass of DescItemJulian Andres Klode2015-08-111-9/+1
| | | | | CurrentItem previously was a DescItem, so let's make QItem a DescItem to not break things.
* Re-introduce None as a deprecated alias for NoJulian Andres Klode2015-08-111-0/+4
| | | | Gbp-Dch: ignore
* Drop C++11 elements from headersJulian Andres Klode2015-08-113-4/+4
|
* apt-get: Do not include apt-pkg/indexrecords.hJulian Andres Klode2015-08-111-1/+0
| | | | | | It's gone. Gbp-Dch: ignore
* Fix an obscure warning from GCCJulian Andres Klode2015-08-111-2/+2
| | | | | | | | | | | 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.
* Simply ignore cruft in the status files, do not treat it as prio 0Julian Andres Klode2015-08-111-2/+1
| | | | This was broken in case all other sources were < 0.
* Replace INT_MIN with std::numeric_limits<int>::minJulian Andres Klode2015-08-111-2/+2
| | | | | | This should fix travis compilation errors. Gbp-Dch: ignore
* initialize PinVers to a nullptrDavid Kalnischkies2015-08-101-1/+2
| | | | | | This makes test-bug-254770-segfault-if-cache-not-buildable happy. Git-Dch: Ignore
* move manual-bit from 'oldlibs' pkg to its dependenciesDavid Kalnischkies2015-08-103-0/+63
| | | | | | | | | | | | | | | | | | | | | 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.
* move APT::Never-MarkAuto-Sections handling to MarkDeleteDavid Kalnischkies2015-08-103-49/+66
| | | | | | | | | | | | 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.
* no value for MultiArch field is 'no', not 'none'David Kalnischkies2015-08-104-8/+8
| | | | Git-Dch: Ignore
* change to libapt-pkg abi 5.0 with versioned symbolsDavid Kalnischkies2015-08-107-1576/+1584
| | | | | | | | | | | 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.
* update symbols file to current state of affairsDavid Kalnischkies2015-08-102-513/+563
| | | | | | | | | cxx11abi transition happens, we changed a bunch of methods and all that stuff which is really good™ for an abi. Lets just slowly start to stop changing more and a first step is to document the current so changes aren't hidding in a big wall of change anymore. Git-Dch: Ignore
* mark again deps of pkgs in APT::Never-MarkAuto-Sections as manualDavid Kalnischkies2015-08-103-3/+116
| | | | | | | | | | | | | | | | | | 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
* drop extra newline in 'Failed to fetch' and 'GPG error' messageDavid Kalnischkies2015-08-106-14/+2
| | | | | | 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…
* enhance "hit paywall" error message to mention the probable causeDavid Kalnischkies2015-08-106-60/+83
| | | | | | | | | 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.
* drop obsolete explicit :none handling in pkgCacheGenDavid Kalnischkies2015-08-102-51/+2
| | | | | | | 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
* parse packages from all architectures into the cacheDavid Kalnischkies2015-08-1011-116/+152
| | | | | | | | | | | | | | | | | | | | | | | 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.
* eliminate dead file-provides code in cache generationDavid Kalnischkies2015-08-103-103/+4
| | | | | | | | | | 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
* elimate duplicated code in pkgIndexFile subclassesDavid Kalnischkies2015-08-1016-472/+460
| | | | | | | | 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-1015-362/+309
| | | | | | | | | | | | | | | | | | | 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…
* just-in-time creation for (explicit) negative depsDavid Kalnischkies2015-08-106-88/+83
| | | | | | | | | | | | | | 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
* just-in-time creation for (implicit) ProvidesDavid Kalnischkies2015-08-109-51/+466
| | | | | | | | | | | | | | | | 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
* hide implicit deps in apt-cache again by defaultDavid Kalnischkies2015-08-1012-150/+169
| | | | | | | | | | | | | | 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.
* use a smaller type for flags storage in the cacheDavid Kalnischkies2015-08-104-47/+84
| | | | | | | | 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
* remove the compatibility markers for 4.13 abiDavid Kalnischkies2015-08-1026-304/+18
| | | | | | | | We aren't and we will not be really compatible again with the previous stable abi, so lets drop these markers (which never made it into a released version) for good as they have outlived their intend already. Git-Dch: Ignore
* link DependencyData structs togetherDavid Kalnischkies2015-08-104-47/+47
| | | | | | | | | Cache generation needs a way of quickly iterating over the unique potion of the dependencies to be able to share them. By linking them together we can reduce the speed penality (~ 80%) with only a small reduction in saved size (~ 20%). Git-Dch: Ignore
* split-up Dependency structDavid Kalnischkies2015-08-106-62/+167
| | | | | | | | | | | | | | | | | | | | | Having dependency data separated from the link between version/package and the dependency allows use to work on sharing the depdency data a bit as it turns out that many dependencies are in fact duplicates. How many are duplicates various heavily with the sources configured, but for a single Debian release the ballpark is 2 duplicates for each dependency already (e.g. libc6 counts 18410 dependencies, but only 45 unique). Add more releases and the duplicates count only rises to get ~6 for 3 releases. For each architecture a user has configured which given the shear number of dependencies amounts to MBs of duplication. We can cut down on this number, but pay a heavy price for it: In my many releases(3) + architectures(3) test we have a 10% (~ 0.5 sec) increase in cache creationtime, but also 10% less cachesize (~ 10 MB). Further work is needed to rip the whole benefits from this through, so this is just the start. Git-Dch: Ignore
* bunch of micro-optimizations for depcacheDavid Kalnischkies2015-08-107-154/+149
| | | | | | | | DepCache functions are called a lot, so if we can squeeze some drops out of them for free we should do so. Takes also the opportunity to remove some whitespace errors from these functions. Git-Dch: Ignore
* avoid virtual in the iteratorsDavid Kalnischkies2015-08-105-92/+77
| | | | | | | | With a bit of trickery and the Curiously recurring template pattern we can free us from our use of virtual in the iterators were it is unneeded bloat as we never deal with pointers to iterators and similar such. Git-Dch: Ignore
* show or-groups in not-installed recommends and suggests listsDavid Kalnischkies2015-08-1018-203/+420
| | | | | | | | Further abstracting our new ShowList allows to use it for containers of strings as well giving us the option to implement an or-groups display for the recommends and suggests lists which is a nice trick given that it also helps with migrating the last remaining other cases of old ShowList.
* headers are for declarations onlyDavid Kalnischkies2015-08-103-216/+243
| | | | | | | | Housekeeping. This used to be embedded in apt-get directly, then moved to into our (then new) private lib and now header and code get a proper separation. Git-Dch: Ignore
* implement a more generic ShowList methodDavid Kalnischkies2015-08-1058-341/+570
| | | | | | | | | | | | | | | apt-get is displaying various lists of package names, which until now it was building as a string before passing it to ShowList, which inserted linebreaks at fitting points and showed a title if needed, but it never really understood what it was working with. With the help of C++11 the new generic knows not only what it works with, but generates the list on the fly rather than asking for it and potentially discarding parts of the input (= the non-default verbose display). It also doubles as a test for how usable the CacheSets are with C++11. (Not all callers are adapted yet.) Git-Dch: Ignore
* enforce GCC5 C++11 ABI and usageDavid Kalnischkies2015-08-102-2/+3
| | | | | | | | The library(s) make an API break anyhow, so lets ensure we use gcc5 for this break and enable c++11 as standard as gcc6 will use it as default and should provide some API parts for c++11 – beside that it can't hurt to use c++11 itself. We just have to keep our headers c++03 compatible to not enforce a standrd bump in our reverse dependencies.
* rename 'apt-get files' to 'apt-get indextargets'David Kalnischkies2015-08-1011-68/+70
| | | | | | | | 'files' is a bit too generic as a name for a command usually only used programmatically (if at all) by developers, so instead of "wasting" this generic name for this we use "indextargets" which is actually the name of the datastructure the displayed data is stored in. Along with this rename the config options are renamed accordingly.
* disable locking even for root in --simulateDavid Kalnischkies2015-08-101-3/+5
| | | | | | | | | | | | | | | Six years ago in 55a5a46c235a30bf024fb2301066553953701cc5 apt-get learned to disable locking if run as normal user and show a message. Helmut Grohne rightly suggests on IRC now that there isn't much point in getting the locks for root either as the output isn't in any way more authoritive than without locking given that after this call the lock is freed and any action can sneak in before we make the next call. So we exchange no benefit for the disavantage of blocking real calls. This can be especially confusing with the aliases --no-act and --just-print. We do not print the message we print for users through as the non-root users can be confronted with a lot more difference via unreadable files.
* handle site-changing redirects as mirror changesDavid Kalnischkies2015-08-103-19/+56
| | | | | | | | | | | | | | | | | | | | | | | Redirectors like httpredir.debian.org orchestra the download from multiple (hopefully close) mirrors while having only a single central sources.list entry by using redirects. This has the effect that the progress report always shows the source it started with, not the mirror it ends up fetching from, which is especially problematic for error reporting as having a report for a "Hashsum mismatch" for the redirector URI is next to useless as nobody knows which URI it was really fetched from (regardless of it coming from a user or via the report script) from this output alone. You would need to enable debug output and hope for the same situation to arise again… We hence reuse the UsedMirror field of the mirror:// method and detect redirects which change the site and declare this new site as the UsedMirrror (and adapt the description). The disadvantage is that there is no obvious mapping anymore (it is relatively easy to guess through with some experience) from progress lines to sources.list lines, so error messages need to take care to use the Target description (rather than current Item description) if they want to refer to the sources.list entry.
* skip .diff/Index acquire if Release file was a hitDavid Kalnischkies2015-08-101-0/+6
| | | | | | | | | QuereURI already skips the aquire of the real file in such a case, but it can't detect pdiffs this way. Those already have a handling if the file wasn't changed in between two Release files, so we just add an other check for a Release file hit here, too. Git-Dch: Ignore
* add c++11 override marker to overridden methodsDavid Kalnischkies2015-08-1054-362/+368
| | | | | | | | | 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