From 094a497dd2dba1f47157e07d57f97c338a5ddaa0 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:50:46 +0000 Subject: First draft of make system and name change to apt-pkg Author: jgg Date: 1998-07-12 23:58:20 GMT First draft of make system and name change to apt-pkg --- apt-pkg/algorithms.cc | 8 ++-- apt-pkg/algorithms.h | 8 ++-- apt-pkg/cacheiterators.h | 6 +-- apt-pkg/contrib/configuration.cc | 6 +-- apt-pkg/contrib/configuration.h | 4 +- apt-pkg/contrib/error.cc | 6 +-- apt-pkg/contrib/error.h | 4 +- apt-pkg/contrib/fileutl.cc | 8 ++-- apt-pkg/contrib/fileutl.h | 4 +- apt-pkg/contrib/mmap.cc | 8 ++-- apt-pkg/contrib/mmap.h | 6 +-- apt-pkg/deb/deblistparser.cc | 8 ++-- apt-pkg/deb/deblistparser.h | 6 +-- apt-pkg/depcache.cc | 10 ++--- apt-pkg/depcache.h | 6 +-- apt-pkg/init.cc | 4 +- apt-pkg/init.h | 4 +- apt-pkg/makefile | 38 ++++++++++++++++ apt-pkg/orderlist.cc | 12 ++--- apt-pkg/orderlist.h | 6 +-- apt-pkg/packagemanager.cc | 14 +++--- apt-pkg/packagemanager.h | 6 +-- apt-pkg/pkgcache.cc | 14 +++--- apt-pkg/pkgcache.h | 10 ++--- apt-pkg/pkgcachegen.cc | 10 ++--- apt-pkg/pkgcachegen.h | 6 +-- apt-pkg/sourcelist.cc | 12 ++--- apt-pkg/sourcelist.h | 6 +-- apt-pkg/tagfile.cc | 97 +++------------------------------------- apt-pkg/tagfile.h | 6 +-- apt-pkg/templates.cc | 2 +- apt-pkg/version.cc | 8 ++-- apt-pkg/version.h | 4 +- 33 files changed, 154 insertions(+), 203 deletions(-) create mode 100644 apt-pkg/makefile (limited to 'apt-pkg') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index e4bc99a28..ce0c41efd 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: algorithms.cc,v 1.2 1998/07/12 01:25:59 jgg Exp $ +// $Id: algorithms.cc,v 1.3 1998/07/12 23:58:20 jgg Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -9,10 +9,10 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/algorithms.h" +#pragma implementation "apt-pkg/algorithms.h" #endif -#include -#include +#include +#include #include /*}}}*/ diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 0dd77d940..d6078b2cb 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: algorithms.h,v 1.1 1998/07/07 04:17:00 jgg Exp $ +// $Id: algorithms.h,v 1.2 1998/07/12 23:58:22 jgg Exp $ /* ###################################################################### Algorithms - A set of misc algorithms @@ -22,11 +22,11 @@ #define PKGLIB_ALGORITHMS_H #ifdef __GNUG__ -#pragma interface "pkglib/algorithms.h" +#pragma interface "apt-pkg/algorithms.h" #endif -#include -#include +#include +#include class pkgSimulate : public pkgPackageManager { diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index d382e4b98..390c923b9 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: cacheiterators.h,v 1.5 1998/07/12 01:26:00 jgg Exp $ +// $Id: cacheiterators.h,v 1.6 1998/07/12 23:58:23 jgg Exp $ /* ###################################################################### Cache Iterators - Iterators for navigating the cache structure @@ -24,7 +24,7 @@ that has the depends pointer as a member. The provide iterator has the same system. - This header is not user includable, please use pkglib/pkgcache.h + This header is not user includable, please use apt-pkg/pkgcache.h ##################################################################### */ /*}}}*/ @@ -33,7 +33,7 @@ #define PKGLIB_CACHEITERATORS_H #ifdef __GNUG__ -#pragma interface "pkglib/cacheiterators.h" +#pragma interface "apt-pkg/cacheiterators.h" #endif // Package Iterator diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 7694330f9..72b654b01 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: configuration.cc,v 1.2 1998/07/09 05:12:33 jgg Exp $ +// $Id: configuration.cc,v 1.3 1998/07/12 23:58:44 jgg Exp $ /* ###################################################################### Configuration Class @@ -13,9 +13,9 @@ /*}}}*/ // Include files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/configuration.h" +#pragma implementation "apt-pkg/configuration.h" #endif -#include +#include #include #include diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h index bd06f5e37..9229a0f66 100644 --- a/apt-pkg/contrib/configuration.h +++ b/apt-pkg/contrib/configuration.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: configuration.h,v 1.2 1998/07/09 05:12:34 jgg Exp $ +// $Id: configuration.h,v 1.3 1998/07/12 23:58:45 jgg Exp $ /* ###################################################################### Configuration Class @@ -25,7 +25,7 @@ #define PKGLIB_CONFIGURATION_H #ifdef __GNUG__ -#pragma interface "pkglib/configuration.h" +#pragma interface "apt-pkg/configuration.h" #endif #include diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc index d1ea1b87b..d31aaf1b1 100644 --- a/apt-pkg/contrib/error.cc +++ b/apt-pkg/contrib/error.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: error.cc,v 1.2 1998/07/07 04:17:10 jgg Exp $ +// $Id: error.cc,v 1.3 1998/07/12 23:58:46 jgg Exp $ /* ###################################################################### Global Erorr Class - Global error mechanism @@ -15,7 +15,7 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/error.h" +#pragma implementation "apt-pkg/error.h" #endif #include @@ -23,7 +23,7 @@ #include #include -#include +#include /*}}}*/ GlobalError *_error = new GlobalError; diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h index 06367592b..5d015c417 100644 --- a/apt-pkg/contrib/error.h +++ b/apt-pkg/contrib/error.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: error.h,v 1.2 1998/07/07 04:17:11 jgg Exp $ +// $Id: error.h,v 1.3 1998/07/12 23:58:47 jgg Exp $ /* ###################################################################### Global Erorr Class - Global error mechanism @@ -42,7 +42,7 @@ #define PKGLIB_ERROR_H #ifdef __GNUG__ -#pragma interface "pkglib/error.h" +#pragma interface "apt-pkg/error.h" #endif #include diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 29b12bef1..1b087696d 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: fileutl.cc,v 1.3 1998/07/07 04:17:12 jgg Exp $ +// $Id: fileutl.cc,v 1.4 1998/07/12 23:58:48 jgg Exp $ /* ###################################################################### File Utilities @@ -15,10 +15,10 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/fileutl.h" +#pragma implementation "apt-pkg/fileutl.h" #endif -#include -#include +#include +#include #include #include diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index aa2d2ee2e..3328ce2b4 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: fileutl.h,v 1.2 1998/07/07 04:17:13 jgg Exp $ +// $Id: fileutl.h,v 1.3 1998/07/12 23:58:49 jgg Exp $ /* ###################################################################### File Utilities @@ -23,7 +23,7 @@ #define PKGLIB_FILEUTL_H #ifdef __GNUG__ -#pragma interface "pkglib/fileutl.h" +#pragma interface "apt-pkg/fileutl.h" #endif #include diff --git a/apt-pkg/contrib/mmap.cc b/apt-pkg/contrib/mmap.cc index c0cc13f00..ccb706eab 100644 --- a/apt-pkg/contrib/mmap.cc +++ b/apt-pkg/contrib/mmap.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: mmap.cc,v 1.4 1998/07/07 04:17:14 jgg Exp $ +// $Id: mmap.cc,v 1.5 1998/07/12 23:58:50 jgg Exp $ /* ###################################################################### MMap Class - Provides 'real' mmap or a faked mmap using read(). @@ -22,12 +22,12 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/mmap.h" +#pragma implementation "apt-pkg/mmap.h" #endif #define _BSD_SOURCE -#include -#include +#include +#include #include #include diff --git a/apt-pkg/contrib/mmap.h b/apt-pkg/contrib/mmap.h index 55feda741..0e80c15d2 100644 --- a/apt-pkg/contrib/mmap.h +++ b/apt-pkg/contrib/mmap.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: mmap.h,v 1.3 1998/07/07 04:17:15 jgg Exp $ +// $Id: mmap.h,v 1.4 1998/07/12 23:58:51 jgg Exp $ /* ###################################################################### MMap Class - Provides 'real' mmap or a faked mmap using read(). @@ -27,11 +27,11 @@ #define PKGLIB_MMAP_H #ifdef __GNUG__ -#pragma interface "pkglib/mmap.h" +#pragma interface "apt-pkg/mmap.h" #endif #include -#include +#include class MMap { diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 3c82ee51d..7587760b5 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: deblistparser.cc,v 1.5 1998/07/09 05:12:37 jgg Exp $ +// $Id: deblistparser.cc,v 1.6 1998/07/12 23:58:52 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -10,9 +10,9 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include -#include -#include +#include +#include +#include #include #include diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index c7a97c16a..63e78a988 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: deblistparser.h,v 1.3 1998/07/05 05:34:01 jgg Exp $ +// $Id: deblistparser.h,v 1.4 1998/07/12 23:58:54 jgg Exp $ /* ###################################################################### Debian Package List Parser - This implements the abstract parser @@ -12,8 +12,8 @@ #ifndef PKGLIB_DEBLISTPARSER_H #define PKGLIB_DEBLISTPARSER_H -#include -#include +#include +#include class debListParser : public pkgCacheGenerator::ListParser { diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index a7784c0a5..71a0d02a2 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: depcache.cc,v 1.1 1998/07/07 04:17:01 jgg Exp $ +// $Id: depcache.cc,v 1.2 1998/07/12 23:58:24 jgg Exp $ /* ###################################################################### Dependency Cache - Caches Dependency information. @@ -9,12 +9,12 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/depcache.h" +#pragma implementation "apt-pkg/depcache.h" #endif -#include +#include -#include -#include +#include +#include /*}}}*/ // DepCache::pkgDepCache - Constructors /*{{{*/ diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 39ed215b2..6cb8c1187 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: depcache.h,v 1.2 1998/07/12 01:26:01 jgg Exp $ +// $Id: depcache.h,v 1.3 1998/07/12 23:58:25 jgg Exp $ /* ###################################################################### DepCache - Dependency Extension data for the cache @@ -40,10 +40,10 @@ #define PKGLIB_DEPCACHE_H #ifdef __GNUG__ -#pragma interface "pkglib/depcache.h" +#pragma interface "apt-pkg/depcache.h" #endif -#include +#include class pkgDepCache : public pkgCache { diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index 5dd7b58aa..a93e65c1a 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: init.cc,v 1.1 1998/07/09 05:12:27 jgg Exp $ +// $Id: init.cc,v 1.2 1998/07/12 23:58:26 jgg Exp $ /* ###################################################################### Init - Initialize the package library @@ -8,7 +8,7 @@ ##################################################################### */ /*}}}*/ // Include files /*{{{*/ -#include +#include /*}}}*/ // pkglibInitialize - Initialize the configuration class /*{{{*/ diff --git a/apt-pkg/init.h b/apt-pkg/init.h index bd03dd10d..ecfe702d4 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: init.h,v 1.1 1998/07/09 05:12:27 jgg Exp $ +// $Id: init.h,v 1.2 1998/07/12 23:58:27 jgg Exp $ /* ###################################################################### Init - Initialize the package library @@ -14,7 +14,7 @@ #ifndef PKGLIB_INIT_H #define PKGLIB_INIT_H -#include +#include bool pkglibInitialize(Configuration &Cnf); diff --git a/apt-pkg/makefile b/apt-pkg/makefile new file mode 100644 index 000000000..f6a5d003c --- /dev/null +++ b/apt-pkg/makefile @@ -0,0 +1,38 @@ +# -*- make -*- +BASE=.. + +# Header location +SUBDIRS = deb contrib +HEADER_TARGETDIRS = apt-pkg + +# Bring in the default rules +include ../buildlib/defaults.mak + +# The library name +LIBRARY=apt-pkg +MAJOR=2 +MINOR=0.0 + +# Source code for the contributed non-core things +SOURCE = contrib/mmap.cc contrib/error.cc contrib/strutl.cc \ + contrib/configuration.cc + +# Source code for the main library +SOURCE+= pkgcache.cc version.cc fileutl.cc pkgcachegen.cc depcache.cc \ + orderlist.cc tagfile.cc sourcelist.cc packagemanager.cc \ + algorithms.cc init.cc templates.cc + +# Source code for the debian specific components +SOURCE+= deb/deblistparser.cc + +# Public apt-pkg header files +HEADERS = algorithms.h depcache.h mmap.h pkgcachegen.h cacheiterators.h \ + error.h orderlist.h sourcelist.h configuration.h fileutl.h \ + packagemanager.h tagfile.h deblistparser.h init.h pkgcache.h \ + version.h +HEADERS := $(addprefix apt-pkg/,$(HEADERS)) + +# Private header files +HEADERS+= strutl.h system.h + +include $(LIBRARY_H) diff --git a/apt-pkg/orderlist.cc b/apt-pkg/orderlist.cc index f79a063bd..85d35d5a1 100644 --- a/apt-pkg/orderlist.cc +++ b/apt-pkg/orderlist.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: orderlist.cc,v 1.1 1998/07/07 04:17:01 jgg Exp $ +// $Id: orderlist.cc,v 1.2 1998/07/12 23:58:28 jgg Exp $ /* ###################################################################### Order List - Represents and Manipulates an ordered list of packages. @@ -50,12 +50,12 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/orderlist.h" +#pragma implementation "apt-pkg/orderlist.h" #endif -#include -#include -#include -#include +#include +#include +#include +#include /*}}}*/ pkgOrderList *pkgOrderList::Me = 0; diff --git a/apt-pkg/orderlist.h b/apt-pkg/orderlist.h index 0dc8a5038..2065fc4c8 100644 --- a/apt-pkg/orderlist.h +++ b/apt-pkg/orderlist.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: orderlist.h,v 1.1 1998/07/07 04:17:01 jgg Exp $ +// $Id: orderlist.h,v 1.2 1998/07/12 23:58:29 jgg Exp $ /* ###################################################################### Order List - Represents and Manipulates an ordered list of packages. @@ -18,10 +18,10 @@ #define PKGLIB_ORDERLIST_H #ifdef __GNUG__ -#pragma interface "pkglib/orderlist.h" +#pragma interface "apt-pkg/orderlist.h" #endif -#include +#include class pkgDepCache; class pkgOrderList diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc index afe5fc176..1780dff09 100644 --- a/apt-pkg/packagemanager.cc +++ b/apt-pkg/packagemanager.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: packagemanager.cc,v 1.3 1998/07/12 01:26:02 jgg Exp $ +// $Id: packagemanager.cc,v 1.4 1998/07/12 23:58:30 jgg Exp $ /* ###################################################################### Package Manager - Abstacts the package manager @@ -14,13 +14,13 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/packagemanager.h" +#pragma implementation "apt-pkg/packagemanager.h" #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /*}}}*/ // PM::PackageManager - Constructor /*{{{*/ diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 5f1b34635..a097712a3 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: packagemanager.h,v 1.2 1998/07/09 05:41:13 jgg Exp $ +// $Id: packagemanager.h,v 1.3 1998/07/12 23:58:31 jgg Exp $ /* ###################################################################### Package Manager - Abstacts the package manager @@ -25,11 +25,11 @@ #define PKGLIB_PACKAGEMANAGER_H #ifdef __GNUG__ -#pragma interface "pkglib/packagemanager.h" +#pragma interface "apt-pkg/packagemanager.h" #endif #include -#include +#include class pkgAquire; class pkgDepCache; diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index b8af6b5e4..20590e971 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -1,11 +1,11 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcache.cc,v 1.6 1998/07/12 01:26:04 jgg Exp $ +// $Id: pkgcache.cc,v 1.7 1998/07/12 23:58:32 jgg Exp $ /* ###################################################################### Package Cache - Accessor code for the cache - Please see doc/pkglib/cache.sgml for a more detailed description of + Please see doc/apt-pkg/cache.sgml for a more detailed description of this format. Also be sure to keep that file up-to-date!! This is the general utility functions for cache managment. They provide @@ -21,12 +21,12 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/pkgcache.h" -#pragma implementation "pkglib/cacheiterators.h" +#pragma implementation "apt-pkg/pkgcache.h" +#pragma implementation "apt-pkg/cacheiterators.h" #endif -#include -#include -#include +#include +#include +#include #include #include diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 852949b1f..5ff29cfb4 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -1,11 +1,11 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcache.h,v 1.5 1998/07/07 04:17:03 jgg Exp $ +// $Id: pkgcache.h,v 1.6 1998/07/12 23:58:33 jgg Exp $ /* ###################################################################### Cache - Structure definitions for the cache file - Please see doc/pkglib/cache.sgml for a more detailed description of + Please see doc/apt-pkg/cache.sgml for a more detailed description of this format. Also be sure to keep that file up-to-date!! Clients should always use the CacheIterators classes for access to the @@ -21,12 +21,12 @@ #define PKGLIB_PKGCACHE_H #ifdef __GNUG__ -#pragma interface "pkglib/pkgcache.h" +#pragma interface "apt-pkg/pkgcache.h" #endif #include #include -#include +#include class pkgCache { @@ -258,7 +258,7 @@ struct pkgCache::StringItem unsigned long NextItem; // StringItem }; -#include +#include inline pkgCache::PkgIterator pkgCache::PkgBegin() {return PkgIterator(*this);}; diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 3e37c74f3..e0f8f3a19 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcachegen.cc,v 1.8 1998/07/09 05:12:27 jgg Exp $ +// $Id: pkgcachegen.cc,v 1.9 1998/07/12 23:58:34 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -11,12 +11,12 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/pkgcachegen.h" +#pragma implementation "apt-pkg/pkgcachegen.h" #endif -#include -#include -#include +#include +#include +#include #include #include diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index c883828eb..0a4881057 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: pkgcachegen.h,v 1.4 1998/07/07 04:17:05 jgg Exp $ +// $Id: pkgcachegen.h,v 1.5 1998/07/12 23:58:35 jgg Exp $ /* ###################################################################### Package Cache Generator - Generator for the cache structure. @@ -14,10 +14,10 @@ #define PKGLIB_PKGCACHEGEN_H #ifdef __GNUG__ -#pragma interface "pkglib/pkgcachegen.h" +#pragma interface "apt-pkg/pkgcachegen.h" #endif -#include +#include class pkgCacheGenerator { diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index bce3e5990..f9de99584 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: sourcelist.cc,v 1.2 1998/07/09 05:12:28 jgg Exp $ +// $Id: sourcelist.cc,v 1.3 1998/07/12 23:58:36 jgg Exp $ /* ###################################################################### List of Sources @@ -9,13 +9,13 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/sourcelist.h" +#pragma implementation "apt-pkg/sourcelist.h" #endif -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/apt-pkg/sourcelist.h b/apt-pkg/sourcelist.h index 43739fbcd..57a648b97 100644 --- a/apt-pkg/sourcelist.h +++ b/apt-pkg/sourcelist.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: sourcelist.h,v 1.2 1998/07/09 05:12:31 jgg Exp $ +// $Id: sourcelist.h,v 1.3 1998/07/12 23:58:38 jgg Exp $ /* ###################################################################### SourceList - Manage a list of sources @@ -17,10 +17,10 @@ #include #include #include -#include +#include #ifdef __GNUG__ -#pragma interface "pkglib/sourcelist.h" +#pragma interface "apt-pkg/sourcelist.h" #endif class pkgAquire; diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index aaef3da8b..42a44453f 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: tagfile.cc,v 1.6 1998/07/09 05:12:32 jgg Exp $ +// $Id: tagfile.cc,v 1.7 1998/07/12 23:58:39 jgg Exp $ /* ###################################################################### Fast scanner for RFC-822 type header information @@ -12,12 +12,12 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/tagfile.h" +#pragma implementation "apt-pkg/tagfile.h" #endif -#include -#include -#include +#include +#include +#include #include #include @@ -153,90 +153,3 @@ bool pkgTagSection::Find(const char *Tag,const char *&Start, return false; } /*}}}*/ - -#include -#include - -int main(int argc,char *argv[]) -{ - pkglibInitialize(*_config); - cout << _config->Find("APT::arch") << endl; - cout << _config->FindDir("DIR::Etc::sourcelist") << endl; - - { - File CacheF("./cache",File::WriteEmpty); - DynamicMMap Map(CacheF,MMap::Public); - pkgCacheGenerator Gen(Map); - - for (int I = 1; I != argc; I++) - { - cout << "Merging in " << argv[I] << endl; - File F(argv[I],File::ReadOnly); - Gen.SelectFile(argv[I]); - debListParser Parser(F); - Gen.MergeList(Parser); - } - } -/* - { - File CacheF("./cache",File::WriteExists); - MMap Map(CacheF,MMap::Public | MMap::ReadOnly); - pkgCache Cache(Map); - for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++) - { - cout << "Package: " << I.Name() << endl; - for (pkgCache::VerIterator V = I.VersionList(); V.end() == false; V++) - { - cout << "Version: " << V.VerStr() << endl; - cout << "Size: " << V->Size << endl; - cout << "Installed-Size: " << V->InstalledSize << endl; - cout << "Section: " << V.Section() << endl; - cout << "Priority: " << Cache.Priority(V->Priority) << endl; - - pkgCache::PrvIterator P = V.ProvidesList(); - if (P.end() == false) - { - cout << "Provides: "; - for (; P.end() == false; P++) - cout << P.Name() << ", "; - cout << endl; - } - } - cout << endl; - } - } -*/ -#if 0 - pkgTagSection I; - while (Test.Step(I) == true) - { - const char *Start; - const char *End; - if (I.Find("Package",Start,End) == false) - { - cout << "Failed" << endl; - continue; - } - - cout << "Package: " << string(Start,End - Start) << endl; - -/* for (const char *I = Start; I < End; I++) - { - const char *Begin = I; - bool Number = true; - while (isspace(*I) == 0 && ispunct(*I) == 0 && I < End) - { - if (isalpha(*I) != 0) - Number = false; - I++; - } - if (Number == false) - cout << string(Begin,I-Begin) << endl; - while ((isspace(*I) != 0 || ispunct(*I) != 0) && I < End) - I++; - I--; - } */ - } -#endif - _error->DumpErrors(); -} diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index c1fffcf13..097eb73bd 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: tagfile.h,v 1.3 1998/07/07 04:17:07 jgg Exp $ +// $Id: tagfile.h,v 1.4 1998/07/12 23:58:40 jgg Exp $ /* ###################################################################### Fast scanner for RFC-822 type header information @@ -22,10 +22,10 @@ #define PKGLIB_TAGFILE_H #ifdef __GNUG__ -#pragma interface "pkglib/tagfile.h" +#pragma interface "apt-pkg/tagfile.h" #endif -#include +#include class pkgTagSection { diff --git a/apt-pkg/templates.cc b/apt-pkg/templates.cc index 0f86bde9a..1e7d202c9 100644 --- a/apt-pkg/templates.cc +++ b/apt-pkg/templates.cc @@ -1,5 +1,5 @@ /* All template instances are explicly declared here */ -#include +#include template vector; diff --git a/apt-pkg/version.cc b/apt-pkg/version.cc index 7eb85726c..9f245a9e7 100644 --- a/apt-pkg/version.cc +++ b/apt-pkg/version.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: version.cc,v 1.3 1998/07/07 04:17:08 jgg Exp $ +// $Id: version.cc,v 1.4 1998/07/12 23:58:42 jgg Exp $ /* ###################################################################### Version - Version string @@ -18,11 +18,11 @@ /*}}}*/ // Include Files /*{{{*/ #ifdef __GNUG__ -#pragma implementation "pkglib/version.h" +#pragma implementation "apt-pkg/version.h" #endif -#include -#include +#include +#include #include /*}}}*/ diff --git a/apt-pkg/version.h b/apt-pkg/version.h index 3ced5d3e4..b263d7c90 100644 --- a/apt-pkg/version.h +++ b/apt-pkg/version.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: version.h,v 1.2 1998/07/07 04:17:09 jgg Exp $ +// $Id: version.h,v 1.3 1998/07/12 23:58:43 jgg Exp $ /* ###################################################################### Version - Version string @@ -16,7 +16,7 @@ #define PKGLIB_VERSION_H #ifdef __GNUG__ -#pragma interface "pkglib/version.h" +#pragma interface "apt-pkg/version.h" #endif #include -- cgit v1.2.3