def _continue_to_install(self): """Continue to install ? """ if self.master_packages and Msg().answer() in ["y", "Y"]: installs, upgraded = self.build_install() Msg().reference(installs, upgraded) write_deps(self.deps_dict) delete(self.build_folder)
def view(self): """ View SlackBuild package, read or install them from slackbuilds.org """ if self.sbo_url and self.name not in self.blacklist: prgnam = ("{0}-{1}".format(self.name, self.sbo_version)) self.view_sbo( self.name, self.sbo_url, self.sbo_desc, self.sbo_dwn.split("/")[-1], ", ".join([src.split("/")[-1] for src in self.source_dwn]), self.sbo_req) FAULT = self.error_uns() while True: choice = self.read_choice() if choice in ["D", "d"]: Download(path="", url=self.dwn_srcs, repo="sbo").start() break elif choice in ["R", "r"]: README = Read(self.sbo_url).readme("README") fill = self.fill_pager(README) pydoc.pager(README + fill) elif choice in ["F", "f"]: info = Read(self.sbo_url).info(self.name, ".info") fill = self.fill_pager(info) pydoc.pager(info + fill) elif choice in ["S", "s"]: SlackBuild = Read(self.sbo_url).slackbuild(self.name, ".SlackBuild") fill = self.fill_pager(SlackBuild) pydoc.pager(SlackBuild + fill) elif choice in ["B", "b"]: self.build(FAULT) delete(self.build_folder) break elif choice in ["I", "i"]: if not find_package(prgnam + self.meta.sp, self.meta.pkg_path): self.build(FAULT) self.install(prgnam) delete(self.build_folder) break else: Msg().template(78) Msg().pkg_found(self.name, self.sbo_version) Msg().template(78) break else: break else: Msg().pkg_not_found("\n", self.name, "Can't view", "\n")
def start(self): ''' Install new patches from official Slackware mirrors ''' try: data = slack_data(self.PACKAGES_TXT, self.step) (dwn_links, upgrade_all, comp_sum, uncomp_sum) = store(data[0], data[1], data[2], data[3], self.version) sys.stdout.write("{0}Done{1}\n".format(GREY, ENDC)) if upgrade_all: print("\nThese packages need upgrading:\n") template(78) print("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}".format( "| Package", " " * 17, "Version", " " * 12, "Arch", " " * 4, "Build", " " * 2, "Repos", " " * 10, "Size")) template(78) print("Upgrading:") views(upgrade_all, comp_sum) unit, size = units(comp_sum, uncomp_sum) print("\nInstalling summary") print("=" * 79) print("{0}Total {1} {2} will be upgraded.".format( GREY, len(upgrade_all), msgs(upgrade_all))) print("Need to get {0} {1} of archives.".format(size[0], unit[0])) print("After this process, {0} {1} of additional disk space " "will be used.{2}".format(size[1], unit[1], ENDC)) read = raw_input("\nWould you like to upgrade [Y/n]? ") if read == "Y" or read == "y": slack_dwn(self.patch_path, dwn_links) upgrade(self.patch_path, upgrade_all) kernel(upgrade_all) delete(self.patch_path, upgrade_all) else: slack_arch = "" if os.uname()[4] == "x86_64": slack_arch = 64 print("\nSlackware{0} '{1}' v{2} distribution is up to " "date\n".format(slack_arch, self.version, slack_ver())) except KeyboardInterrupt: print # new line at exit sys.exit()
def start(self): ''' Install packages from official Slackware distribution ''' try: data = slack_data(self.PACKAGES_TXT, 700) (dwn_links, install_all, comp_sum, uncomp_sum) = store(data[0], data[1], data[2], data[3], self.slack_pkg, self.version) sys.stdout.write("{0}Done{1}\n\n".format(GREY, ENDC)) if install_all: template(78) print("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}".format( "| Package", " " * 17, "Version", " " * 12, "Arch", " " * 4, "Build", " " * 2, "Repos", " " * 10, "Size")) template(78) print("Installing:") sums = views(install_all, comp_sum) unit, size = units(comp_sum, uncomp_sum) msg = msgs(install_all, sums[2]) print("\nInstalling summary") print("=" * 79) print("{0}Total {1} {2}.".format(GREY, len(install_all), msg[0])) print("{0} {1} will be installed, {2} will be upgraded and " "{3} will be resettled.".format(sums[2], msg[1], sums[1], sums[0])) print("Need to get {0} {1} of archives.".format(size[0], unit[0])) print("After this process, {0} {1} of additional disk space " "will be used.{2}".format(size[1], unit[1], ENDC)) read = raw_input("\nWould you like to install [Y/n]? ") if read == "Y" or read == "y": slack_dwn(self.tmp_path, dwn_links) install(self.tmp_path, install_all) delete(self.tmp_path, install_all) else: pkg_not_found("", self.slack_pkg, "No matching", "\n") except KeyboardInterrupt: print # new line at exit sys.exit()
def start(self): ''' Install new patches from official Slackware mirrors ''' try: data = slack_data(self.PACKAGES_TXT, self.step) (dwn_links, upgrade_all, comp_sum, uncomp_sum) = store(data[0], data[1], data[2], data[3], self.version) sys.stdout.write("{0}Done{1}\n".format(GREY, ENDC)) if upgrade_all: print("\nThese packages need upgrading:\n") template(78) print("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}".format( "| Package", " " * 17, "Version", " " * 12, "Arch", " " * 4, "Build", " " * 2, "Repos", " " * 10, "Size")) template(78) print("Upgrading:") views(upgrade_all, comp_sum) unit, size = units(comp_sum, uncomp_sum) print("\nInstalling summary") print("=" * 79) print("{0}Total {1} {2} will be upgraded.".format( GREY, len(upgrade_all), msgs(upgrade_all))) print("Need to get {0} {1} of archives.".format( size[0], unit[0])) print("After this process, {0} {1} of additional disk space " "will be used.{2}".format(size[1], unit[1], ENDC)) read = raw_input("\nWould you like to upgrade [Y/n]? ") if read == "Y" or read == "y": slack_dwn(self.patch_path, dwn_links) upgrade(self.patch_path, upgrade_all) kernel(upgrade_all) delete(self.patch_path, upgrade_all) else: slack_arch = "" if os.uname()[4] == "x86_64": slack_arch = 64 print("\nSlackware{0} '{1}' v{2} distribution is up to " "date\n".format(slack_arch, self.version, slack_ver())) except KeyboardInterrupt: print # new line at exit sys.exit()
def start(self): ''' Install packages from official Slackware distribution ''' try: data = slack_data(self.PACKAGES_TXT, 700) (dwn_links, install_all, comp_sum, uncomp_sum) = store(data[0], data[1], data[2], data[3], self.slack_pkg, self.version) sys.stdout.write("{0}Done{1}\n\n".format(GREY, ENDC)) if install_all: template(78) print("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}".format( "| Package", " " * 17, "Version", " " * 12, "Arch", " " * 4, "Build", " " * 2, "Repos", " " * 10, "Size")) template(78) print("Installing:") sums = views(install_all, comp_sum) unit, size = units(comp_sum, uncomp_sum) msg = msgs(install_all, sums[2]) print("\nInstalling summary") print("=" * 79) print("{0}Total {1} {2}.".format(GREY, len(install_all), msg[0])) print("{0} {1} will be installed, {2} will be upgraded and " "{3} will be resettled.".format(sums[2], msg[1], sums[1], sums[0])) print("Need to get {0} {1} of archives.".format( size[0], unit[0])) print("After this process, {0} {1} of additional disk space " "will be used.{2}".format(size[1], unit[1], ENDC)) read = raw_input("\nWould you like to install [Y/n]? ") if read == "Y" or read == "y": slack_dwn(self.tmp_path, dwn_links) install(self.tmp_path, install_all) delete(self.tmp_path, install_all) else: pkg_not_found("", self.slack_pkg, "No matching", "\n") except KeyboardInterrupt: print # new line at exit sys.exit()