Hi folks,

As a fix for:
https://www.opencsw.org/mantis/view.php?id=4791

Please find attached a patch to patch to several
checkpkg files -- n.b.: this is probably not complete yet!

So long,
i

--
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.ga...@brainsware.org
URL: http://brainsware.org/
Index: gar/lib/python/pkgmap.py
===================================================================
--- gar/lib/python/pkgmap.py    (revision 14855)
+++ gar/lib/python/pkgmap.py    (working copy)
@@ -26,7 +26,8 @@
       "s": "symlink",
       "l": "link",
       "i": "script",
-      "e": "editable file"
+      "e": "editable file",
+      "p": "pipe"
   }
 
   def __init__(self, input, permissions=False,
@@ -62,7 +63,7 @@
     target = None
     if len(fields) < 2:
       return None
-    elif line_type in ('f', 'd'):
+    elif line_type in ('f', 'd', 'p'):
       # Files and directories
       line_to_add = fields[3]
       installed_path = fields[3]
Index: gar/lib/python/system_pkgmap_test.py
===================================================================
--- gar/lib/python/system_pkgmap_test.py        (revision 14855)
+++ gar/lib/python/system_pkgmap_test.py        (working copy)
@@ -26,6 +26,7 @@
                  "1250803966 SUNWcsl")
 PKGMAP_LINE_7 = ("/opt/csw/include/mozilla/accessibility/nsAccessNode.h "
                  "f none 0644 root bin 5557 10685 1068611657 !CSWmozilla")
+PKGMAP_LINE_8 = ("/etc/scn/scn_aa_read p none 0600 root sys SUNWscn-agentfacade-r")
 
 
 class IndexerUnitTest(unittest.TestCase):
@@ -85,6 +86,27 @@
     }
     self.assertEqual(expected, spi._ParsePkgmapLine(PKGMAP_LINE_5))
 
+  def test_ParsePkgmapLineTypePipe(self):
+    """A pipe is a valid type and we have to cope with it."""
+    spi = system_pkgmap.Indexer()
+    expected = {
+        'modtime': None,
+        'major': None,
+        'pkgnames': ['SUNWscn-agentfacade-r'],
+        'cksum': None,
+        'owner': 'root',
+        'path': '/etc/scn/scn_aa_read',
+        'line': PKGMAP_LINE_8,
+        'class': 'none',
+        'size': None,
+        'group': 'sys',
+        'target': None,
+        'mode': '0600',
+        'type': 'p',
+        'minor': None,
+    }
+    self.assertEqual(expected, spi._ParsePkgmapLine(PKGMAP_LINE_8))
+
   def test_ParsePkgmapLibc(self):
     """A question mark is not a valid type, but we have to cope with it."""
     spi = system_pkgmap.Indexer()
Index: gar/lib/python/system_pkgmap.py
===================================================================
--- gar/lib/python/system_pkgmap.py     (revision 14855)
+++ gar/lib/python/system_pkgmap.py     (working copy)
@@ -148,7 +148,7 @@
     elif file_type == 'l':
       # ftype l: path l class package
       f_path, f_type, f_class, f_pkgname = parts
-    elif file_type in ('d', 'x'):
+    elif file_type in ('d', 'x', 'p'):
       # ftype d: path d class mode owner group package(s)
       # ftype x: path x class mode owner group package
       f_path, f_type, f_class, f_mode, f_owner, f_group = parts[:6]
_______________________________________________
devel mailing list
devel@lists.opencsw.org
https://lists.opencsw.org/mailman/listinfo/devel

Reply via email to