diff --git a/README.rst b/README.rst index 50fd68c4..c6de1efb 100644 --- a/README.rst +++ b/README.rst @@ -442,8 +442,8 @@ Command Line Tool Usage --skip=[...], --resolve--off repositories and install with all --checklist dependencies. -s, --sync, [repository] [package...], Sync packages. Install packages - --resolve-off, --case-ins directly from remote repositories - with all dependencies. + --resolve-off, --download-only, directly from remote repositories + --case-ins with all dependencies. -t, --tracking, [repository] [package], Tracking package dependencies and --check-deps, --graph=[type], print package dependencies tree with --case-ins highlight if packages is installed. diff --git a/man/slpkg.8 b/man/slpkg.8 index 90dded9c..af19767d 100644 --- a/man/slpkg.8 +++ b/man/slpkg.8 @@ -38,7 +38,8 @@ Usage: slpkg Commands: [-l [repository], --index, --installed] [-c [repository], --upgrade, --skip=[...], --resolve-off, --checklist] - [-s [repository] [package...], --resolve-off, --case-ins] + [-s [repository] [package...], --resolve-off, --download-only, + --case-ins] [-t [repository] [package], --check-deps, --graph=[type], --case-ins] [-p [repository] [package], --color=[]] @@ -219,6 +220,8 @@ Additional options: .PP \fB--resolve-off\fP : Switch off automatic resolve dependencies. .PP +\fB--download-only\fP : Download packages without install. +.PP \fB--case-ins\fP : Search package name in repository with case insensitive. .SS -t, --tracking, tracking dependencies diff --git a/slpkg/arguments.py b/slpkg/arguments.py index ec4a7204..97006ade 100644 --- a/slpkg/arguments.py +++ b/slpkg/arguments.py @@ -92,8 +92,8 @@ Optional arguments: --skip=[...], --resolve--off repositories and install with all --checklist dependencies. -s, --sync, [repository] [package...], Sync packages. Install packages - --resolve-off, --case-ins directly from remote repositories - with all dependencies. + --resolve-off, --download-only, directly from remote repositories + --case-ins with all dependencies. -t, --tracking, [repository] [package], Tracking package dependencies and --check-deps, --graph=[type], print package dependencies tree with --case-ins highlight if packages is installed. @@ -159,7 +159,8 @@ def usage(repo): [-l [repository], --index, --installed] [-c [repository], --upgrade, --skip=[...], --resolve-off, --checklist] - [-s [repository] [package...], --resolve-off, --case-ins] + [-s [repository] [package...], --resolve-off, --download-only, + --case-ins] [-t [repository] [package], --check-deps, --graph=[type], --case-ins] [-p [repository] [package], --color=[]] diff --git a/slpkg/binary/install.py b/slpkg/binary/install.py index 562e1838..c132a745 100644 --- a/slpkg/binary/install.py +++ b/slpkg/binary/install.py @@ -123,6 +123,8 @@ class BinaryInstall(object): self.install.reverse() Download(self.tmp_path, self.dep_dwn + self.dwn, self.repo).start() + if "--download-only" in self.flag: + raise SystemExit() self.dep_install = Utils().check_downloaded( self.tmp_path, self.dep_install) self.install = Utils().check_downloaded( diff --git a/slpkg/main.py b/slpkg/main.py index 0230ae4a..275f0b8f 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -326,6 +326,7 @@ class ArgParse(object): ] additional_options = [ "--resolve-off", + "--download-only", "--case-ins" ] for arg in self.args: diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index dfc07052..49e81c06 100644 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -169,9 +169,12 @@ class SBoInstall(object): def continue_to_install(self): """Continue to install ? """ - if self.count_uni > 0 or self.count_upg > 0: + if (self.count_uni > 0 or self.count_upg > 0 or + "--download-only" in self.flag): if self.master_packages and self.msg.answer() in ["y", "Y"]: installs, upgraded = self.build_install() + if "--download-only" in self.flag: + raise SystemExit() self.msg.reference(installs, upgraded) write_deps(self.deps_dict) delete(self.build_folder) @@ -301,7 +304,7 @@ class SBoInstall(object): pkg = "-".join(prgnam.split("-")[:-1]) installed = "".join(find_package(prgnam, self.meta.pkg_path)) src_link = SBoGrep(pkg).source().split() - if installed: + if installed and "--download-only" not in self.flag: self.msg.template(78) self.msg.pkg_found(prgnam) self.msg.template(78) @@ -317,6 +320,8 @@ class SBoInstall(object): script = sbo_link.split("/")[-1] dwn_srcs = sbo_link.split() + src_link Download(self.build_folder, dwn_srcs, repo="sbo").start() + if "--download-only" in self.flag: + continue sources = self.filenames(src_link) BuildPackage(script, sources, self.build_folder, auto=False).build()