7645 Man page required for Package Manager and Update Manager
authorPadraig O'Briain <padraig.obriain@sun.com>
Tue, 07 Apr 2009 16:21:00 +0100
changeset 1024 e83271f2e133
parent 1023 73f73773b4c9
child 1025 fca418265023
7645 Man page required for Package Manager and Update Manager
.hgignore
src/man/Makefile
src/man/packagemanager.1.txt
src/man/pm-updatemanager.1.txt
src/packagemanager.py
src/pkgdefs/SUNWipkg-gui/prototype
src/pkgdefs/SUNWipkg-um/prototype
src/setup.py
src/um/data/updatemanager.desktop.in
src/updatemanager.py
src/updatemanagernotifier.py
--- a/.hgignore	Wed Apr 08 13:06:40 2009 +0100
+++ b/.hgignore	Tue Apr 07 16:21:00 2009 +0100
@@ -21,9 +21,11 @@
 ^src/gui/data/packagemanager.png$
 ^src/gui/help/.*/package-manager.xml$
 ^src/gui/data/packagemanager-info.xml$
+^src/man/packagemanager.1$
 ^src/man/pkg.1$
 ^src/man/pkg.5$
 ^src/man/pkg.depotd.1m$
+^src/man/pm-updatemanager.1$
 ^src/man/pkgrecv.1$
 ^src/man/pkgsend.1$
 ^src/pkg$
--- a/src/man/Makefile	Wed Apr 08 13:06:40 2009 +0100
+++ b/src/man/Makefile	Tue Apr 07 16:21:00 2009 +0100
@@ -31,16 +31,20 @@
 PWD:sh = pwd 
 link:
 	-mkdir -p /usr/share/man/cat1 /usr/share/man/cat1m /usr/share/man/cat5
+	ln -sf $(PWD)/packagemanager.1.txt /usr/share/man/cat1/packagemanager.1
 	ln -sf $(PWD)/pkg.1.txt /usr/share/man/cat1/pkg.1
 	ln -sf $(PWD)/pkgrecv.1.txt /usr/share/man/cat1/pkgrecv.1
 	ln -sf $(PWD)/pkgsend.1.txt /usr/share/man/cat1/pkgsend.1
+	ln -sf $(PWD)/pm-updatemanager.1.txt /usr/share/man/cat1/pm-updatemanager.1
 	ln -sf $(PWD)/pkg.depotd.1m.txt /usr/share/man/cat1m/pkg.depotd.1m
 	ln -sf $(PWD)/pkg.5.txt /usr/share/man/man5/pkg.5
 
 link-clean:
+	rm -f /usr/share/man/cat1/packagemanager.1
 	rm -f /usr/share/man/cat1/pkg.1
 	rm -f /usr/share/man/cat1/pkgrecv.1
 	rm -f /usr/share/man/cat1/pkgsend.1
+	rm -f /usr/share/man/cat1/pm-updatemanager.1
 	rm -f /usr/share/man/cat1m/pkg.depotd.1m
 	rm -f /usr/share/man/cat5/pkg.5
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/man/packagemanager.1.txt	Tue Apr 07 16:21:00 2009 +0100
@@ -0,0 +1,102 @@
+User Commands                                 packagemanager(1)
+
+
+NAME
+     packagemanager - GUI for the Image Packaging System 
+
+SYNOPSIS
+     /usr/bin/packagemanager [options]
+
+     /usr/bin/packagemanager [-hiRU] [--help] [--info-install file]
+         [--update-all be_name] [--image-dir dir]
+     /usr/bin/packagemanager [file]
+
+DESCRIPTION
+     packagemanager is the graphical user interface for the Image Packaging
+     System (IPS) software.
+
+     The Package Manager enables you to perform the following tasks:
+
+     - Search, install and remove packages.
+
+     - Add,  remove and modify publishers.
+
+     - Create, remove and manage boot environments.
+
+     If file operand is specified and its suffix is .p5i, packagemanager
+     will launch in Web Install mode, which will add one or more publishers
+     and a number of packages for each publisher.
+
+OPTIONS
+     The following options are supported:
+
+     --help or -h
+          Displays a usage message.
+
+     --info-install or -i file
+          Allows you to specify a .p5i file to run packagemanager in
+          Web Install mode. The file which is specified must have suffix .p5i.
+
+     ---image-dir or -R dir
+          Operate on the image rooted at dir, rather than the one discovered
+          automatically.
+
+     ---update-all or -U be_name
+          Update all packages in specified boot environment. When the user
+          chooses Update All option in packagemanager and the packages
+          containing pkg or packagemanager need to be updated before 
+          doing image update, packagemanager is called with this option
+          after the packages have been updated.
+
+
+EXAMPLES
+     Example 1:  Invoke packagemanager on the current image.
+
+     $ packagemanager
+
+     Example 2:  Invoke packagemanager in image stored at /aux0/example_root.
+
+     $ packagemanager -R /aux0/example_root 
+
+     Example 3:  Invoke packagemanager in Web Install mode.
+
+     $ packagemanager ~/test.p5i
+
+EXIT STATUS
+     The following exit values are returned:
+
+     0     Everything worked.
+
+     1     Something bad happened.
+
+     2     Invalid command line options were specified.
+
+FILES
+     /var/pkg/gui-cache         Location for cached package data maintained
+                                by packagemanager to speed up program 
+                                start-up and switching between publishers.
+
+ATTRIBUTES
+     See attributes(5) for descriptions of the  following  attri-
+     butes:
+     ____________________________________________________________
+    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
+    |_____________________________|_____________________________|
+    | Availability                | SUNWipkg-gui                |
+    | Interface Stability         | None / Under Development    |
+    |_____________________________|_____________________________|
+
+SEE ALSO
+     pkg(1), attributes(5)
+
+NOTES
+     The image packaging system is an under-development feature.
+     Command names, invocation, formats, and operations are all subject
+     to change.  Development is hosted in the OpenSolaris community
+     at:
+
+     http://opensolaris.org/os/project/pkg/
+
+     packagemanager needs to be invoked with enough privilege to operate
+     on an image you do not own. You will normally invoke packagemanager
+     using pexec.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/man/pm-updatemanager.1.txt	Tue Apr 07 16:21:00 2009 +0100
@@ -0,0 +1,85 @@
+User Commands                                  pm-updatemanager(1)
+
+
+NAME
+     pm-updatemanager - GUI to update packages.
+
+SYNOPSIS
+     /usr/bin/pm-updatemanager [options]
+
+     /usr/bin/pm-updatemanager [-hrRU]  [--help] [--refresh] [--image-dir dir]
+        [--update-all be_name]
+
+DESCRIPTION
+     pm-updatemanager is a program which you can use to update the installed
+     packages on your system.
+
+
+OPTIONS
+     The following options are supported:
+
+     --help or -h
+          Displays a usage message.
+
+     ---refresh or -r
+           Force a refresh before checking for updaters. By default, a
+           refresh is not done before checking for updates.
+
+     ---image-dir or -R dir
+          Operate on the image rooted at dir, rather than the one discovered
+          automatically.
+
+     ---update-all or -U be_name
+          Update all packages in specified boot environment. When the user
+          chooses Update All option in pm-updatemanager and the packages
+          containing pkg or pm-updatemanager need to be updated before
+          doing image update, pm-updatemanager is called with this option
+          after the packages have been updated.
+
+
+EXAMPLES
+     Example 1:  Invoke pm-updatemanager on the current image.
+
+     $ pm-updatemanager
+
+     Example 2:  Invoke pm-updatemanager on image stored at /aux0/example_root.
+
+     $ pm-updatemanager -R /aux0/example_root 
+
+
+EXIT STATUS
+     The following exit values are returned:
+
+     0     Everything worked.
+
+     1     Something bad happened.
+
+     2     Invalid command line options were specified.
+
+FILES
+     None
+
+ATTRIBUTES
+     See attributes(5) for descriptions of the  following  attri-
+     butes:
+     ____________________________________________________________
+    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
+    |_____________________________|_____________________________|
+    | Availability                | SUNWipkg-um                 |
+    | Interface Stability         | None / Under Development    |
+    |_____________________________|_____________________________|
+
+SEE ALSO
+     packagemanager(1), pkg(1), attributes(5), pkg(5)
+
+NOTES
+     The image packaging system is an under-development feature.
+     Command names, invocation, formats, and operations are all subject
+     to change.  Development is hosted in the OpenSolaris community
+     at:
+
+     http://opensolaris.org/os/project/pkg/
+
+     pm-updatemanager needs to be invoked with enough privilege to operate
+     on an image you do not own. You will normally invoke pm-updatemanager
+     using pexec.
--- a/src/packagemanager.py	Wed Apr 08 13:06:40 2009 +0100
+++ b/src/packagemanager.py	Tue Apr 07 16:21:00 2009 +0100
@@ -3637,113 +3637,6 @@
 
 ###############################################################################
 #-----------------------------------------------------------------------------#
-# Test functions
-#-----------------------------------------------------------------------------#
-        def fill_with_fake_data(self):
-                '''test data for gui'''
-                save_selected = _("Save selected...")
-                save_selected_pkgs = _("Save selected packages...")
-                reboot_needed = _("The installed package(s) require a reboot before "
-                    "installation can be completed.")
-                self.application_list = self.__get_new_application_liststore()
-                self.category_list = self.__get_new_category_liststore()
-                self.section_list = self.__get_new_section_liststore()
-                self.filter_list = self.__get_new_filter_liststore()
-                self.repositories_list = self.__get_new_repositories_liststore()
-
-                app1 = [False, gui_misc.get_icon_pixbuf(self.application_dir, "locked"), \
-                    gui_misc.get_icon_pixbuf(self.application_dir, "None"), \
-                    "acc", None, None, None, 4, "desc6", \
-                    "Object Name1", None, True, None]
-                app2 = [False, gui_misc.get_icon_pixbuf(self.application_dir,
-                    "update_available"), \
-                    gui_misc.get_icon_pixbuf(self.application_dir, \
-                     _('All')), "acc_gam", \
-                    "2.3", None, "2.8", \
-                    4, "desc7", "Object Name2", None, True, None]
-                app3 = [False, gui_misc.get_icon_pixbuf(self.application_dir, "None"), \
-                    gui_misc.get_icon_pixbuf(self.application_dir, "Other"), \
-                    "gam_grap", "2.3", None, None, 4, \
-                    "desc8", "Object Name3", None, True, None]
-                app4 = [False, gui_misc.get_icon_pixbuf(self.application_dir,
-                    "update_locked"), \
-                    gui_misc.get_icon_pixbuf(self.application_dir, "Office"), \
-                    "grap_gam", "2.3", None, "2.8", 4, \
-                    "desc9", "Object Name2", None, True, None]
-                app5 = [False, gui_misc.get_icon_pixbuf(self.application_dir,
-                    "update_available"), \
-                    gui_misc.get_icon_pixbuf(self.application_dir, "None"), \
-                    "grap", "2.3", None, "2.8", 4, \
-                    "desc0", "Object Name3", None, True, None]
-                itr1 = self.application_list.append(app1)
-                itr2 = self.application_list.append(app2)
-                itr3 = self.application_list.append(app3)
-                itr4 = self.application_list.append(app4)
-                itr5 = self.application_list.append(app5)
-                #      self.__add_package_to_category(_("All"),None,None,None);
-                self.__add_package_to_category(_("Accessories"), \
-                    None, None, itr1, self.application_list, self.category_list)
-                self.__add_package_to_category(_("Accessories"), None, None, itr2,
-                    self.application_list, self.category_list)
-                self.__add_package_to_category(_("Games"), None, None, itr3,
-                    self.application_list, self.category_list)
-                self.__add_package_to_category(_("Graphics"), None, None, itr3,
-                    self.application_list, self.category_list)
-                self.__add_package_to_category(_("Games"), None, None, itr2,
-                    self.application_list, self.category_list)
-                self.__add_package_to_category(_("Graphics"), None, None, itr4,
-                    self.application_list, self.category_list)
-                self.__add_package_to_category(_("Games"), None, None, itr4,
-                    self.application_list, self.category_list)
-                self.__add_package_to_category(_("Graphics"), None, None, itr5,
-                    self.application_list, self.category_list)
-
-                #     Category names until xdg is imported.
-                #     from xdg.DesktopEntry import *
-                #     entry = DesktopEntry ()
-                #     directory = '/usr/share/desktop-directories'
-                #     for root, dirs, files in os.walk (directory):
-                #       for name in files:
-                #       entry.parse (os.path.join (root, name))
-                #       self.__add_category_to_section (entry.getName (),
-                #   _('Applications Desktop'))
-
-                self.__add_category_to_section(_("Accessories"),
-                    _('Applications Desktop'), self.category_list)
-                self.__add_category_to_section(_("Games"),
-                    _('Applications Desktop'), self.category_list)
-                self.__add_category_to_section(_("Graphics"),
-                    _('Applications Desktop'), self.category_list)
-                self.__add_category_to_section(_("Internet"),
-                    _('Applications Desktop'), self.category_list)
-                self.__add_category_to_section(_("Office"),
-                    _('Applications Desktop'), self.category_list)
-                self.__add_category_to_section(_("Sound & Video"),
-                    _('Applications Desktop'), self.category_list)
-                self.__add_category_to_section(_("System Tools"),
-                    _('Applications Desktop'), self.category_list)
-                self.__add_category_to_section(_("Universal Access"),
-                    _('Applications Desktop'), self.category_list)
-                self.__add_category_to_section(_("Developer Tools"),
-                    _('Applications Desktop'), self.category_list)
-                self.__add_category_to_section(_("Core"),
-                    _('Operating System'), self.category_list)
-                self.__add_category_to_section(_("Graphics"),
-                    _('Operating System'), self.category_list)
-                self.__add_category_to_section(_("Media"),
-                    _('Operating System'), self.category_list)
-                #Can be twice :)
-                self.__add_category_to_section(_("Developer Tools"),
-                    _('Operating System'), self.category_list)
-                self.__add_category_to_section(_("Office"), "Progs",
-                    self.category_list)
-                self.__add_category_to_section(_("Office2"), "Progs",
-                    self.category_list)
-                self.__setup_repositories_combobox(self.api_o)
-                self.in_setup = False
-
-###############################################################################
-#-----------------------------------------------------------------------------#
 # Main
 #-----------------------------------------------------------------------------#
 
@@ -3753,16 +3646,19 @@
 
 if __name__ == '__main__':
         debug = False
-        passed_test_arg = False
         update_all_proceed = False
         ua_be_name = None
         app_path = None
         image_dir = None
-        info_install = False
+        info_install_arg = None
+        save_selected = _("Save selected...")
+        save_selected_pkgs = _("Save selected packages...")
+        reboot_needed = _("The installed package(s) require a reboot before "
+            "installation can be completed.")
 
         try:
-                opts, args = getopt.getopt(sys.argv[1:], "htR:U:i", \
-                    ["help", "test-gui", "image-dir=", "update-all=", "info-install"])
+                opts, args = getopt.getopt(sys.argv[1:], "hR:U:i", \
+                    ["help", "image-dir=", "update-all=", "info-install="])
         except getopt.error, msg:
                 print "%s, for help use --help" % msg
                 sys.exit(2)
@@ -3777,22 +3673,16 @@
                 if option in ("-h", "--help"):
                         print """\
 Use -R (--image-dir) to specify image directory.
-Use -t (--test-gui) to work on fake data.
 Use -U (--update-all) to proceed with Update All"""
                         sys.exit(0)
-                if option in ("-t", "--test-gui"):
-                        passed_test_arg = True
                 if option in ("-R", "--image-dir"):
                         image_dir = argument
                 if option in ("-U", "--update-all"):
                         update_all_proceed = True
                         ua_be_name = argument
                 if option in ("-i", "--info-install"):
-                        info_install = True
-
-        if passed_test_arg and image_dir != None:
-                print "Options -R and -t can not be used together."
-                sys.exit(2)
+                        info_install_arg = argument
+
         if image_dir == None:
                 try:
                         image_dir = os.environ["PKG_IMAGE"]
@@ -3801,9 +3691,12 @@
 
 
         # Setup webinstall
-        if info_install or (len(sys.argv) == 2 and sys.argv[1].endswith(PKGINFO_SUFFIX)):
+        if info_install_arg or (len(sys.argv) == 2 and \
+            sys.argv[1].endswith(PKGINFO_SUFFIX)):
                 webinstall = webinstall.Webinstall(image_dir)
-                webinstall.process_param(sys.argv[1])
+                if len(sys.argv) == 2:
+                        info_install_arg = sys.argv[1]
+                webinstall.process_param(info_install_arg)
                 main()
                 sys.exit(0)
 
@@ -3819,9 +3712,6 @@
 
         packagemanager.init_show_filter()
 
-        if not passed_test_arg:
-                packagemanager.process_package_list_start(image_dir)
-        else:
-                packagemanager.fill_with_fake_data()
+        packagemanager.process_package_list_start(image_dir)
 
         main()
--- a/src/pkgdefs/SUNWipkg-gui/prototype	Wed Apr 08 13:06:40 2009 +0100
+++ b/src/pkgdefs/SUNWipkg-gui/prototype	Tue Apr 07 16:21:00 2009 +0100
@@ -59,6 +59,9 @@
 f none usr/share/icons/package-manager/status_checkmark.png 444 root other
 f none usr/share/icons/package-manager/status_installed.png 444 root other
 f none usr/share/icons/package-manager/status_newupdate.png 444 root other
+d none usr/share/man 755 root bin
+d none usr/share/man/cat1 755 root bin
+f none usr/share/man/cat1/packagemanager.1 444 root bin
 d none usr/share/mime 755 root root
 d none usr/share/mime/packages 755 root root
 f none usr/share/mime/packages/packagemanager-info.xml 644 root bin
--- a/src/pkgdefs/SUNWipkg-um/prototype	Wed Apr 08 13:06:40 2009 +0100
+++ b/src/pkgdefs/SUNWipkg-um/prototype	Tue Apr 07 16:21:00 2009 +0100
@@ -13,7 +13,7 @@
 f none lib/svc/method/pkg-update 755 root bin
 d none usr 755 root sys
 d none usr/bin 755 root bin
-f none usr/bin/updatemanager 755 root bin
+f none usr/bin/pm-updatemanager 755 root bin
 d none usr/lib 755 root bin
 d none usr/lib/update-manager 755 root bin
 f none usr/lib/update-manager/update-refresh.sh 755 root bin
@@ -30,6 +30,9 @@
 f none usr/share/icons/update-manager/notify_update.png 444 root other
 f none usr/share/icons/update-manager/status_blank.png 444 root other
 f none usr/share/icons/update-manager/status_checkmark.png 444 root other
+d none usr/share/man 755 root bin
+d none usr/share/man/cat1 755 root bin
+f none usr/share/man/cat1/pm-updatemanager.1 444 root bin
 d none usr/share/update-manager 755 root bin
 f none usr/share/update-manager/PM_app_48x.png 444 root bin
 f none usr/share/update-manager/PM_package_36x.png 444 root bin
--- a/src/setup.py	Wed Apr 08 13:06:40 2009 +0100
+++ b/src/setup.py	Tue Apr 07 16:21:00 2009 +0100
@@ -139,7 +139,7 @@
                 ['publish.py', 'pkgsend'],
                 ['pull.py', 'pkgrecv'],
                 ['packagemanager.py', 'packagemanager'],
-                ['updatemanager.py', 'updatemanager'],
+                ['updatemanager.py', 'pm-updatemanager'],
                 ],
         lib_dir: [
                 ['depot.py', 'pkg.depotd'],
@@ -190,9 +190,11 @@
         }
 
 man1_files = [
+        'man/packagemanager.1',
         'man/pkg.1',
         'man/pkgsend.1',
         'man/pkgrecv.1',
+        'man/pm-updatemanager.1',
         ]
 man1m_files = [
         'man/pkg.depotd.1m'
--- a/src/um/data/updatemanager.desktop.in	Wed Apr 08 13:06:40 2009 +0100
+++ b/src/um/data/updatemanager.desktop.in	Tue Apr 07 16:21:00 2009 +0100
@@ -2,7 +2,7 @@
 _Name=Update Manager
 _GenericName=Update Manager
 _Comment=Install available updates
-Exec=gksu /usr/bin/updatemanager -r
+Exec=gksu /usr/bin/pm-updatemanager -r
 Icon=updatemanager
 Terminal=false
 MultipleArgs=false
--- a/src/updatemanager.py	Wed Apr 08 13:06:40 2009 +0100
+++ b/src/updatemanager.py	Tue Apr 07 16:21:00 2009 +0100
@@ -658,9 +658,6 @@
                 if self.image_dir_arg != None:
                         return self.image_dir_arg
 
-                if local_image_dir != None:
-                        return local_image_dir
-                        
                 image_directory = os.popen(IMAGE_DIR_COMMAND).readline().rstrip()
                 if len(image_directory) == 0:
                         image_directory = IMAGE_DIRECTORY_DEFAULT
@@ -1488,12 +1485,12 @@
         debug = False
         show_all_opts = False
         show_install_updates_only = False
-        local_image_dir = None
         do_refresh = False
 
         try:
-                opts, args = getopt.getopt(sys.argv[1:], "hdualirR:U:",
-                    ["help", "debug","uninstalled"])
+                opts, args = getopt.getopt(sys.argv[1:], "huairR:U:",
+                    ["help", "uninstalled", "all", "install_updates", 
+                    "refresh", "image-dir=", "update-all="])
         except getopt.error, msg:
                 print "%s, for help use --help" % msg
                 sys.exit(2)
@@ -1507,20 +1504,16 @@
         for option, argument in opts:
                 if option in ("-h", "--help"):
                         print """\
-Use -d (--debug) to run in debug mode.
+Use -r (--refresh) to force a refresh before checking for updates.
 Use -R (--image-dir) to specify image directory.
 Use -U (--update-all) to proceed with Update All"""
                         sys.exit(0)
-                if option in ("-d", "--debug"):
-                        debug = True
                 if option in ("-u", "--uninstalled"):
                         list_uninstalled = True
                 if option in ("-a", "--all"):
                         show_all_opts = True
                 if option in ("-i", "--install_updates"):
                         show_install_updates_only = True
-                if option in ("-l", "--local_image"):
-                        local_image_dir = os.getcwd()
                 # Refresh catalogs during plan_install and plan_update_all
                 if option in ("-r", "--refresh"):
                         do_refresh = True
--- a/src/updatemanagernotifier.py	Wed Apr 08 13:06:40 2009 +0100
+++ b/src/updatemanagernotifier.py	Tue Apr 07 16:21:00 2009 +0100
@@ -63,7 +63,7 @@
 
 NOTIFY_ICON_PATH = "/usr/share/icons/update-manager/notify_update.png"
 GKSU_PATH = "/usr/bin/gksu"
-UPDATEMANAGER = "updatemanager"
+UPDATEMANAGER = "pm-updatemanager"
 
 UPDATEMANAGER_PREFERENCES = "/apps/updatemanager/preferences"
 START_DELAY_PREFERENCES = "/apps/updatemanager/preferences/start_delay"