summaryrefslogtreecommitdiff
path: root/cmdline/apt-config.cc
AgeCommit message (Collapse)Author
2018-11-29Use quoted tagnames in config dumpsDavid Kalnischkies
Tagnames in configuration can include spaces (and other nasties) e.g. in repository-specific configuration options due to Origin/Label potentially containing a space. The configuration file format supports parsing quoted as well as encoded spaces, but the output generated by apt-config and other places which might be feedback into apt via parsing (e.g. before calling apt-key in our gpgv method) do not quote and hence produce invalid configuration files. Changing the default to be an encoded tagname ensures that the output of dump can be used as a config file, but other users might not expect this so that is technically a backward-breaking change.
2018-05-07Remove obsolete RCS keywordsGuillem Jover
Prompted-by: Jakub Wilk <jwilk@debian.org>
2017-12-13avoid some useless casts reported by -Wuseless-castDavid Kalnischkies
The casts are useless, but the reports show some where we can actually improve the code by replacing them with better alternatives like converting whatever int type into a string instead of casting to a specific one which might in the future be too small. Reported-By: gcc -Wuseless-cast
2017-07-12Reformat and sort all includes with clang-formatJulian Andres Klode
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.
2016-07-05use the right key for compressor configuration dumpDavid Kalnischkies
The generated dump output is incorrect in sofar as it uses the name as the key for this compressor, but they don't need to be equal as is the case if you force some of the inbuilt ones to be disabled as our testing framework does it at times. This is hidden from changelog as nobody will actually notice while describing it in a few words make it sound like an important change… Git-Dch: Ignore
2016-05-28look into the right textdomain for apt-utils againDavid Kalnischkies
Broken in e7e10e47476606e3b2274cf66b1e8ea74b236757 by looking always into "apt" while we ship some tools in "apt-utils"…
2015-11-29drop some needlessly public declarations in libapt-privateDavid Kalnischkies
Git-Dch: Ignore
2015-11-29use function pointers instead of weak symbols for cmdline parsingDavid Kalnischkies
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.
2015-11-21review of new/changed translatable program stringsJustin B Rye
Reference mail: https://lists.debian.org/debian-l10n-english/2015/11/msg00006.html
2015-11-04revamp all tools help messagesDavid Kalnischkies
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.
2015-11-04deal with --version more centrallyDavid Kalnischkies
Git-Dch: Ignore
2015-11-04move apts cmdline helper type into -privateDavid Kalnischkies
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
2015-11-04generate commands array after config is loadedDavid Kalnischkies
This ensures that location strings loaded from a location specified via configuration (Dir::Locale) effect the help messages for commands. Git-Dch: Ignore
2015-11-04deduplicate main methodsDavid Kalnischkies
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
2015-11-04split up help messages for simpler reuseDavid Kalnischkies
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
2015-03-16stop displaying time of build in online helpJérémy Bobbio
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
2014-11-09streamline display of --help in all toolsDavid Kalnischkies
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.
2014-03-13cmdline parsing: apt-config is not apt-cdromDavid Kalnischkies
2014-03-13cleanup headers and especially #includes everywhereDavid Kalnischkies
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)
2014-03-13warning: unused parameter ‘foo’ [-Wunused-parameter]David Kalnischkies
Reported-By: gcc -Wunused-parameter Git-Dch: Ignore
2014-03-13warning: no previous declaration for foobar() [-Wmissing-declarations]David Kalnischkies
Git-Dch: Ignore Reported-By: gcc -Wmissing-declarations
2014-03-13support DEB_BUILD_PROFILES and -P for build profilesDavid Kalnischkies
Inspired by the rest of the patch in 661537, but abstract the parsing of various ways of setting the build profiles more so it can potentially be reused and all apt parts have the same behaviour. Especially config options, cmdline options and environment will not be combined as proposed as this isn't APTs usual behaviour and dpkg doesn't do it either, so one overrides the other as it normally does.
2014-02-22Fix typos in documentation (codespell)Michael Vogt
2013-08-12squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt
experimental
2012-04-22* cmdline/apt-config.cc:David Kalnischkies
- make it possible to limit dump to a subtree - implement --empty and --format option for dump
2012-03-22the previously used VERSION didn't work everywhere so we are switchingDavid Kalnischkies
to the more standard PACKAGE_VERSION and make it work in every file
2011-12-10* cmdline/apt-config.cc:David Kalnischkies
- dump the APT::Compressor settings correctly and completely
2011-09-19use forward declaration in headers if possible instead of includesDavid Kalnischkies
2011-09-13reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies
2011-05-28* cmdline/apt-config.cc:David Kalnischkies
- show Acquire::Languages and APT::Architectures settings in 'dump' (Closes: 626739)
2009-06-30add the various foldmarkers in apt-pkg & cmdline (no code change)David Kalnischkies
2007-08-01* Applied patch from Aurelien Jarno <aurel32@debian.org> to fix wrongOtavio Salvador
directory downloading on non-linux architectures (closes: #435597)
2005-01-20Correct typo in Usage message : s/arbitary/arbitrary. Unfuzzy translations. ↵Christian Perrier
Closes: #291172 * cmdline/*cc : s/arbitary/arbitrary * po/*po : unfuzzy translations * po/apt-all.pot : updated from source code
2004-09-20G++ 3.2 fixesArch Librarian
Author: jgg Date: 2003-01-11 07:18:44 GMT G++ 3.2 fixes
2004-09-20_config->Dump is now inlined, and calls Dump(clog). Du...Arch Librarian
Author: doogie Date: 2002-11-09 17:11:25 GMT _config->Dump is now inlined, and calls Dump(clog). Dump(ostream&) is now exported. Fixed apt-config dump sending to stderr.
2004-09-20Added locale.h for LC_ALLArch Librarian
Author: jgg Date: 2002-02-15 03:40:00 GMT Added locale.h for LC_ALL
2004-09-20setup textdomain/etc for i18n stuffArch Librarian
Author: jgg Date: 2002-01-09 04:59:44 GMT setup textdomain/etc for i18n stuff
2004-09-20Join with aliencodeArch Librarian
Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
2004-09-20Fixed list notation doc bug and 'b' vs 'B'Arch Librarian
Author: jgg Date: 1999-06-06 05:52:37 GMT Fixed list notation doc bug and 'b' vs 'B'
2004-09-20Fixed cd stuff and some minor bugsArch Librarian
Author: jgg Date: 1999-05-23 05:45:12 GMT Fixed cd stuff and some minor bugs
2004-09-20Changed ie to egArch Librarian
Author: jgg Date: 1999-03-29 19:28:52 GMT Changed ie to eg
2004-09-20Added --version and fixed clogging for -sArch Librarian
Author: jgg Date: 1999-01-30 02:12:53 GMT Added --version and fixed clogging for -s
2004-09-20apt-cdromArch Librarian
Author: jgg Date: 1998-11-27 01:52:53 GMT apt-cdrom
2004-09-20Dselect supportArch Librarian
Author: jgg Date: 1998-11-22 23:37:03 GMT Dselect support