This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH setup 11/13] Add LDesc() accessor method to SolvableVersion


---
 libsolv.cc | 14 ++++++++++++++
 libsolv.h  |  1 +
 2 files changed, 15 insertions(+)

diff --git a/libsolv.cc b/libsolv.cc
index 955a1b2..ba54fc5 100644
--- a/libsolv.cc
+++ b/libsolv.cc
@@ -192,6 +192,20 @@ SolvableVersion::SDesc () const
   return sdesc;
 }
 
+const std::string
+SolvableVersion::LDesc () const
+{
+  if (!id)
+    return "";
+  Solvable *solvable = pool_id2solvable(pool, id);
+  const char *ldesc = repo_lookup_str(solvable->repo, id, SOLVABLE_DESCRIPTION);
+
+  if (!ldesc)
+    return "";
+
+  return ldesc;
+}
+
 const std::string
 SolvableVersion::sourcePackageName () const
 {
diff --git a/libsolv.h b/libsolv.h
index f394e65..2eb1f24 100644
--- a/libsolv.h
+++ b/libsolv.h
@@ -54,6 +54,7 @@ class SolvableVersion
 
   const std::string Name () const;
   const std::string SDesc () const;
+  const std::string LDesc () const;
   // In setup-speak, 'Canonical' version means 'e:v-r', the non-decomposed version
   const std::string Canonical_version () const;
   // Return the dependency list
-- 
2.17.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]