We just recently updated our WOS build server from S11 11/11 to S11.1 build 13. In doing so, importer.py failed with this error:

Seeding local SMF manifest database from file:///home/amsteinb/Builds/S11.1/archs/i386
First pass: initial import 2012-04-26 13:28:02.867050
Error(import): 'path': in file redist_cluster, line 5
Traceback (most recent call last):
  File "./importer.py", line 2004, in <module>
    main_func()
  File "./importer.py", line 1639, in main_func
    SolarisParse(_mf)
  File "./importer.py", line 1331, in SolarisParse
    curpkg.import_pkg(package_name, line)
  File "./importer.py", line 141, in import_pkg
    [], exclude_files)
  File "./importer.py", line 213, in import_files_from_pkg
    action.attrs["importer.svr4path"] = action.attrs["path"]
KeyError: 'path'

We are currently working around it by setting PYTHONPATH to the s11 BE. I couldn't find the specific change to the pkg(5) .py files that would have caused this, but I was able to patch up importer.py by ignoring the path setting when dealing with license files. See the code diff below.

Does anyone have a pointer to what changes took place that caused the error? Is the right approach below? If it is, I can make the change and have it put back into the RE src gate where importer.py now resides.

-- Alan



diff -r 45a003372dbc build/distro-import/importer.py
--- a/build/distro-import/importer.py   Fri Apr 20 14:09:02 2012 -0700
+++ b/build/distro-import/importer.py   Thu Apr 26 13:18:23 2012 -0700
@@ -210,12 +210,11 @@

                         action.attrs["importer.source"] = "svr4pkg"
                         action.attrs["importer.svr4pkg"] = imppkg_name
-                        action.attrs["importer.svr4path"] = 
action.attrs["path"]

-                        if action.name == "license":
+                        if action.name != "license":
                                 # The "path" attribute is confusing and
                                 # unnecessary for licenses.
-                                del action.attrs["path"]
+ action.attrs["importer.svr4path"] = action.attrs["path"]

                         if action.name == "file":
                                 # is this a file for which we need a timestamp?
@@ -632,7 +631,7 @@
("%s:%s" % (a.attrs["importer.svr4pkg"], a.attrs["importer.svr4path"]), a)
             for a in pkg.actions
             if "importer.svr4pkg" in a.attrs and
-            a.name in ["license", "file"]
+            a.name in ["file"]
         ]
         svr4_traversal_dict = dict(svr4_traversal_list)
         # won't happen unless same pkg imported more than once into same ips 
pkg
@@ -661,7 +660,7 @@
         for p in svr4_pkg_list:
                 bundle = SolarisPackageDirBundle(pkg_path(p))
                 for a in bundle:
-                        if a.name not in ["license", "file"]:
+                        if a.name not in ["file"]:
                                 continue
                         index = "%s:%s" % (p, a.attrs["path"])
                         actual_action = svr4_traversal_dict.get(index)

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to