summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2020-01-17 12:53:20 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2020-01-17 12:53:20 +0100
commit8ebabf3d9026d1a738a4e8988e168902af7446e3 (patch)
treefd53dd025b002f418e45749d6cf1be3c20f2aa39 /apt-pkg/pkgcache.h
parent25353dc6646e5b9fff55059a5c85183589cf472d (diff)
Allow querying all binaries built by a source package
This adds a simple way to lookup binaries by a source package, but this adds all binaries into one list, even with different source versions. Be careful.
Diffstat (limited to 'apt-pkg/pkgcache.h')
-rw-r--r--apt-pkg/pkgcache.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index 3f77d5eae..52446e8f5 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -383,7 +383,11 @@ struct pkgCache::Header
On or more packages with the same name form a group, so we have
a simple way to access a package built for different architectures
Group exists in a singly linked list of group records starting at
- the hash index of the name in the pkgCache::Header::GrpHashTable */
+ the hash index of the name in the pkgCache::Header::GrpHashTable
+
+ They also act as a representation of source packages, allowing you to
+ iterate over all binaries produced by a source package.
+ */
struct pkgCache::Group
{
/** \brief Name of the group */
@@ -394,11 +398,15 @@ struct pkgCache::Group
map_pointer_t FirstPackage; // Package
/** \brief Link to the last package which belongs to the group */
map_pointer_t LastPackage; // Package
+
/** \brief Link to the next Group */
map_pointer_t Next; // Group
/** \brief unique sequel ID */
map_id_t ID;
+ /** \brief List of binary produces by source package with this name. */
+ map_pointer_t VersionsInSource; // Version
+
};
/*}}}*/
// Package structure /*{{{*/
@@ -642,6 +650,8 @@ struct pkgCache::Version
map_id_t ID;
/** \brief parsed priority value */
map_number_t Priority;
+ /** \brief next version in the source package (might be different binary) */
+ map_pointer_t NextInSource; // Version
};
/*}}}*/
// Description structure /*{{{*/