summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/cacheset.cc (renamed from apt-pkg/packageset.cc)6
-rw-r--r--apt-pkg/cacheset.h (renamed from apt-pkg/packageset.h)18
-rw-r--r--apt-pkg/makefile4
-rw-r--r--cmdline/apt-cache.cc2
-rw-r--r--cmdline/apt-get.cc2
-rw-r--r--debian/changelog2
6 files changed, 19 insertions, 15 deletions
diff --git a/apt-pkg/packageset.cc b/apt-pkg/cacheset.cc
index f296b7c45..b49b36539 100644
--- a/apt-pkg/packageset.cc
+++ b/apt-pkg/cacheset.cc
@@ -3,15 +3,15 @@
/* ######################################################################
Simple wrapper around a std::set to provide a similar interface to
- a set of packages as to the complete set of all packages in the
- pkgCache.
+ a set of cache structures as to the complete set of all structures
+ in the pkgCache. Currently only Package is supported.
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
#include <apt-pkg/aptconfiguration.h>
#include <apt-pkg/error.h>
-#include <apt-pkg/packageset.h>
+#include <apt-pkg/cacheset.h>
#include <apt-pkg/strutl.h>
#include <apti18n.h>
diff --git a/apt-pkg/packageset.h b/apt-pkg/cacheset.h
index 9f80d60ed..7c05face6 100644
--- a/apt-pkg/packageset.h
+++ b/apt-pkg/cacheset.h
@@ -1,14 +1,13 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-/** \class APT::PackageSet
+/** \file cacheset.h
+ Wrappers around std::set to have set::iterators which behave
+ similar to the Iterators of the cache structures.
- Simple wrapper around a std::set to provide a similar interface to
- a set of packages as to the complete set of all packages in the
- pkgCache.
-*/
+ Provides also a few helper methods which work with these sets */
/*}}}*/
-#ifndef APT_PACKAGESET_H
-#define APT_PACKAGESET_H
+#ifndef APT_CACHESET_H
+#define APT_CACHESET_H
// Include Files /*{{{*/
#include <iostream>
#include <fstream>
@@ -18,6 +17,11 @@
#include <apt-pkg/pkgcache.h>
/*}}}*/
namespace APT {
+/** \class APT::PackageSet
+
+ Simple wrapper around a std::set to provide a similar interface to
+ a set of packages as to the complete set of all packages in the
+ pkgCache. */
class PackageSet : public std::set<pkgCache::PkgIterator> { /*{{{*/
public: /*{{{*/
/** \brief smell like a pkgCache::PkgIterator */
diff --git a/apt-pkg/makefile b/apt-pkg/makefile
index 968275c5c..1a7078693 100644
--- a/apt-pkg/makefile
+++ b/apt-pkg/makefile
@@ -35,7 +35,7 @@ SOURCE+= pkgcache.cc version.cc depcache.cc \
srcrecords.cc cachefile.cc versionmatch.cc policy.cc \
pkgsystem.cc indexfile.cc pkgcachegen.cc acquire-item.cc \
indexrecords.cc vendor.cc vendorlist.cc cdrom.cc indexcopy.cc \
- aptconfiguration.cc packageset.cc
+ aptconfiguration.cc cacheset.cc
HEADERS+= algorithms.h depcache.h pkgcachegen.h cacheiterators.h \
orderlist.h sourcelist.h packagemanager.h tagfile.h \
init.h pkgcache.h version.h progress.h pkgrecords.h \
@@ -43,7 +43,7 @@ HEADERS+= algorithms.h depcache.h pkgcachegen.h cacheiterators.h \
clean.h srcrecords.h cachefile.h versionmatch.h policy.h \
pkgsystem.h indexfile.h metaindex.h indexrecords.h vendor.h \
vendorlist.h cdrom.h indexcopy.h aptconfiguration.h \
- packageset.h
+ cacheset.h
# Source code for the debian specific components
# In theory the deb headers do not need to be exported..
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index d8e14617a..891b10873 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -29,7 +29,7 @@
#include <apt-pkg/tagfile.h>
#include <apt-pkg/algorithms.h>
#include <apt-pkg/sptr.h>
-#include <apt-pkg/packageset.h>
+#include <apt-pkg/cacheset.h>
#include <config.h>
#include <apti18n.h>
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 1cffd6730..9894747f4 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -40,7 +40,7 @@
#include <apt-pkg/sptr.h>
#include <apt-pkg/md5.h>
#include <apt-pkg/versionmatch.h>
-#include <apt-pkg/packageset.h>
+#include <apt-pkg/cacheset.h>
#include <config.h>
#include <apti18n.h>
diff --git a/debian/changelog b/debian/changelog
index 054088ec2..6b9057ae3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,7 +22,7 @@ apt (0.7.26~exp6) UNRELEASED; urgency=low
- correct "Dangerous iterator usage." pointed out by cppcheck
* ftparchive/writer.h:
- add a virtual destructor to FTWScanner class (for cppcheck)
- * apt-pkg/packageset.h:
+ * apt-pkg/cacheset.h:
- add a simple wrapper around std::set for packages with it
- move regex magic from apt-get to new FromRegEx method
- move cmdline parsing from apt-cache to new FromCommandLine method