summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not remove a not working SrvRecords server twiceMichael Vogt2016-01-051-3/+1
| | | | | | | The PopFromSrvRecs() already removed the entry from the active list, so the extra SrvRecords.erase() was incorrect. Git-Dch: ignore
* Add documentation about the SrvRecords support in aptMichael Vogt2016-01-051-0/+22
| | | | Git-Dch: ignore
* Document new APT::Keep-Downloaded-Packages option in NEWSMichael Vogt2016-01-051-0/+18
| | | | Git-Dch: ignore
* test-apt-cache: Adjust for hashtable size changeJulian Andres Klode2016-01-031-3/+3
| | | | Gbp-Dch: ignore
* Increase APT::Cache-HashTableSize default to 50503Julian Andres Klode2016-01-031-1/+1
| | | | | | | | | | | This drop the hash table utilization from a high 98% to acceptable 74% on unstable, and the average bucket length from 4.6 to 1.8. This improves performance by about 5%, while increasing the size of the cache by 0.2 out of 38MB, that is 0.5%. 48481 is a nice number
* apt-cache: stats: Show a table utilization as percentageJulian Andres Klode2016-01-032-2/+3
| | | | Gbp-Dch: ignore
* apt-cache: stats: Average is over used, not all, bucketsJulian Andres Klode2016-01-031-1/+1
| | | | | It does not make sense to consider empty buckets in the average, as they do not affect the lookup performance.
* Allow building without libgtest-dev under <nocheck> build profileHelmut Grohne2016-01-032-1/+6
| | | | | | | | | | | | | | I'd like to avoid pulling libgtest-dev into the bootstrap set. Fortunately, libgtest-dev is only used for testing apt and apt correctly implements DEB_BUILD_OPTIONS=nocheck now. So this bug is about getting rid of the Build-Depends. Simply removing it (by adding a build profile) is not sufficient however as configure fails hard, so an additional bit is necessary to cover for that. Closes: #809726
* Change compressor costs to be 100 apartJulian Andres Klode2016-01-031-9/+9
| | | | | | | | This will give us the freedom to insert more compressors at positions in between. Also change the cost of uncompressed to 0, as that really has no overhead, and the values do not really mean much.
* simple_compressor: Provide some accessors for end and freeJulian Andres Klode2016-01-031-0/+3
| | | | | | This makes code easier to read, and somewhat more correct. Gbp-Dch: ignore
* simple_buffer: Allow buffer size to changeJulian Andres Klode2016-01-031-2/+18
| | | | Gbp-Dch: ignore
* prepare-release: travis: Ignore build profiles in build-dependsJulian Andres Klode2016-01-031-1/+1
| | | | | | | This aids our introduction of lz4, which we do not want to impose as an additional requirement for bootstrappers. Gbp-Dch: ignore
* Add new APT::Keep-Downloaded-Packages optionMichael Vogt2016-01-023-0/+56
| | | | | | | | | | This option controls if downloaded packages should be kept after a successful install or if they should be deleted. The default for "apt-get" is that they are kept (just like before). However the default for "apt" is that they get deleted. Closes: #160743
* Add bash-completion support for the "apt" commandMichael Vogt2016-01-024-1/+110
| | | | | | | | | | | | | The apt bash-completion support was submited to the bash-completion package as a patch in May 2014. It is still not included to this date and because it is an important feature for many users it is now part of apt until the bash-completion package is mantained more actively again. Note that the "Relaces" line is only required for Ubuntu it will have no effect on Debian. Closes: #747094
* Add support for APT::Periodic::CleanIntervalMichael Vogt2016-01-021-1/+21
| | | | | | | | In order to allow regular cleaning of the downloaded deb archives the new option APT::Periodic::CleanInterval is added. It will run "apt-get clean" in the given time interval. Thanks: Martin-Éric Racine
* properly parse comments in apt_preferences and deb822-style sourcesDavid Kalnischkies2016-01-025-7/+32
| | | | | | | | | | apt_preferences and deb822-style sources used the specialized class pkgUserTagSection to deal with comments before/after a given stanza, but it couldn't deal with comments in the stanza at all. codesearch suggests that nobody else does and a vastely superior way of working with potentially commented files is implemented now, so we can officially discourage the use of the old incomplete hack class.
* support comments in debian/control parsingDavid Kalnischkies2016-01-022-4/+45
| | | | | | | | | Now (55153bf94ff28a23318e79aa48242244c4d82b3c) that pkgTagFile can be told to deal with all sorts of comments we can use this mode to parse dsc (as by catch) and debian/control files properly even in the wake of multiline fields spliced with comments like Build-Depends. Closes: 806775
* add optional support for comments in pkgTagFileDavid Kalnischkies2016-01-023-43/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APT usually deals with perfectly formatted files generated automatically be other programs – and as it has to parse multiple MBs of such files it tries to be fast rather than forgiving. This was always a problem if we reused this parser for files with a deb822 syntax which are mostly written by hand however, like apt_preferences or the deb822-style sources as these can include stray newlines and more importantly comments all over the place. As a stopgap we had pkgUserTagSection which deals at least with comments before and after a given stanza, but comments in between weren't really supported and now that we support parsing debian/control for e.g. build-dep we face the full comment problem e.g. with comments inbetween multi-line fields (like Build-Depends). We can't easily deal with this on the pkgTagSection level as the interface gives access to 'raw' char-pointers for performance reasons so we would need to optionally add a buffer here on which we could remove comments to hand out pointers into this buffer instead. The interface is quite large already and supports writing stanzas as well, which does not support comments at all either. So while in future it might make sense to have a parser setup which deals with and keeps comments in this commit we opt for the simpler solution for now: We officially declare that pkgTagSection does not support comments and instead expect the caller to deal with them, which in our case is pkgTagFile: pkgTagFile is extended with an additional mode which can deal with comments by dropping them from the buffer which will later form the input of pkgTagSection. The actual implementation is slightly more complex than this sentence suggests at first on one hand to have good performance and on the other to allow jumping directly to stanzas with offsets collected in a previous run (like our cache generation does it for example).
* fail installing build-deps if parsing them failedDavid Kalnischkies2016-01-021-1/+1
| | | | Git-Dch: Ignore
* Italian manpages translation updateBeatrice Torracca2016-01-021-649/+706
| | | | Closes: 809522
* Release 1.1.101.1.10Julian Andres Klode2015-12-3057-251/+295
|
* Do not sync the cache fileJulian Andres Klode2015-12-291-2/+0
| | | | Integrity is taken care of by the checksum now.
* Add support for calculating hashes over the entire cacheJulian Andres Klode2015-12-293-5/+43
|
* pkgCacheGenerator: Allow passing down an already created cacheJulian Andres Klode2015-12-293-5/+19
| | | | | If we already have opened a cache, there is no point in having to open it again.
* pkgTagSection::Scan: Fix read of uninitialized valueJulian Andres Klode2015-12-291-1/+1
| | | | | We ignored the boundary of the buffer we were reading in while scanning for spaces.
* strutl.cc: Add declarations for the compat _ascii() functionsJulian Andres Klode2015-12-291-0/+2
| | | | | | This shuts up gcc Gbp-Dch: ignore
* Fix test case that was broken by switch of hash functionJulian Andres Klode2015-12-291-5/+5
| | | | This test relies on the ordering of the hash function.
* Turn tolower_ascii() and isspace_ascii() into inline functionsJulian Andres Klode2015-12-292-11/+21
| | | | | | | | | | To preserve compatibility, the new inline functions have _inline as a suffix, and a macro defines the old names to refer to the inline variants. The old functions are still preserved for binary compatibility. Also simplify the implementation of both functions.
* Switch to DJB hashing and use prime number as table sizeJulian Andres Klode2015-12-291-7/+7
| | | | | | On my testing system, consisting of unstable and experimental, this reduces the average chain from 6.5 to 4.5, and the longest chain from 17 to 15.
* BufferedFileFdPrivate: Make InternalFlush() save against errorsJulian Andres Klode2015-12-281-8/+8
| | | | | | | | | | | Previously, if flush errored inside the loop, data could have already been written to the wrapped descriptor without having been removed from the buffer. Also try to work around EINTR here. A better solution might be to have the individual privates detect an interrupt and return 0 in such a case, instead of relying on errno being untouched in between the syscall and the return from InternalWrite.
* aptconfiguration: Set default compression level to 6Julian Andres Klode2015-12-281-5/+5
| | | | | | | | | | | | | | | | | | Since commit 7a68effcb904b4424b54a30e448b6f2560cd1078, the xz and lzma compressors read the level of compression they shall use. A default of -9 is too much for them, this will use 674 MB, according to the xz manual page. Level -6 on the other hand only needs 94 MB memory for compression. This causes autopkgtest failures in the test-compressed-indexes test, as not enough memory exists to proceed. Change the other compression levels to 6 as well: The gzip and bzip2 FileFd backends do not read them, and use their code's default level which is 6, so do the same for external methods.
* apt-helper: Use CopyFile() for concatenating the filesJulian Andres Klode2015-12-281-10/+2
| | | | | | | There's no point in keeping using yet another read-then-write loop. Gbp-Dch: ignore
* BufferedWriter: flushing: Check for written < size instead of <=Julian Andres Klode2015-12-281-3/+1
| | | | | This avoids some issues with InternalWrite returning 0 because it just cannot write stuff at the moment.
* fix 3 typos/omissions in apt.conf(5)Beatrice Torracca2015-12-2711-144/+155
| | | | Closes: 809160
* deal with empty values properly in deb822 parserDavid Kalnischkies2015-12-272-2/+7
| | | | | | | | Regression introduced in 8710a36a01c0cb1648926792c2ad05185535558e, but such fields are unlikely in practice as it is just as simple to not have a field at all with the same result of not having a value. Closes: 808102
* Release 1.1.91.1.9Julian Andres Klode2015-12-2757-58/+305
|
* doc/acquire-additional-files.txt: Mention apt-helper cat-fileJulian Andres Klode2015-12-271-1/+2
| | | | People should know that this is exists.
* allow repositories to forbid arch:all for specific index targetsDavid Kalnischkies2015-12-276-3/+70
| | | | | | | | | | | | | | | | | | | | | | | | Debian has a Packages file for arch:all already, but the arch:any files contain arch:all packages as well, so downloading it would be a total waste of resources. Getting this solved is on the list of things to do, but it is also the hardest part – for index targets like Contents the situation is much easier and less server/client implementations are involved so we might not want to stall them. A repository can now declare via: No-Support-for-Architecture-all: Packages that even if an arch:all Packages exists, it shouldn't be downloaded, so that support for Contents files can be added now. See also 1dd20368486820efb6ef4476ad739e967174bec4 for the implementation of downloading arch:all index targets, which this is limiting. The field uses the name of the target from the apt configuration for simplicity and is negative by design as this field is intended to be supported/needed only for a "short" time (one or two Debian releases). While this commit theoretically supports any target, its expected to only see "Packages" as a value in reality.
* pkgcachegen.h: Hack around unordered_map not existing before C++11Julian Andres Klode2015-12-271-0/+5
| | | | | This is for public users only, which cannot use the class at all, except for the static methods.
* rred: Use buffered writesJulian Andres Klode2015-12-271-3/+7
| | | | | Buffered writes improve performance a lot, given that we spent about 78% of the time in _write.
* FileFd: Add a buffered writing modeJulian Andres Klode2015-12-272-0/+153
| | | | | This is somewhat experimental right now, and might not work for everyone, so it is on an opt-in basis.
* FildFd: Introduce a Flush() function and call it from Close()Julian Andres Klode2015-12-272-0/+16
| | | | The flush function can be used for buffered writers.
* FileFdPrivate: Add getter and setter for fieldsJulian Andres Klode2015-12-271-9/+42
| | | | | We will soon implement a buffered writing decorator and we will need to forward attribute changes to those.
* fileutl: simple_buffer: Add write() and full() methodsJulian Andres Klode2015-12-271-0/+11
| | | | | | These can be used to implement write buffering Gbp-Dch: ignore
* fileutl: simple_buffer: Mark accessors as constJulian Andres Klode2015-12-271-2/+3
| | | | | | Suggested by David. Gbp-Dch: ignore
* FileFdPrivate: Extract SimpleBuffer and mark it as hiddenJulian Andres Klode2015-12-271-21/+24
| | | | Gbp-Dch: ignore
* rred: Only call pkgInitConfig() in test modeJulian Andres Klode2015-12-271-2/+2
| | | | | | | This accidentally slipped in in a previous commit, but it should be used only for testing mode. Reported-By: David Kalnischkies <david@kalnischkies.de>
* ParseDepends: Mark branches for build-dep parsing as unlikelyJulian Andres Klode2015-12-271-2/+2
| | | | | | We do not see those branches at all during normal mode of operation (that is, during cache generation), so tell the compiler about it.
* debListParser: Do not validate Description-md5 for correctness twiceJulian Andres Klode2015-12-271-2/+4
| | | | | The Set() method returns false if the input is no hex number, so simply use that.
* Hex2Digit: Do not use isxdigit()Niels Thykier2015-12-271-4/+9
| | | | | | | We directly check if we are a hex digit in HexDigit, so use that information. [jak@debian.org: Commit message wording]