summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-04-22 13:01:37 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-04-22 13:01:37 +0200
commit849e64ac558c5c72a65b6ee0098fdfc538eca5e6 (patch)
tree901ab19a8342270c4bb5a47542d6afbf9f7dc094
parenta88136062dbe189417aa0b4751449637816c8445 (diff)
* apt-pkg/cdrom.cc:
- use Dump() to generate the configuration output
-rw-r--r--apt-pkg/cdrom.cc21
-rw-r--r--debian/changelog4
2 files changed, 5 insertions, 20 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 50c204371..c10ca6bd1 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -409,27 +409,10 @@ bool pkgCdrom::WriteDatabase(Configuration &Cnf)
/* Write out all of the configuration directives by walking the
configuration tree */
- const Configuration::Item *Top = Cnf.Tree(0);
- for (; Top != 0;)
- {
- // Print the config entry
- if (Top->Value.empty() == false)
- Out << Top->FullTag() + " \"" << Top->Value << "\";" << endl;
-
- if (Top->Child != 0)
- {
- Top = Top->Child;
- continue;
- }
-
- while (Top != 0 && Top->Next == 0)
- Top = Top->Parent;
- if (Top != 0)
- Top = Top->Next;
- }
+ _config->Dump(Out, NULL, "%f \"%v\";\n", false);
Out.close();
-
+
if (FileExists(DFile) == true && link(DFile.c_str(),string(DFile + '~').c_str()) != 0)
return _error->Errno("link", "Failed to link %s to %s~", DFile.c_str(), DFile.c_str());
if (rename(NewFile.c_str(),DFile.c_str()) != 0)
diff --git a/debian/changelog b/debian/changelog
index 97a7855fb..145da311e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,8 +10,10 @@ apt (0.9.3) unstable; urgency=low
* cmdline/apt-config.cc:
- make it possible to limit dump to a subtree
- implement --empty and --format option for dump
+ * apt-pkg/cdrom.cc:
+ - use Dump() to generate the configuration output
- -- David Kalnischkies <kalnischkies@gmail.com> Sun, 22 Apr 2012 12:29:07 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com> Sun, 22 Apr 2012 13:01:04 +0200
apt (0.9.2) unstable; urgency=low