i've got a fix to remove the pkg linked image subcommands from the
default pkg usage message.  the bug is:

18816 pkg usage should not mention linked image commands
https://defect.opensolaris.org/bz/show_bug.cgi?id=18816

the webrev is:

http://mcescher.us.oracle.com/export/ws/pkg-noliusage/webrev/

the fix is also inline below.

thanks
ed

diff --git a/src/client.py b/src/client.py
--- a/src/client.py
+++ b/src/client.py
@@ -144,6 +144,7 @@ def usage(usage_error=None, cmd=None, re

         basic_usage = {}
         adv_usage = {}
+        priv_usage = {}

         basic_cmds = ["refresh", "install", "uninstall", "update", "list",
             "version"]
@@ -208,13 +209,6 @@ def usage(usage_error=None, cmd=None, re
             "rebuild-index",
             "update-format",
             "image-create",
-            "",
-            "attach-linked",
-            "detach-linked",
-            "list-linked",
-            "audit-linked",
-            "sync-linked",
-            "property-linked",
         ]

         adv_usage["info"] = \
@@ -296,22 +290,22 @@ def usage(usage_error=None, cmd=None, re
         adv_usage["rebuild-index"] = ""
         adv_usage["update-format"] = ""

-        adv_usage["list-linked"] = _("-H")
-        adv_usage["attach-linked"] = _(
+        priv_usage["list-linked"] = _("-H")
+        priv_usage["attach-linked"] = _(
             "[-fnvq] [--accept] [--licenses] [--no-index]\n"
             "            [--no-refresh] [--no-pkg-updates] 
[--linked-md-only]\n"
             "            [--allow-relink]\n"
             "            [--prop-linked <propname>=<propvalue> ...]\n"
             "            (-c|-p) <li-name> <dir>")
-        adv_usage["detach-linked"] = _(
+        priv_usage["detach-linked"] = _(
             "[-fnvq] [-a|-l <li-name>] [--linked-md-only]")
-        adv_usage["property-linked"] = _("[-H] [-l <li-name>] [propname ...]")
-        adv_usage["audit-linked"] = _("[-a|-l <li-name>]")
-        adv_usage["sync-linked"] = _(
+        priv_usage["property-linked"] = _("[-H] [-l <li-name>] [propname ...]")
+        priv_usage["audit-linked"] = _("[-a|-l <li-name>]")
+        priv_usage["sync-linked"] = _(
             "[-nvq] [--accept] [--licenses] [--no-index]\n"
             "            [--no-refresh] [--no-parent-sync] 
[--no-pkg-updates]\n"
             "            [--linked-md-only] [-a|-l <name>]")
-        adv_usage["set-property-linked"] = _(
+        priv_usage["set-property-linked"] = _(
             "[-nvq] [--accept] [--licenses] [--no-index] [--no-refresh]\n"
             "            [--no-parent-sync] [--no-pkg-updates]\n"
             "            [--linked-md-only] <propname>=<propvalue> ...")
@@ -340,6 +334,7 @@ def usage(usage_error=None, cmd=None, re
                 combined = {}
                 combined.update(basic_usage)
                 combined.update(adv_usage)
+                combined.update(priv_usage)
                 print_cmds([cmd], combined)
                 sys.exit(retcode)
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to