summaryrefslogtreecommitdiff
path: root/ftparchive/apt-ftparchive.cc
Commit message (Collapse)AuthorAgeFilesLines
* Use a steady clock source for progress reportingDavid Kalnischkies2018-05-281-32/+38
| | | | | | Clock changes while apt is running can result in strange reports confusing (and amusing) users. Sadly, to keep the ABI for now the code is a bit more ugly than it would need to be.
* Remove obsolete RCS keywordsGuillem Jover2018-05-071-1/+0
| | | | Prompted-by: Jakub Wilk <jwilk@debian.org>
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-12/+12
| | | | | | | | | | | | | This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
* Refactor to avoid loop/dangling gcc warningsDavid Kalnischkies2017-06-261-8/+4
| | | | Gbp-Dch: Ignore
* look into the right textdomain for apt-utils againDavid Kalnischkies2016-05-281-2/+0
| | | | | Broken in e7e10e47476606e3b2274cf66b1e8ea74b236757 by looking always into "apt" while we ship some tools in "apt-utils"…
* drop some needlessly public declarations in libapt-privateDavid Kalnischkies2015-11-291-2/+2
| | | | Git-Dch: Ignore
* use function pointers instead of weak symbols for cmdline parsingDavid Kalnischkies2015-11-291-1/+1
| | | | | | | | Passing function pointers around while working on this was very icky, but if weak symbols are too much to ask for… Reverts "do not use "-Wl,-Bsymbolic-functions" during the build to avoid breakage" aka a5fc9be36211a290a7abc3ca2a8bf98943bc1f57.
* apply various suggestions made by cppcheckDavid Kalnischkies2015-11-051-4/+4
| | | | | Reported-By: cppcheck Git-Dch: Ignore
* support arch:all data e.g. in separate Packages fileDavid Kalnischkies2015-11-041-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a discussion with Niels Thykier who asked for Contents-all this implements apt trying for all architecture dependent files to get a file for the architecture all, which is treated internally now as an official architecture which is always around (like native). This way arch:all data can be shared instead of duplicated for each architecture requiring the user to download the same information again and again. There is one problem however: In Debian there is already a binary-all/ Packages file, but the binary-any files still include arch:all packages, so that downloading this file now would be a waste of time, bandwidth and diskspace. We therefore need a way to decide if it makes sense to download the all file for Packages in Debian or not. The obvious answer would be a special flag in the Release file indicating this, which would need to default to 'no' and every reasonable repository would override it to 'yes' in a few years time, but the flag would be there "forever". Looking closer at a Release file we see the field "Architectures", which doesn't include 'all' at the moment. With the idea outlined above that 'all' is a "proper" architecture now, we interpret this field as being authoritative in declaring which architectures are supported by this repository. If it says 'all', apt will try to get all, if not it will be skipped. This gives us another interesting feature: If I configure a source to download armel and mips, but it declares it supports only armel apt will now print a notice saying as much. Previously this was a very cryptic failure. If on the other hand the repository supports mips, too, but for some reason doesn't ship mips packages at the moment, this 'missing' file is silently ignored (= that is the same as the repository including an empty file). The Architectures field isn't mandatory through, so if it isn't there, we assume that every architecture is supported by this repository, which skips the arch:all if not listed in the release file.
* revamp all tools help messagesDavid Kalnischkies2015-11-041-7/+7
| | | | | | | | | | | | | | | | The general idea is: A small paragraph on the tool itself as a description, a list of the most used (!= all) commands available in the tool, a remark where to find more information on the tool and its commands (aka: in the manpage) and finally a common block referring to even more manpages. In exchange options are completely omitted from the output as well as deprecated or obscure commands. (Better) Information about them is available in the manpages anyway and the few options which were listed before were also the least interesting ones (-o -c -q and co are hardly of interest for someone totally new looking to find info by asking for help and anyone with a bit of experience doesn't need this short list. Those would need a list of options applying to the command they call, but they are too numerous and command specific to list them sanely in this context.
* deal with --version more centrallyDavid Kalnischkies2015-11-041-6/+1
| | | | Git-Dch: Ignore
* move apts cmdline helper type into -privateDavid Kalnischkies2015-11-041-3/+2
| | | | | | | | Its not as simple as I initially thought to abstract this enough to make it globally usable, so lets not pollute global namespace with this for now. Git-Dch: Ignore
* generate commands array after config is loadedDavid Kalnischkies2015-11-041-8/+10
| | | | | | | This ensures that location strings loaded from a location specified via configuration (Dir::Locale) effect the help messages for commands. Git-Dch: Ignore
* deduplicate main methodsDavid Kalnischkies2015-11-041-31/+5
| | | | | | | | All mains pretty much do the same thing, so lets try a little harder to move the common parts into -private to have the real differences more visible. Git-Dch: Ignore
* split up help messages for simpler reuseDavid Kalnischkies2015-11-041-15/+17
| | | | | | | | | | | | | That is one huge commit with busy work only: Help messages used to be one big translateable string, which is a pain for translators and hard to reuse for us. This change there 'explodes' this single string into new string for each documented string trying hard to split up the translated messages as well. This actually restores many translations as previously adding a single command made all of the bug message fuzzy. The splitup also highlighted that its easy to forget a line, duplicate one and similar stuff. Git-Dch: Ignore
* add --sha512 option + documentation for apt-ftparchiveDavid Kalnischkies2015-09-141-0/+1
|
* Replace UINT_MAX with std::numeric_limits<unsigned int>::max()Julian Andres Klode2015-08-141-2/+3
| | | | Gbp-Dch: ignore
* fix memory leaks reported by -fsanitizeDavid Kalnischkies2015-08-101-34/+35
| | | | | | | | Various small leaks here and there. Nothing particularily big, but still good to fix. Found by the sanitizers while running our testcases. Reported-By: gcc -fsanitize Git-Dch: Ignore
* rewrite all TFRewrite instances to use the new pkgTagSection::WriteDavid Kalnischkies2015-05-111-28/+23
| | | | | | | | | While it is mostly busywork to rewrite all instances it actually fixes bugs as the data storage used by the new method is std::string rather than a char*, the later mostly created by c_str() from a std::string which the caller has to ensure keeps in scope – something apt-ftparchive actually didn't ensure and relied on copy-on-write behavior instead which c++11 forbids and hence the new default gcc abi doesn't use it.
* stop displaying time of build in online helpJérémy Bobbio2015-03-161-2/+1
| | | | | | | | | | | | | | | | | | As part of the “reproducible builds” effort [1], we have noticed that apt could not be built reproducibly. One issue is that it uses the __DATE__ and __TIME__ macros of the C preprocessor to display the time of build in the online help. We believe this information not to be really useful to users as they can always look at the package data and metadata to figure it out. The attached patch simply removes this information. All non-documentation packages can then be built reproducibly with our current experimental framework. [David: changed the string slightly to be untranslateable as well] Closes: 774342
* use the same code to detect quiet setting in all toolsDavid Kalnischkies2014-11-091-14/+5
| | | | Git-Dch: Ignore
* streamline display of --help in all toolsDavid Kalnischkies2014-11-091-15/+4
| | | | | | | By convention, if I run a tool with --help or --version I expect it to exit successfully with the usage, while if I do call it wrong (like without any parameters) I expect the usage message shown with a non-zero exit.
* Make Packages & Sources generation optional, during Generate callDimitri John Ledkov2014-09-031-33/+66
| | | | | | | | refactor a bit, extract code out of Generate() into DoGenerate{PackagesAndSources,Contents}, add new APT::FTPArchive::ContentsOnly option to allow skipping the generation of Package/Source files (if they are generated e.g. by some db outside of apt-ftparchives control)
* ensure "--db" also works with the new srcpkgdbMichael Vogt2014-04-071-0/+8
|
* ensure clean worksMichael Vogt2014-04-041-5/+15
|
* Implement CacheDB for source packages in apt-ftparchiveMichael Vogt2014-04-041-3/+27
|
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-4/+13
| | | | | | | | 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: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies2014-03-131-1/+1
| | | | | Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
* warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies2014-03-131-9/+9
| | | | | Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
* fix -Wmissing-field-initializers warningsDavid Kalnischkies2014-03-131-1/+1
| | | | | Reported-By: gcc Git-Dch: Ignore
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-1/+1
|
* merge patch apt_0.9.7.7ubuntu2~md1.debdiff, thanks to Marc DeslauriersMichael Vogt2013-01-311-2/+3
|
* * ftparchive/apt-ftparchive.cc:David Kalnischkies2012-06-091-1/+1
| | | | - default to putting the Contents-* files below $(SECTION) as apt-file expects them there - thanks Martin-Éric Racine! (Closes: #675827)
* the previously used VERSION didn't work everywhere so we are switchingDavid Kalnischkies2012-03-221-1/+1
| | | | to the more standard PACKAGE_VERSION and make it work in every file
* merge with debian/experimentalDavid Kalnischkies2011-09-131-8/+8
|\
| * cppcheck complains about some possible speed improvements which could beDavid Kalnischkies2011-08-111-8/+8
| | | | | | | | | | | | done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
* | Support large files in the complete toolset. Indexes of thisDavid Kalnischkies2011-09-131-5/+5
| | | | | | | | 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-5/+6
|/
* add options to disable specific checksums for IndexesDavid Kalnischkies2011-02-221-0/+2
|
* releasing version 0.8.10.2Michael Vogt2011-01-251-1/+1
|
* * ftparchive/apt-ftparchive.cc:David Kalnischkies2010-09-071-1/+6
| | | | - ensure that BinDirectory as well as Tree settings get the correct default FileMode setting (Closes: #595922)
* merged from lp:~donkult/apt/sidMichael Vogt2010-04-011-11/+52
|\
| * Switch the TranslationWriter to use MultiCompress to be able to generateDavid Kalnischkies2010-03-261-5/+8
| | | | | | | | | | | | the compressed files as we want them and to prevent the file to be replaced without a reason which could save us from steady redownloads of a file with the same content.
| * Inclusion of Long Descriptions in the Packages files can be set nowDavid Kalnischkies2010-03-261-2/+9
| | | | | | | | | | | | also in TreeDefaults and Tree to support generation of archives which should support and which shouldn't support splitted out Translation-en files in the same run.
| * * ftparchive/writer.cc:David Kalnischkies2010-03-221-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | - write LongDescriptions if they shouldn't be included in Packages file into i18n/Translation-en by default. It is ensured that each package+description is listed only ones in the Translation file even if we generate multiple Packages file in one run. The file is only generated in "generate" - the simple file commands can't create it by now. Also, the LongDescription is currently a global setting, so generating archives with and without LongDescriptions in the Packages file in the same run are currently not possible.
* | ftparchive/apt-ftparchive.cc: Include apt-pkg/init.h.Julian Andres Klode2010-03-261-0/+1
| |
* | * ftparchive/apt-ftparchive.cc:Julian Andres Klode2010-03-261-1/+1
|/ | | - Read default configuration (Closes: #383257)
* - add --arch option for apt-ftparchive packages and contents commandsDavid Kalnischkies2010-02-181-3/+4
| | | | | - if an arch is given accept only *_all.deb and *_arch.deb instead of *.deb. Thanks Stephan Bosch for the patch! (Closes: #319710)
* fix a few typos in strings, comments and manpage of apt-ftparchiveDavid Kalnischkies2009-12-011-2/+2
| | | | thanks Karl Goetz! (Closes: #558757)
* * ftparchive/apt-ftparchive.cc:Julian Andres Klode2009-11-241-0/+1
| | | - Call setlocale() so translations are actually used.