summaryrefslogtreecommitdiff
path: root/ftparchive/apt-ftparchive.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 17:04:30 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 17:04:30 +0000
commit989539655e3bb8e6934b5f69ece67c173a26c4f2 (patch)
treee0aaabbd66519a4d3a1b3bb3e12c089a61c20705 /ftparchive/apt-ftparchive.cc
parenta7a58a763a2a07d32f02d597f15740c7cee070c3 (diff)
* Enable apt-ftparchive to generate Release files
Author: mdz Date: 2003-12-26 20:08:56 GMT * Enable apt-ftparchive to generate Release files
Diffstat (limited to 'ftparchive/apt-ftparchive.cc')
-rw-r--r--ftparchive/apt-ftparchive.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc
index 426ec5637..c811343b6 100644
--- a/ftparchive/apt-ftparchive.cc
+++ b/ftparchive/apt-ftparchive.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-ftparchive.cc,v 1.8 2003/07/18 15:28:58 mdz Exp $
+// $Id: apt-ftparchive.cc,v 1.9 2003/12/26 20:08:56 mdz Exp $
/* ######################################################################
apt-scanpackages - Efficient work-alike for dpkg-scanpackages
@@ -223,6 +223,7 @@ bool PackageMap::GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats)
return !_error->PendingError();
}
+
/*}}}*/
// PackageMap::GenSources - Actually generate a Source file /*{{{*/
// ---------------------------------------------------------------------
@@ -672,6 +673,21 @@ bool SimpleGenSources(CommandLine &CmdL)
return true;
}
/*}}}*/
+// SimpleGenRelease - Generate a Release file for a directory tree /*{{{*/
+// ---------------------------------------------------------------------
+bool SimpleGenRelease(CommandLine &CmdL)
+{
+ ReleaseWriter Release("");
+ if (_error->PendingError() == true)
+ return false;
+
+ if (Release.RecursiveScan(CmdL.FileList[1]) == false)
+ return false;
+
+ return true;
+}
+
+ /*}}}*/
// Generate - Full generate, using a config file /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -887,6 +903,7 @@ int main(int argc, const char *argv[])
CommandLine::Dispatch Cmds[] = {{"packages",&SimpleGenPackages},
{"contents",&SimpleGenContents},
{"sources",&SimpleGenSources},
+ {"release",&SimpleGenRelease},
{"generate",&Generate},
{"clean",&Clean},
{"help",&ShowHelp},