@@ -647,6 +647,7 @@ def __init__(self):
647647 self .recursion_buster = False
648648
649649 self .install_on_startup_file = None
650+ self .show_on_startup_pkg = None
650651
651652 self .review_cache = None
652653 self .current_pkginfo = None
@@ -701,6 +702,22 @@ def do_command_line(self, command_line, data=None):
701702 sys .exit (self .export_listing (flatpak_only = False ))
702703 elif num > 1 and args [1 ] == "list-flatpak" :
703704 sys .exit (self .export_listing (flatpak_only = True ))
705+ elif num == 3 and args [1 ] == "show" :
706+ target_pkg = args [2 ]
707+ if self .gui_ready :
708+ pkginfo = self .installer .find_pkginfo (target_pkg , installer .PKG_TYPE_APT )
709+ if not pkginfo :
710+ pkginfo = self .installer .find_pkginfo (target_pkg , installer .PKG_TYPE_FLATPAK )
711+ if pkginfo :
712+ self .show_package (pkginfo , self .PAGE_LANDING )
713+ self .main_window .present ()
714+ else :
715+ print (f"MintInstall: Package { target_pkg } not found." )
716+ else :
717+ self .show_on_startup_pkg = target_pkg
718+
719+ self .activate ()
720+ return 0
704721 elif num == 3 and args [1 ] == "install" :
705722 for try_method in (Gio .File .new_for_path , Gio .File .new_for_uri ):
706723 file = try_method (args [2 ])
@@ -2176,6 +2193,16 @@ def finished_loading_packages(self):
21762193 self .gui_ready = True
21772194 self .update_conditional_widgets ()
21782195
2196+ if self .show_on_startup_pkg is not None :
2197+ pkginfo = self .installer .find_pkginfo (self .show_on_startup_pkg , installer .PKG_TYPE_APT )
2198+ if not pkginfo :
2199+ pkginfo = self .installer .find_pkginfo (self .show_on_startup_pkg , installer .PKG_TYPE_FLATPAK )
2200+ if pkginfo :
2201+ self .show_package (pkginfo , self .PAGE_LANDING )
2202+ else :
2203+ print (f"MintInstall: Package { self .show_on_startup_pkg } not found." )
2204+ self .show_on_startup_pkg = None
2205+
21792206 if self .install_on_startup_file is not None :
21802207 self .handle_command_line_install (self .install_on_startup_file )
21812208
0 commit comments