+ f.Write(data, strlen(data));
+ f.Close();
+ return fn;
+}
+ /*}}}*/
+// WriteConfig - write out the config data from a debian package file /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+static void WriteConfig(const DebFile &file)
+{
+ string templatefile = WriteFile(file.Package.c_str(), "template", file.Template);
+ string configscript = WriteFile(file.Package.c_str(), "config", file.Config);
+
+ if (templatefile.empty() == true || configscript.empty() == true)
+ return;
+ cout << file.Package << " " << file.Version << " "
+ << templatefile << " " << configscript << endl;
+}
+ /*}}}*/
+// InitCache - initialize the package cache /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+static bool Go(CommandLine &CmdL)
+{
+ // Initialize the apt cache
+ MMap *Map = 0;
+ pkgSourceList List;
+ List.ReadMainList();
+ pkgCacheGenerator::MakeStatusCache(List,NULL,&Map,true);
+ if (Map == 0)
+ return false;
+ DebFile::Cache = new pkgCache(Map);
+ if (_error->PendingError() == true)
+ return false;