[csw-devel] SF.net SVN: gar:[18162] csw/mgar/gar/v2-solaris11/lib/python/system_pkgmap. py
chninkel at users.sourceforge.net
chninkel at users.sourceforge.net
Tue May 29 23:59:22 CEST 2012
Revision: 18162
http://gar.svn.sourceforge.net/gar/?rev=18162&view=rev
Author: chninkel
Date: 2012-05-29 21:59:21 +0000 (Tue, 29 May 2012)
Log Message:
-----------
v2-solaris11: create a fake SVR4 pkg name for IPS package
Modified Paths:
--------------
csw/mgar/gar/v2-solaris11/lib/python/system_pkgmap.py
Modified: csw/mgar/gar/v2-solaris11/lib/python/system_pkgmap.py
===================================================================
--- csw/mgar/gar/v2-solaris11/lib/python/system_pkgmap.py 2012-05-29 19:29:11 UTC (rev 18161)
+++ csw/mgar/gar/v2-solaris11/lib/python/system_pkgmap.py 2012-05-29 21:59:21 UTC (rev 18162)
@@ -111,7 +111,7 @@
def _ParsePkgListLine(self, line):
fields = re.split(c.WS_RE, line)
- pkgname = fields[0]
+ pkgname = self._IpsNameToPkgname(fields[0])
desc_field_start = 1
# The optional publisher field is always between
# parenthesis, we skip it if necessary
@@ -144,7 +144,7 @@
f_owner = None
f_group = None
f_pkgname = None
- pkgnames = [ parts[2] ]
+ pkgnames = [ self._IpsNameToPkgname(parts[2]) ]
if f_type == 's' or f_type == 'l':
f_target = parts[3]
else:
@@ -385,8 +385,11 @@
packages_by_pkgname.setdefault(pkgname, pkg_desc)
logging.debug("<- _ParsePkginfoOutput()")
return packages_by_pkgname
+
+ def _IpsNameToPkgname(self, ips_name):
+ """Create a fake Svr4 pkgname from an ips pkgname"""
+ return "SUNW" + ips_name.replace("/", "_")
-
class InstallContentsImporter(object):
"""Responsible for importing a pickled file into the database."""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list