summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/cdrom.cc2
-rw-r--r--apt-pkg/contrib/configuration.cc2
-rw-r--r--cmdline/apt-config.cc2
-rwxr-xr-xtest/integration/test-apt-config14
4 files changed, 17 insertions, 3 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 2c3979ff9..151608b28 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -438,7 +438,7 @@ bool pkgCdrom::WriteDatabase(Configuration &Cnf)
/* Write out all of the configuration directives by walking the
configuration tree */
- Cnf.Dump(Out, NULL, "%f \"%v\";\n", false);
+ Cnf.Dump(Out, NULL, "%F \"%v\";\n", false);
Out.close();
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)
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 252a56833..8ad7cac68 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -67,7 +67,7 @@ static bool DoShell(CommandLine &CmdL)
static bool DoDump(CommandLine &CmdL)
{
bool const empty = _config->FindB("APT::Config::Dump::EmptyValue", true);
- std::string const format = _config->Find("APT::Config::Dump::Format", "%f \"%v\";\n");
+ std::string const format = _config->Find("APT::Config::Dump::Format", "%F \"%v\";\n");
if (CmdL.FileSize() == 1)
_config->Dump(cout, NULL, format.c_str(), empty);
else
diff --git a/test/integration/test-apt-config b/test/integration/test-apt-config
index f2068b789..12df63de1 100755
--- a/test/integration/test-apt-config
+++ b/test/integration/test-apt-config
@@ -34,3 +34,17 @@ testsuccessequal 'nodoc
stage1' aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles
unset DEB_BUILD_PROFILES
testempty aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles
+
+cat > spaces.conf <<EOF
+Spaces::Test::"Foo Bar" "1 1";
+Spaces::Test2::" Bar Baz " "B B" {
+ A%20B "C C";
+ "B C" "A A";
+};
+EOF
+testsuccessequal 'Spaces::Test "";
+Spaces::Test::Foo%20Bar "1 1";
+Spaces::Test2 "";
+Spaces::Test2::%20Bar%20Baz%20 "B B";
+Spaces::Test2::%20Bar%20Baz%20::A%20B "C C";
+Spaces::Test2::%20Bar%20Baz%20::B%20C "A A";' aptconfig dump -c spaces.conf Spaces::Test Spaces::Test2