summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/cmndline.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge CommandLine::DispatchArgJulian Andres Klode2020-02-261-5/+0
|
* Apply various suggestions by cppcheckDavid Kalnischkies2019-07-081-1/+2
| | | | Reported-By: cppcheck
* 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-3/+3
| | | | | | | | | | | | | 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.
* Fix and avoid quoting in CommandLine::AsStringDavid Kalnischkies2017-03-191-4/+10
| | | | | | | | | | | | | | | | In the intended usecase where this serves as a hack there is no problem with double/single quotes being present as we write it to a log file only, but nowadays our calling of apt-key produces a temporary config file containing this "setting" as well and suddently quoting is important as the config file syntax is allergic to it. So the fix is to ignore all quoting whatsoever in the input and just quote (with singles) the option values with spaces. That gives us 99% of the time the correct result and the 1% where the quote is an integral element of the option … doesn't exist – or has bigger problems than a log file not containing the quote. Same goes for newlines in values. LP: #1672710
* support setting empty values (sanely) & removing support forDavid Kalnischkies2015-11-191-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | space-gapping: '-o option= value' That is a very old feature (straight from 1998), but it is super surprising if you try setting empty values and instead get error messages or a non-empty value as the next parameter is treated as the value – which could have been empty, so if for some reason you need a compatible way of setting an empty value try: '-o option="" ""'. I can only guess that the idea was to support '-o option value', but we survived 17 years without it, we will do fine in the future I guess. Similar is the case for '-t= testing' even through '-t testing' existed before and the code even tried to detect mistakes like '-t= -b' … all gone now. Technically that is as its removing a feature replacing it with another a major interface break. In practice I really hope for my and their sanity that nobody was using this; but if for some reaon you do: Remove the space and be done. I found the patch and the bugreport actually only after the fact, but its reassuring that others are puzzled by this as well and hence a thanks is in perfect order here as the patch is practical identical [expect that this one here adds tests and other bonus items]. Thanks: Daniel Hartwig for initial patch. Closes: 693092
* move apts cmdline helper type into -privateDavid Kalnischkies2015-11-041-58/+3
| | | | | | | | 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
* deduplicate main methodsDavid Kalnischkies2015-11-041-1/+1
| | | | | | | | 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-2/+60
| | | | | | | | | | | | | 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
* Also add 'in combination with the other options.' to another errorJulian Andres Klode2015-08-141-1/+1
| | | | Gbp-Dch: ignore
* Say "in combination with the other options" if an option is not understoodJulian Andres Klode2015-08-141-3/+3
| | | | Closes: #762758
* streamline display of --help in all toolsDavid Kalnischkies2014-11-091-0/+3
| | | | | | | 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.
* allow options between command and -- on commandlineDavid Kalnischkies2014-09-281-8/+11
| | | | | | | This used to work before we implemented a stricter commandline parser and e.g. the dd-schroot-cmd command constructs commandlines like this. Reported-By: Helmut Grohne
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-0/+5
| | | | | | | | 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)
* Fix typos in documentation (codespell)Michael Vogt2014-02-221-1/+1
|
* Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sidMichael Vogt2013-08-221-0/+1
|\ | | | | | | | | Conflicts: apt-pkg/tagfile.h
| * some more coverity fixesMichael Vogt2013-08-121-0/+1
| |
* | squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt2013-08-121-0/+48
|/ | | | experimental
* fix segfault with empty LongOpt in --no-* branchDavid Kalnischkies2012-06-091-1/+2
|
* * apt-pkg/contrib/cmdline.cc:Daniel Hartwig2012-06-091-2/+3
| | | | | - apply patch from Daniel Hartwig to fix a segfault in case the LongOpt is empty (Closes: #676331)
* merge with my debian-sid branchDavid Kalnischkies2011-10-301-17/+11
|\
| * convert a few for-loop char finds to proper strchr and memchrDavid Kalnischkies2011-09-211-17/+11
| |
* | use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-0/+1
| |
* | reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-1/+3
|/
* * apt-pkg/contrib/cmdline.cc:David Kalnischkies2010-05-311-2/+2
| | | - fix segfault in SaveInConfig caused by writing over char[] sizes
* * apt-pkg/deb/dpkgpm.cc:David Kalnischkies2010-03-121-1/+41
| | | | | | - if available store the Commandline in the history * apt-pkg/contrib/cmndline.cc: - save Commandline in Commandline::AsString for logging
* Applying #298821 patch for further arbitary typosLuca Bruno2008-10-031-1/+1
|
* * remove all the remaining #pragma implementationMichael Vogt2007-06-081-3/+0
|
* Typo fixes.Arch Librarian2004-09-201-3/+3
| | | | | | Author: doogie Date: 2003-02-10 01:40:58 GMT Typo fixes.
* Some more g++-3.2 fixes.Arch Librarian2004-09-201-1/+2
| | | | | | Author: doogie Date: 2002-11-11 06:55:50 GMT Some more g++-3.2 fixes.
* PD licenseArch Librarian2004-09-201-1/+4
| | | | | | Author: jgg Date: 2002-09-14 05:28:38 GMT PD license
* Fixed -- argument bugArch Librarian2004-09-201-1/+4
| | | | | | Author: jgg Date: 2001-06-09 22:39:48 GMT Fixed -- argument bug
* Join with aliencodeArch Librarian2004-09-201-14/+16
| | | | | | Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
* Changed handling of the -q optionArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-05-14 02:57:48 GMT Changed handling of the -q option
* Moved strutl.hArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-01-27 02:48:52 GMT Moved strutl.h
* Dsync mergeArch Librarian2004-09-201-3/+8
| | | | | | Author: jgg Date: 1999-01-18 06:20:07 GMT Dsync merge
* Release supportArch Librarian2004-09-201-3/+7
| | | | | | Author: jgg Date: 1998-12-14 02:23:46 GMT Release support
* More CD supportArch Librarian2004-09-201-2/+25
| | | | | | Author: jgg Date: 1998-11-25 23:54:06 GMT More CD support
* Fixed long option parsingArch Librarian2004-09-201-9/+20
| | | | | | Author: jgg Date: 1998-10-24 20:14:34 GMT Fixed long option parsing
* Start on acquire stuffArch Librarian2004-09-201-25/+4
| | | | | | Author: jgg Date: 1998-10-20 02:39:12 GMT Start on acquire stuff
* SyncArch Librarian2004-09-201-3/+11
| | | | | | Author: jgg Date: 1998-10-08 04:54:58 GMT Sync
* SyncArch Librarian2004-09-201-1/+38
| | | | | | Author: jgg Date: 1998-09-26 05:34:18 GMT Sync
* SyncArch Librarian2004-09-201-0/+280
Author: jgg Date: 1998-09-22 05:30:24 GMT Sync