summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2018-11-29 22:15:28 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2018-11-29 22:15:28 +0100
commit64d7e1c568a7f9e7f32d1dee1ab771f924baa28d (patch)
treea62ca80d187e5fedbda0ea8fc665bfaadd0de53e /apt-pkg/contrib
parentf313e09d167cc7a83846ac9d4d5d72ba10cc2638 (diff)
Use quoted tagnames in config dumps
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.
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/configuration.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 76d1b9370..1c000e586 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -728,7 +728,7 @@ bool Configuration::ExistsAny(const char *Name) const
/* Dump the entire configuration space */
void Configuration::Dump(ostream& str)
{
- Dump(str, NULL, "%f \"%v\";\n", true);
+ Dump(str, NULL, "%F \"%v\";\n", true);
}
void Configuration::Dump(ostream& str, char const * const root,
char const * const formatstr, bool const emptyValue)