Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=cfpm.git;a=commitdiff;h=a4350e97f993fae083a1bd159cf7071a9118fcd0

commit a4350e97f993fae083a1bd159cf7071a9118fcd0
Author: Priyank <priy...@frugalware.org>
Date:   Sat Jun 13 19:47:08 2009 +0530

Fixes in Package::getLicense()

* the method should treat the value returned by pacman_pkg_getinfo() as a 
PM_LIST*
of licenses.

diff --git a/pm.cc b/pm.cc
index ada0752..b155852 100644
--- a/pm.cc
+++ b/pm.cc
@@ -252,10 +252,17 @@ string Package::getURL()
return ret;
}

-string Package::getLicense()
+List* Package::getLicense()
{
-       string ret = (char*) getInfo(PM_PKG_LICENSE);
-       return ret;
+       List    *lst = NULL;
+       PM_LIST *l = NULL;
+
+       l = (PM_LIST*) getInfo(PM_PKG_LICENSE);
+       if ( l )
+       {
+               lst = new List(l);
+       }
+       return lst;
}

string Package::getArch()
diff --git a/pm.hh b/pm.hh
index e34c739..f05d54d 100644
--- a/pm.hh
+++ b/pm.hh
@@ -63,7 +63,7 @@ namespace PM
std::string getVersion();
std::string getDescription();
std::string getURL();
-                       std::string getLicense();
+                       List* getLicense();
std::string getArch();
std::string getBuildDate();
std::string getBuildType();
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to