mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-26 09:58:31 +01:00
Added download packages without install
This commit is contained in:
parent
0f0a123ba2
commit
54ed0fe76a
6 changed files with 20 additions and 8 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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=[]]
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -326,6 +326,7 @@ class ArgParse(object):
|
|||
]
|
||||
additional_options = [
|
||||
"--resolve-off",
|
||||
"--download-only",
|
||||
"--case-ins"
|
||||
]
|
||||
for arg in self.args:
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue