Julian Andres Klode [Fri, 14 Aug 2015 19:22:43 +0000 (21:22 +0200)]
Set Acquire::Changelogs::URI::Origin::Tanglu for Tanglu changelogs
Julian Andres Klode [Fri, 14 Aug 2015 19:11:40 +0000 (21:11 +0200)]
debian/control: Remove XS- from Testsuite and bump Standards-Version
Thanks: Lintian
Julian Andres Klode [Fri, 14 Aug 2015 19:09:11 +0000 (21:09 +0200)]
debian/control: Drop the versioned python-apt conflict
Thanks: Lintian
Julian Andres Klode [Fri, 14 Aug 2015 19:06:41 +0000 (21:06 +0200)]
debian/control: Replace debian by Debian
Thanks: Lintian
Julian Andres Klode [Fri, 14 Aug 2015 19:05:50 +0000 (21:05 +0200)]
changelog: Replace reenable by re-enable everywhere
Thanks: Lintian
Julian Andres Klode [Fri, 14 Aug 2015 18:35:18 +0000 (20:35 +0200)]
apt: Add autoremove and auto-remove commands
Michael Vogt [Fri, 14 Aug 2015 17:44:25 +0000 (19:44 +0200)]
Make apt compile with clang++ again
This allows us to run the clang static analyzer and to run the
testsuite with the clang MemorySanitizer.
Julian Andres Klode [Fri, 14 Aug 2015 16:27:24 +0000 (18:27 +0200)]
Make auto-remove and auto-clean aliases for the versions without -
Some people type them instead of autoremove and autoclean, so make
them happy.
Closes: #274159
Makes-Happy: Ansgar
Julian Andres Klode [Fri, 14 Aug 2015 15:26:48 +0000 (17:26 +0200)]
apt_preferences(5): Mention overlapping of pin matches
Julian Andres Klode [Fri, 14 Aug 2015 15:22:30 +0000 (17:22 +0200)]
apt_preferences(5): Correct default pin assignment documentation
This was broken, as higher pins were also assigned to versions
that are installed.
Closes: #623706
Julian Andres Klode [Fri, 14 Aug 2015 14:57:02 +0000 (16:57 +0200)]
apt-cache(8): Mention that --names-only search provides
Closes: #618017
Julian Andres Klode [Fri, 14 Aug 2015 13:07:28 +0000 (15:07 +0200)]
apt-cache: Show an error if stats gets any arguments
Closes: #153161
Julian Andres Klode [Fri, 14 Aug 2015 12:51:02 +0000 (14:51 +0200)]
Say "in combination with the other options" if an option is not understood
Closes: #762758
Julian Andres Klode [Fri, 14 Aug 2015 12:42:08 +0000 (14:42 +0200)]
Mention that source order only matter per version
Closes: #617445
Julian Andres Klode [Fri, 14 Aug 2015 11:53:30 +0000 (13:53 +0200)]
Replace UINT_MAX with std::numeric_limits<unsigned int>::max()
Gbp-Dch: ignore
Julian Andres Klode [Fri, 14 Aug 2015 11:44:28 +0000 (13:44 +0200)]
Add integration test for Pin-Priority range checks
Gbp-Dch: ignore
Julian Andres Klode [Fri, 14 Aug 2015 09:49:45 +0000 (11:49 +0200)]
Replace --force-yes by various options starting with --allow
This enables more fine grained control over such exceptions.
Julian Andres Klode [Fri, 14 Aug 2015 08:50:56 +0000 (10:50 +0200)]
Merge branch 'debian/experimental' of https://github.com/DonKult/apt into debian/experimental
Julian Andres Klode [Fri, 14 Aug 2015 08:02:08 +0000 (10:02 +0200)]
po/fr.po: Remove the unbreakable space before ! in the confirm string
This was probably really annoying for French people wanting to remove
essential packages, sorry about that.
Closes: #727680
Julian Andres Klode [Thu, 13 Aug 2015 19:14:00 +0000 (21:14 +0200)]
Accept --upgradeable as synonym for --upgradable
It's a tiny diff, so why not? But no need to document it.
Closes: #787846
Julian Andres Klode [Wed, 24 Sep 2014 20:18:16 +0000 (22:18 +0200)]
Use setresuid() and setresgid() where available
Julian Andres Klode [Thu, 13 Aug 2015 09:28:32 +0000 (11:28 +0200)]
Deprecate SPtrArray<T> and convert everyone to unique_ptr<T[]>
More standardization
Julian Andres Klode [Thu, 13 Aug 2015 08:49:31 +0000 (10:49 +0200)]
Mark SPtr as deprecated, and convert users to std::unique_ptr
Switch to std::unique_ptr, as this is safer than SPtr.
Julian Andres Klode [Thu, 13 Aug 2015 08:43:49 +0000 (10:43 +0200)]
C++11: Switch from auto_ptr to unique_ptr
This is nicer
Julian Andres Klode [Thu, 13 Aug 2015 08:48:22 +0000 (10:48 +0200)]
Remove an invalid fi from a testcase
Gbp-Dch: ignore
Julian Andres Klode [Thu, 13 Aug 2015 08:31:50 +0000 (10:31 +0200)]
Fix integration tests for the removal of the Package pin output
This should make them work again.
Julian Andres Klode [Wed, 12 Aug 2015 21:44:33 +0000 (23:44 +0200)]
Drop the Section field from pkgCache::Package again
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.
Julian Andres Klode [Wed, 12 Aug 2015 18:46:00 +0000 (20:46 +0200)]
apt_preferences(5): Re-document how priorities are calculated
The old text did not match either the old or the new implementation,
so let's rewrite it to explain the new implementation.
Closes: #554773
Julian Andres Klode [Wed, 12 Aug 2015 18:44:40 +0000 (20:44 +0200)]
policy: Be more strict about parsing pin files, and document prio 0
Treat invalid pin priorities and overflows as an error.
Closes: #429912
Julian Andres Klode [Wed, 12 Aug 2015 16:01:24 +0000 (18:01 +0200)]
apt-cache: Improve translateability of the "with priority" thing
Gbp-Dch: ignore
Julian Andres Klode [Wed, 12 Aug 2015 11:10:32 +0000 (13:10 +0200)]
Only make Upgradable() return true for packages with a candidate
If there is no candidate, the package should not be considered
upgradeable.
LP: #896689
Julian Andres Klode [Wed, 12 Aug 2015 11:08:51 +0000 (13:08 +0200)]
apt-cache: Modify policy output to use per-version pins
Also optionally enable old output by setting APT::Policy=0.
Julian Andres Klode [Wed, 12 Aug 2015 11:07:56 +0000 (13:07 +0200)]
Add a parameter ConsiderFiles to GetPriority(VerIterator)
This allows us to exclude files from being considered for the
priority, so it will return only specific-version matches.
Johannes Schauer [Sun, 26 Apr 2015 07:58:05 +0000 (09:58 +0200)]
use a=experimental instead n=experimental in pin documentation
Closes: 783343
Tomas Pospisek [Tue, 27 Jan 2015 13:10:38 +0000 (14:10 +0100)]
document APT::Periodic::RandomSleep
The documentation in the patch is from
https://help.ubuntu.com/community/AutomaticSecurityUpdates
That page is licensed under Creative Commons Attribution-ShareAlike
3.0. Because I'm unsure how that license meshes with apt's license
I've not copied the text but formulated the same information freely
in my own words.
The original text was contributed by Chris Bainbridge [1][3]
and Kees Cook [2]. Thanks to them.
[1] https://help.ubuntu.com/community/AutomaticSecurityUpdates?action=diff&rev1=40&rev2=41
[2] https://help.ubuntu.com/community/AutomaticSecurityUpdates?action=diff&rev1=38&rev2=39
[3] https://help.ubuntu.com/community/AutomaticSecurityUpdates?action=diff&rev1=37&rev2=38
Closes: 776380
Thanks: Chris Bainbridge and Kees Cook for initial text
Guillem Jover [Tue, 14 Oct 2014 11:52:33 +0000 (13:52 +0200)]
Do not set unhonored DPKG_NO_TSTP variable for dpkg
Support for that variable was removed in dpkg in 1.15.6, in commit
6f037003e8b96878b485efb7cbd1f846e3bf4e97.
Closes: #765366
Jonathan Nieder [Tue, 11 Aug 2015 20:07:18 +0000 (22:07 +0200)]
document VERSION 2 (and 3) pre-install-pkgs hook interface
[Commiter: Patch adapted to apply to current version of the manpage and
added/moved a few words about Version 3 to make it fit better]
Closes: 627188
Luca Bruno [Tue, 11 Aug 2015 18:08:43 +0000 (20:08 +0200)]
Replace all "press enter" occurrences with "press [Enter]"
Thanks: Andre Felipe Machado for initial patch
Closes: 414848
Daniel Hartwig [Tue, 11 Aug 2015 17:56:31 +0000 (19:56 +0200)]
replace direct calls to egrep with grep -E
The rest of the initial patch is not needed or incorrect in our usage.
Big changes for the dselect scripts seem unneeded as well as those are
hardly used by anyone anymore…
[commit message written by commiter]
Closes: 255577
Thanks: David Weinehall for initial patch
David Kalnischkies [Tue, 11 Aug 2015 17:24:24 +0000 (19:24 +0200)]
remove Dir:: scope limit of RootDir in the documentation
RootDir doesn't only effect Dir-scope but all FindDir directories, so
document it accordingly.
Closes: 659387
Daniel Hartwig [Tue, 11 Aug 2015 15:59:13 +0000 (17:59 +0200)]
support setting a port for rsh:// in sources.list
[Commiter comment: Untested, but looks and compiles fine, so what could
possibly go wrong]
Closes: 624727
Guillem Jover [Tue, 11 Aug 2015 15:41:27 +0000 (17:41 +0200)]
po-fixups: fill Project-Id-Version and Encoding correctly
Closes: 612996
David Kalnischkies [Mon, 10 Aug 2015 17:00:16 +0000 (19:00 +0200)]
travis: add ppa:ubuntu-toolschain-r/test as source for gcc-5
This makes travis-ci able to run our tests again.
Sometimes.
If it doesn't spontaneously fails with internal gcc errors…
Git-Dch: Ignore
Julian Andres Klode [Wed, 12 Aug 2015 09:39:49 +0000 (11:39 +0200)]
Makefile: Add a make fast command for development
This excludes dselect, po, and doc.
Julian Andres Klode [Wed, 12 Aug 2015 09:10:16 +0000 (11:10 +0200)]
apt.cron.daily: Reference 10periodic instead of 02periodic
LP: #
1332106
Julian Andres Klode [Tue, 11 Aug 2015 18:02:02 +0000 (20:02 +0200)]
debian/control: Rename libapt-pkg4.15 -> libapt-pkg5.0
Julian Andres Klode [Tue, 11 Aug 2015 17:40:22 +0000 (19:40 +0200)]
debian/gbp.conf: Set multimaint-merge = True
Gbp-Dch: ignore
Julian Andres Klode [Tue, 11 Aug 2015 13:58:03 +0000 (15:58 +0200)]
Annotate more methods with APT_OVERRIDE
Gbp-Dch: ignore
Reported-By: g++ -Wsuggest-override
Thanks: g++ -Wsuggest-override
Julian Andres Klode [Tue, 11 Aug 2015 12:37:29 +0000 (14:37 +0200)]
Bump apt-inst SONAME to 2.0 to adjust for the ABI break in apt-pkg
Julian Andres Klode [Tue, 11 Aug 2015 12:10:17 +0000 (14:10 +0200)]
Merge changelog entries from sid-gcc5
Zhou Mo [Mon, 22 Jun 2015 14:38:32 +0000 (14:38 +0000)]
po: Update Simplified Chinese programs translation
* fix a wrong translation.
* update some translations.
Zhou Mo [Mon, 15 Jun 2015 01:39:31 +0000 (01:39 +0000)]
po: update zh_CN translation slightly
Julian Andres Klode [Mon, 25 May 2015 14:45:05 +0000 (16:45 +0200)]
ExecFork: Use /proc/self/fd to determine which files to close
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
Julian Andres Klode [Tue, 11 Aug 2015 10:02:39 +0000 (12:02 +0200)]
Make QItem a subclass of DescItem
CurrentItem previously was a DescItem, so let's make QItem a
DescItem to not break things.
Julian Andres Klode [Tue, 11 Aug 2015 10:01:11 +0000 (12:01 +0200)]
Re-introduce None as a deprecated alias for No
Gbp-Dch: ignore
Julian Andres Klode [Tue, 11 Aug 2015 09:49:21 +0000 (11:49 +0200)]
Drop C++11 elements from headers
Julian Andres Klode [Tue, 11 Aug 2015 09:48:51 +0000 (11:48 +0200)]
apt-get: Do not include apt-pkg/indexrecords.h
It's gone.
Gbp-Dch: ignore
Julian Andres Klode [Tue, 11 Aug 2015 09:05:57 +0000 (11:05 +0200)]
Fix an obscure warning from GCC
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.
Julian Andres Klode [Tue, 11 Aug 2015 08:21:29 +0000 (10:21 +0200)]
Simply ignore cruft in the status files, do not treat it as prio 0
This was broken in case all other sources were < 0.
Julian Andres Klode [Tue, 11 Aug 2015 08:20:58 +0000 (10:20 +0200)]
Replace INT_MIN with std::numeric_limits<int>::min
This should fix travis compilation errors.
Gbp-Dch: ignore
David Kalnischkies [Mon, 10 Aug 2015 15:47:49 +0000 (17:47 +0200)]
initialize PinVers to a nullptr
This makes test-bug-254770-segfault-if-cache-not-buildable happy.
Git-Dch: Ignore
David Kalnischkies [Mon, 10 Aug 2015 14:08:21 +0000 (16:08 +0200)]
move manual-bit from 'oldlibs' pkg to its dependencies
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.
David Kalnischkies [Mon, 10 Aug 2015 12:44:14 +0000 (14:44 +0200)]
move APT::Never-MarkAuto-Sections handling to MarkDelete
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.
David Kalnischkies [Mon, 10 Aug 2015 09:31:28 +0000 (11:31 +0200)]
no value for MultiArch field is 'no', not 'none'
Git-Dch: Ignore
David Kalnischkies [Mon, 10 Aug 2015 09:08:35 +0000 (11:08 +0200)]
change to libapt-pkg abi 5.0 with versioned symbols
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.
David Kalnischkies [Sun, 9 Aug 2015 18:26:37 +0000 (20:26 +0200)]
update symbols file to current state of affairs
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
David Kalnischkies [Mon, 3 Aug 2015 05:00:33 +0000 (07:00 +0200)]
mark again deps of pkgs in APT::Never-MarkAuto-Sections as manual
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
David Kalnischkies [Sun, 9 Aug 2015 17:01:49 +0000 (19:01 +0200)]
drop extra newline in 'Failed to fetch' and 'GPG error' message
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…
David Kalnischkies [Sun, 9 Aug 2015 15:40:57 +0000 (17:40 +0200)]
enhance "hit paywall" error message to mention the probable cause
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.
David Kalnischkies [Mon, 20 Jul 2015 11:34:25 +0000 (13:34 +0200)]
drop obsolete explicit :none handling in pkgCacheGen
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
David Kalnischkies [Mon, 20 Jul 2015 10:32:46 +0000 (12:32 +0200)]
parse packages from all architectures into the cache
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.
David Kalnischkies [Mon, 20 Jul 2015 08:33:07 +0000 (10:33 +0200)]
eliminate dead file-provides code in cache generation
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
David Kalnischkies [Mon, 20 Jul 2015 08:17:29 +0000 (10:17 +0200)]
elimate duplicated code in pkgIndexFile subclasses
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
David Kalnischkies [Sat, 18 Jul 2015 16:03:54 +0000 (18:03 +0200)]
add volatile sources support in libapt-pkg
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…
David Kalnischkies [Fri, 17 Jul 2015 08:53:01 +0000 (10:53 +0200)]
just-in-time creation for (explicit) negative deps
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
David Kalnischkies [Thu, 16 Jul 2015 17:41:45 +0000 (19:41 +0200)]
just-in-time creation for (implicit) Provides
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
David Kalnischkies [Thu, 16 Jul 2015 09:15:25 +0000 (11:15 +0200)]
hide implicit deps in apt-cache again by default
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.
David Kalnischkies [Wed, 15 Jul 2015 12:36:16 +0000 (14:36 +0200)]
use a smaller type for flags storage in the cache
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
David Kalnischkies [Wed, 15 Jul 2015 11:21:21 +0000 (13:21 +0200)]
remove the compatibility markers for 4.13 abi
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
David Kalnischkies [Tue, 14 Jul 2015 11:41:11 +0000 (13:41 +0200)]
link DependencyData structs together
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
David Kalnischkies [Mon, 13 Jul 2015 14:28:21 +0000 (16:28 +0200)]
split-up Dependency struct
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
David Kalnischkies [Mon, 13 Jul 2015 10:47:05 +0000 (12:47 +0200)]
bunch of micro-optimizations for depcache
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
David Kalnischkies [Mon, 13 Jul 2015 21:10:53 +0000 (23:10 +0200)]
avoid virtual in the iterators
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
David Kalnischkies [Mon, 13 Jul 2015 01:36:59 +0000 (03:36 +0200)]
show or-groups in not-installed recommends and suggests lists
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.
David Kalnischkies [Sun, 12 Jul 2015 16:28:34 +0000 (18:28 +0200)]
headers are for declarations only
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
David Kalnischkies [Sun, 12 Jul 2015 11:41:12 +0000 (13:41 +0200)]
implement a more generic ShowList method
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
David Kalnischkies [Sat, 11 Jul 2015 18:21:45 +0000 (20:21 +0200)]
enforce GCC5 C++11 ABI and usage
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.
David Kalnischkies [Thu, 9 Jul 2015 22:07:37 +0000 (00:07 +0200)]
rename 'apt-get files' to 'apt-get indextargets'
'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.
David Kalnischkies [Thu, 9 Jul 2015 19:10:53 +0000 (21:10 +0200)]
disable locking even for root in --simulate
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.
David Kalnischkies [Thu, 9 Jul 2015 10:21:20 +0000 (12:21 +0200)]
handle site-changing redirects as mirror changes
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.
David Kalnischkies [Thu, 9 Jul 2015 10:01:29 +0000 (12:01 +0200)]
skip .diff/Index acquire if Release file was a hit
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
David Kalnischkies [Wed, 8 Jul 2015 22:35:40 +0000 (00:35 +0200)]
add c++11 override marker to overridden methods
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
David Kalnischkies [Wed, 8 Jul 2015 20:44:09 +0000 (22:44 +0200)]
implement reverse_iterators for cachesets
By further abstracting the iterator templates we can wrap the reverse
iterators of the wrapped containers and share code in a way that
iterator creating is now more template intensive, but shorter in code.
Git-Dch: Ignore
David Kalnischkies [Wed, 8 Jul 2015 14:37:04 +0000 (16:37 +0200)]
prepare cachesets for -std=c++11
The "problem" is mostly in the erase() definitions as they slightly
conflict and in pre-c++11 are not uniformly in different containers.
By differenciating based on the standard we can provide erase() methods
for both standards – and as the method is in a template and inline we
don't need to worry about symbols here.
The rest is adding wrappings for the new forward_list and unordered_set
containers and correcting our iterators to use the same trait as the
iterator they are wrapping instead of having all of them be simple
forward iterators. This allows the use of specialized algorithms which
are picked based on iterator_traits and implementing them all is simple
to do as we can declare all methods easily and only if they are called
they will generate errors (if the underlying iterator doesn't support
these).
Git-Dch: Ignore
David Kalnischkies [Tue, 7 Jul 2015 20:11:20 +0000 (22:11 +0200)]
implement Signed-By without using gpg for verification
The previous commit returns to the possibility of using just gpgv for
verification proposes. There is one problem through: We can't enforce a
specific keyid without using gpg, but our acquire method can as it
parses gpgv output anyway, so it can deal with good signatures from not
expected signatures and treats them as unknown keys instead.
Git-Dch: Ignore
David Kalnischkies [Tue, 7 Jul 2015 09:46:39 +0000 (11:46 +0200)]
merge keyrings with cat instead of gpg in apt-key
If all keyrings are simple keyrings we can merge the keyrings with cat
rather than doing a detour over gpg --export | --import (see #790665),
which means 'apt-key verify' can do without gpg and just use gpgv as
before the merging change.
We declare this gpgv usage explicit now in the dependencies. This isn't
a new dependency as gnupg as well as debian-archive-keyring depend on
and we used it before unconditionally, just that we didn't declare it.
The handling of the merged keyring needs to be slightly different as our
merged keyring can end up containing the same key multiple times, but at
least currently gpg does remove only the first occurrence with
--delete-keys, so we move the handling to a if one is gone, all are gone
rather than an (implicit) quid pro quo or even no effect.
Thanks: Daniel Kahn Gillmor for the suggestion
David Kalnischkies [Mon, 6 Jul 2015 19:15:45 +0000 (21:15 +0200)]
support gpg 2.1.x in apt-key
The output of gpg slightly changes in 2.1 which breaks the testcase, but
the real problem is that this branch introduces a new default keyring
format (which is called keybox) and mixing it with simple keyrings (the
previous default format) has various problems like failing in the keybox
to keyring import (#790665) or [older] gpgv versions not being able to
deal with keyboxes (and newer versions as well currently:
https://bugs.gnupg.org/gnupg/issue2025).
We fix this by being a bit more careful in who creates keyrings (aka: we
do it or we take a simple keyring as base) to ensure we always have a
keyring instead of a keybox. This way we can ensure that any version
combination of gpv/gpgv2 and gnupg/gnupg2 without doing explicit version
checks and use the same code for all of them.
Closes: 781042
David Kalnischkies [Mon, 6 Jul 2015 14:44:01 +0000 (16:44 +0200)]
enhance apt-key debugging options
It is sometimes handy to know how apt-key exactly called gpg, so adding
a pair of options to be able to see this if wanted is added. Two are
needed as some commands output is redirected to /dev/null, while sfor
others stdout is piped into another gpg call so in both cases you
wouldn't see all and hence you can choose.
Git-Dch: Ignore
David Kalnischkies [Tue, 30 Jun 2015 08:53:51 +0000 (10:53 +0200)]
allow individual targets to be kept compressed
There is an option to keep all targets (Packages, Sources, …) compressed
for a while now, but the all-or-nothing approach is a bit limited for
our purposes with additional targets as some of them are very big
(Contents) and rarely used in comparison, so keeping them compressed by
default can make sense, while others are still unpacked.
Most interesting is the copy-change maybe: Copy is used by the acquire
system as an uncompressor and it is hence expected that it returns the
hashes for the "output", not the input. Now, in the case of keeping a
file compressed, the output is never written to disk, but generated in
memory and we should still validated it, so for compressed files copy is
expected to return the hashes of the uncompressed file. We used to use
the config option to enable on-the-fly decompress in the method, but in
reality copy is never used in a way where it shouldn't decompress a
compressed file to get its hashes, so we can save us the trouble of
sending this information to the method and just do it always.
Yuri Kozlov [Wed, 24 Jun 2015 20:35:00 +0000 (22:35 +0200)]
Russian program translation update
Closes: 789709