summaryrefslogtreecommitdiff
path: root/apt-pkg/tagfile.cc
Commit message (Collapse)AuthorAgeFilesLines
* do not inline virtual destructors with d-pointersDavid Kalnischkies2014-10-131-0/+2
| | | | | | | | | | | | | | Reimplementing an inline method is opening a can of worms we don't want to open if we ever want to us a d-pointer in those classes, so we do the only thing which can save us from hell: move the destructors into the cc sources and we are good. Technically not an ABI break as the methods inline or not do the same (nothing), so a program compiled against the old version still works with the new version (beside that this version is still in experimental, so nothing really has been build against this library anyway). Git-Dch: Ignore
* Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-231-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h apt-pkg/cachefilter.h configure.ac debian/changelog
| * Ensure that iTFRewritePackageOrder is "MD5sum" to match apt-ftparchiveMichael Vogt2014-09-211-1/+1
| | | | | | | | | | | | | | The iTFRewritePackageOrder is used in indexcopy to copy and normalize cdrom Packages files. This change will ensure that there is no "normalization" that changes MD5sum -> MD5Sum which alters the hash of the Packages file on disk (oh the irony).
* | Add APT::Acquire::$(host)::By-Hash=1 knob, add Acquire-By-Hash to Release fileMichael Vogt2014-05-221-0/+11
| | | | | | | | | | | | | | The by-hash can be configured on a per-hostname basis and a Release file can indicate that it has by-hash support via a new flag. The location of the hash now matches the AptByHash spec
* | improve pkgTagSection scanning and parsingDavid Kalnischkies2014-05-101-78/+131
| | | | | | | | | | | | Removes the 256 fields limit, deals consistently with spaces littered all over the place and is even a tiny bit faster than before. Even comes with a bunch of new tests to validate these claims.
* | add support for apt-get build-dep foo.dscMichael Vogt2014-04-221-0/+11
|/
* follow method attribute suggestions by gccDavid Kalnischkies2014-03-131-1/+1
| | | | | Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-0/+2
| | | | | | | | 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: type qualifiers ignored on function return type [-Wignored-qualifiers]David Kalnischkies2014-03-131-1/+1
| | | | | Reported-By: gcc -Wignored-qualifiers Git-Dch: Ignore
* pkgTagFile: if we have seen the end, do not try to see moreDavid Kalnischkies2014-01-301-1/+5
| | | | | | | | | | Asking for more via Step() will notice that we are done with the file already and will result in a fail, which means we can't find the last sections anymore (which is especially painful if we haven't moved at all as in the testcase we haven't even looked at one of the sources leading to a strange behaviour) Reported-By: Niall Walsh <niallwalsh@users.berlios.de>
* "apt show" show user friendly size infoMichael Vogt2014-01-221-41/+43
| | | | | | The size/installed-size is displayed via SizeToStr() and Size is rewriten to "Download-Size" to make clear what size is refered to here.
* make /etc/apt/preferences parser deal with comment only sectionsMichael Vogt2013-12-211-2/+9
|
* do not trust FileFd::Eof() in pkgTagFile::Fill()David Kalnischkies2013-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | The Eof check was added (by me of course) in 0aae6d14390193e25ab6d0fd49295bd7b131954f as part of a fix up ~a month ago (at DebConf). The idea was not that bad, but doesn't make that much sense either as this bit is set by the FileFd based on Actual as well, so this is basically doing the same check again – with the difference that the HitEof bit can still linger from a previous Read we did at the end of the file, but have seek'd away from it now. Combined with the length of entries, entry order and other not that easily controllable conditions you can be 'lucky' enough to hit this problem in a way which even visible (truncating of other fields might not be visible easily, like 'Tags' and others). Closes: 723705 Thanks: Cyril Brulebois
* do chdir("/") after chroot()Michael Vogt2013-08-221-1/+1
|
* Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sidMichael Vogt2013-08-221-0/+10
|\ | | | | | | | | Conflicts: apt-pkg/tagfile.h
| * memset() pkgTagSections data to make coverity happyMichael Vogt2013-08-061-0/+10
| |
* | use malloc instead of new[] in pkgTagFileDavid Kalnischkies2013-08-151-15/+15
| | | | | | | | | | | | | | | | We don't need initialized memory for pkgTagFile, but more to the point we can use realloc this way which hides the bloody details of increasing the size of the buffer used. Git-Dch: Ignore
* | ensure that pkgTagFile isn't writing past Buffer lengthDavid Kalnischkies2013-08-151-9/+24
|/ | | | | | | | | | | | | | | | | | | | | In 91c4cc14d3654636edf997d23852f05ad3de4853 I removed the +256 from the pkgTagFile call parsing Release files as I couldn't find a mentioning of a reason for why and it was marked as XXX which suggested that at least someone else was suspicious. It turns out that it is indeed "documented", it just didn't found it at first but the changelog of apt 0.6.6 (29. Dec 2003) mentions: * Restore the ugly hack I removed from indexRecords::Load which set the pkgTagFile buffer size to (file size)+256. This is concealing a bug, but I can't fix it right now. This should fix the segfaults that folks are seeing with 0.6.[45]. The bug it is "hiding" is that if pkgTagFile works with a file which doesn't end in a double newline it will be adding it without checking if the Buffer is big enough to store them. Its also not a good idea to let the End pointer be past the end of our space, even if we don't access the data. Closes: 719629
* fix pkgTagSection::Exists() and add testMichael Vogt2013-03-181-1/+8
|
* fix a bunch of cppcheck "(warning) Member variable '<#>' is notDavid Kalnischkies2012-03-041-1/+4
| | | | initialized in the constructor." messages (no functional change)
* use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-0/+1
|
* Support large files in the complete toolset. Indexes of thisDavid Kalnischkies2011-09-131-9/+9
| | | | size are pretty unlikely for now, but we need it for deb packages which could become bigger than 4GB now (LP: #815895)
* reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-2/+4
|
* * [ABI-Break] Implement EDSP in libapt-pkg so that all front-ends whichMichael Vogt2011-06-081-51/+72
|\ | | | | | | | | * [ABI-Break] merge lp:~mvo/apt/sha512-template to add support for sha512 * [ABI-Break] merge lp:~mvo/apt/dpointer to support easier extending without breaking the ABI
| * apt-pkg/tagfile.{cc,h}: add dpointer to pkgTagFileMichael Vogt2011-01-271-51/+72
| |
* | add sha512 support in the client now as wellMichael Vogt2011-02-251-0/+1
| |
* | - try downloading clearsigned InRelease before trying Release.gpgDavid Kalnischkies2011-01-201-3/+7
|/ | | | * apt-pkg/deb/deblistparser.cc: - rewrite LoadReleaseInfo to cope with clearsigned Releasefiles
* merged from lp:~donkult/apt/sidMichael Vogt2010-06-091-0/+24
|\
| * * apt-pkg/pkgcache.h:David Kalnischkies2010-06-031-0/+24
| | | | | | | | | | - switch {,Install-}Size to unsigned long long * apt-pkg/depcache.cc: - deal with long long, not with int to remove 2GB Limit (LP: #250909)
* | * merge the remaining Ubuntu change:Michael Vogt2010-06-091-0/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - on gpg verification failure warn and restore the last known good state - on failure display the IP of the server (useful for servers that use round robin DNS) - support Original-Maintainer in RewritePackageOrder - enable cdrom autodetection via libudev by default - show messsage about Vcs in use when apt-get source is run for packages maintained in a Vcs - better support transitional packages with mark auto-installed. when the transitional package is in "oldlibs" the new package is not marked auto installed (same is true for section metapackages) - provide new "deb mirror://archive.foo/mirrors.list sid main" method expects a list of mirrors (generated on the server e.g. via geoip) and will use that, including cycle on failure - write apport crash file on package failure (disabled by default on debian until apport is available) - support mirror failure reporting (disabled by default on debian)
| * merged from debianMichael Vogt2009-07-301-5/+16
| |\
| * \ * merged apt--no-pragmaMichael Vogt2007-06-091-4/+0
| |\ \
| * \ \ merged from apt--mvoMichael Vogt2006-12-071-4/+37
| |\ \ \
| * | | | * apt-pkg/tagfile.cc:Michael Vogt2006-09-191-0/+2
| | | | | | | | | | | | | | | | | | | | - added ubuntu specific Original-Maintainer field
| * | | | * merged apt--tasks, this brings in the latest changes from apt--mvo as wellMichael Vogt2006-09-191-55/+23
| |\ \ \ \
* | | | | | * apt-pkg/depcache.cc:David Kalnischkies2010-03-141-11/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | - remove Auto-Installed information from extended_states together with the package itself (Closes: #572364)
* | | | | [ABI break] support '#' in apt.conf and /etc/apt/preferencesMichael Vogt2009-06-091-5/+16
| | | | | | | | | | | | | | | (closes: #189866)
* | | | | * Removed the more leftover #pragma interface/implementationMichael Vogt2007-06-081-4/+0
|\ \ \ \ \ | | |_|_|/ | |/| | | closes: #306937 (thanks to Andreas Henriksson for the patch)
| * | | | * remove all the remaining #pragma implementationMichael Vogt2007-06-081-4/+0
| | |_|/ | |/| |
* | | | * merged with apt--mvoMichael Vogt2006-12-141-59/+60
|\| | | | |/ / |/| |
| * | * apt-pkg/tagfile.cc,h:Michael Vogt2006-10-021-4/+37
| |/ | | | | | | - make the internal buffer grow dynamically if required
| * * apt-pkg/tagfile.cc, tagfile.h:Michael Vogt2006-09-151-53/+21
| | | | | | | | | | - reverted the mmap patch again, it caused too much trouble with pipes etc
| * * apt-pkg/tagfile.cc:Michael Vogt2006-09-151-2/+2
| | | | | | | | - applied patch from jvw to make the tag key stuff case-insensitive
* | initial Breaks implementationIan Jackson2006-08-251-0/+1
|/
* * suport both MMapable files and non-mmapable filesMichael Vogt2006-07-261-16/+99
|
* * merged ajs apt-ftparchive branchMichael Vogt2006-07-241-1/+2
|\
| * * added ajs patchMichael Vogt2006-03-081-1/+2
| |
* | * merged with bubulleMichael Vogt2006-06-091-0/+1
|\ \
* | | * merge the patch from SteinarMichael Vogt2006-06-091-1/+1
|/ /
* | * apt-pkg/tagfile.{cc,h}:Michael Vogt2006-04-261-72/+20
|\ \ | |/ |/| | | - use mmap for the tagfile code (closes: #350025)