mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Added patches\ directory for slack #98
This commit is contained in:
parent
8e4f0a8721
commit
eb9a02a966
7 changed files with 53 additions and 11 deletions
|
@ -2,6 +2,9 @@
|
|||
Fixed:
|
||||
- Strange dependency problem #97
|
||||
|
||||
Added:
|
||||
- patches/ directory from slack repository (slpkg -F "slack" fail #98)
|
||||
|
||||
3.2.8 - 06/08/2017
|
||||
Fixed:
|
||||
- BugFix: Package return after build
|
||||
|
|
|
@ -274,6 +274,8 @@ The most famous command is '# slpkg -s <repository> <packages>' , this command d
|
|||
installs packages with resolve all the dependencies or switch off resolve with additional option
|
||||
'--resolve-off'. Also additional option "--case-ins" help you find packages with case insensitive.
|
||||
Two new arguments will help you to rebuild '--rebuild' or reinstall '--reinstall' packages.
|
||||
The last one argument "--patches" help you to switch in the patches/ directory only for slack
|
||||
repository.
|
||||
|
||||
Tracking the dependencies of a package with command '# slpkg -t <repository> <package>'.
|
||||
Displays a package dependency tree and also tells you which ones are installed on your system events.
|
||||
|
@ -479,7 +481,7 @@ Command Line Tool Usage
|
|||
--rebuild, --reinstall, directly from remote repositories
|
||||
--resolve-off, --download-only, with all dependencies.
|
||||
--directory-prefix=[dir],
|
||||
--case-ins
|
||||
--case-ins, --patches
|
||||
|
||||
-t | --tracking, [repository] [package], Tracking package dependencies and
|
||||
--check-deps, --graph=[type], print package dependencies tree
|
||||
|
|
10
man/slpkg.8
10
man/slpkg.8
|
@ -11,7 +11,7 @@
|
|||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.TH Slpkg "20" "1" 2016" "slpkg"
|
||||
.TH Slpkg "24" "9" 2017" "slpkg"
|
||||
.SH NAME
|
||||
Slpkg is a user-friendly package manager for Slackware installations
|
||||
.SH SYNOPSIS
|
||||
|
@ -44,7 +44,7 @@ Usage: slpkg [COMMANDS|OPTIONS] {repository|package...}
|
|||
[-s [repository] [package...], --rebuild, --reinstall,
|
||||
--resolve-off, --download-only,
|
||||
--directory-prefix=[dir],
|
||||
--case-ins]
|
||||
--case-ins, --patches]
|
||||
[-t [repository] [package], --check-deps, --graph=[type],
|
||||
--case-ins]
|
||||
[-p [repository] [package], --color=[]]
|
||||
|
@ -226,7 +226,7 @@ Additional options:
|
|||
\fB--checklist\fP : Enable dialog utility and checklist option. (Require python2-pythondialog)
|
||||
|
||||
.SS -s, --sync, synchronize packages, download, build and install package with all dependencies
|
||||
\fBslpkg\fP \fB-s\fP <\fIrepository\fP> <\fInames of packages\fP>, \fB--resolve-off\fP, \fB--case-ins\fP
|
||||
\fBslpkg\fP \fB-s\fP <\fIrepository\fP> <\fInames of packages\fP>, \fB--resolve-off\fP, \fB--case-ins\fP, \fB--patches\fP
|
||||
.PP
|
||||
Installs or upgrade packages from the repositories with automatically resolving all
|
||||
dependencies of the package.
|
||||
|
@ -244,6 +244,8 @@ Additional options:
|
|||
\fB--directory-prefix=[path/to/dir/]\fP : Download packages in specific directory.
|
||||
.PP
|
||||
\fB--case-ins\fP : Search package name in repository with case insensitive.
|
||||
.PP
|
||||
\fB--patches\fP : Switch to patches\ directory, only for slack repository.
|
||||
|
||||
.SS -t, --tracking, tracking dependencies
|
||||
\fBslpkg\fP \fB-t\fP <\fIrepository\fP> <\fIname of package\fP>, \fB--check-deps\fP, \fB--graph=[type]\fP \fB--case-ins\fP
|
||||
|
@ -433,7 +435,7 @@ Dimitris Zlatanidis <d.zlatanidis@gmail.com>
|
|||
.SH HOMEPAGE
|
||||
https://github.com/dslackw/slpkg
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2014-2016 Dimitris Zlatanidis
|
||||
Copyright \(co 2014-2017 Dimitris Zlatanidis
|
||||
|
||||
.SH SEE ALSO
|
||||
installpkg(8), upgradepkg(8), removepkg(8), pkgtool(8), slackpkg(8), explodepkg(8),
|
||||
|
|
|
@ -117,7 +117,7 @@ Optional arguments:
|
|||
--rebuild, --reinstall, directly from remote repositories
|
||||
--resolve-off, --download-only, with all dependencies.
|
||||
--directory-prefix=[dir],
|
||||
--case-ins
|
||||
--case-ins, --patches
|
||||
|
||||
-t | --tracking, [repository] [package], Tracking package dependencies and
|
||||
--check-deps, --graph=[type], print package dependencies tree
|
||||
|
@ -198,7 +198,7 @@ def usage(repo):
|
|||
[-s [repository] [package...], --rebuild, --reinstall,
|
||||
--resolve-off, --download-only,
|
||||
--directory-prefix=[dir],
|
||||
--case-ins]
|
||||
--case-ins, --patches]
|
||||
[-t [repository] [package], --check-deps, --graph=[type],
|
||||
--case-ins]
|
||||
[-p [repository] [package], --color=[]]
|
||||
|
|
|
@ -47,6 +47,8 @@ from slpkg.binary.greps import repo_data
|
|||
from slpkg.binary.repo_init import RepoInit
|
||||
from slpkg.binary.dependency import Dependencies
|
||||
|
||||
from slpkg.slack.slack_version import slack_ver
|
||||
|
||||
|
||||
class BinaryInstall(object):
|
||||
"""Install binaries packages with all dependencies from
|
||||
|
@ -349,4 +351,26 @@ class BinaryInstall(object):
|
|||
install.reverse()
|
||||
comp_sum.reverse()
|
||||
uncomp_sum.reverse()
|
||||
if self.repo == "slack":
|
||||
dwn, install, comp_sum, uncomp_sum = self.patches(dwn, install,
|
||||
comp_sum,
|
||||
uncomp_sum)
|
||||
return [dwn, install, comp_sum, uncomp_sum]
|
||||
|
||||
def patches(self, dwn, install, comp_sum, uncomp_sum):
|
||||
"""Seperates packages from patches/ directory
|
||||
"""
|
||||
dwnp, installp, comp_sump, uncomp_sump = ([] for i in range(4))
|
||||
for d, i, c, u in zip(dwn, install, comp_sum, uncomp_sum):
|
||||
if "_slack" + slack_ver() in i:
|
||||
dwnp.append(d)
|
||||
dwn.remove(d)
|
||||
installp.append(i)
|
||||
install.remove(i)
|
||||
comp_sump.append(c)
|
||||
comp_sum.remove(c)
|
||||
uncomp_sump.append(u)
|
||||
uncomp_sum.remove(u)
|
||||
if "--patches" in self.flag:
|
||||
return dwnp, installp, comp_sump, uncomp_sump
|
||||
return dwn, install, comp_sum, uncomp_sum
|
||||
|
|
|
@ -109,7 +109,7 @@ class Initialization(object):
|
|||
os.mkdir(log)
|
||||
if not os.path.exists(lib):
|
||||
os.mkdir(lib)
|
||||
dirs = ["core/", "extra/", "pasture/"]
|
||||
dirs = ["core/", "extra/", "pasture/", "patches/"]
|
||||
for d in dirs:
|
||||
if not os.path.exists(lib + d):
|
||||
os.mkdir(lib + d)
|
||||
|
@ -120,6 +120,8 @@ class Initialization(object):
|
|||
self.EXT_CHECKSUMS = mirrors(md5_file, dirs[1])
|
||||
self.PASTURE = mirrors(lib_file, dirs[2])
|
||||
self.PAS_CHECKSUMS = mirrors(md5_file, dirs[2])
|
||||
self.PATCHES = mirrors(lib_file, dirs[3])
|
||||
self.PAT_CHECKSUMS = mirrors(md5_file, dirs[3])
|
||||
ChangeLog_txt = mirrors(log_file, "")
|
||||
if self.check:
|
||||
return self.checks_logs(log, ChangeLog_txt)
|
||||
|
@ -130,15 +132,19 @@ class Initialization(object):
|
|||
if slack_ver() != "14.0": # no pasture/ folder for 14.0 version
|
||||
self.down(lib + dirs[2], self.PASTURE, repo_name)
|
||||
self.down(lib + dirs[2], self.PAS_CHECKSUMS, repo_name)
|
||||
self.down(lib + dirs[3], self.PATCHES, repo_name)
|
||||
self.down(lib + dirs[3], self.PAT_CHECKSUMS, repo_name)
|
||||
self.down(log, ChangeLog_txt, repo_name)
|
||||
self.remote(log, ChangeLog_txt, lib, PACKAGES_TXT, CHECKSUMS_MD5,
|
||||
FILELIST_TXT, repo_name)
|
||||
self.merge(lib, "PACKAGES.TXT", ["core/PACKAGES.TXT",
|
||||
"extra/PACKAGES.TXT",
|
||||
"pasture/PACKAGES.TXT"])
|
||||
"pasture/PACKAGES.TXT",
|
||||
"patches/PACKAGES.TXT"])
|
||||
self.merge(lib, "CHECKSUMS.md5", ["core/CHECKSUMS.md5",
|
||||
"extra/CHECKSUMS.md5",
|
||||
"pasture/CHECKSUMS.md5"])
|
||||
"pasture/CHECKSUMS.md5",
|
||||
"patches/CHECKSUMS_md5"])
|
||||
|
||||
def sbo(self):
|
||||
"""Creating sbo local library
|
||||
|
|
|
@ -352,7 +352,8 @@ class ArgParse(object):
|
|||
"--directory-prefix=",
|
||||
"--case-ins",
|
||||
"--rebuild",
|
||||
"--reinstall"
|
||||
"--reinstall",
|
||||
"--patches"
|
||||
]
|
||||
for arg in self.args:
|
||||
if arg.startswith(additional_options[2]):
|
||||
|
@ -360,6 +361,10 @@ class ArgParse(object):
|
|||
arg = ""
|
||||
if arg in additional_options:
|
||||
flag.append(arg)
|
||||
# clean from flags
|
||||
for ar in flag:
|
||||
if ar in self.args:
|
||||
self.args.remove(ar)
|
||||
if len(self.args) >= 3 and self.args[0] in options:
|
||||
if (self.args[1] in self.meta.repositories and
|
||||
self.args[1] not in ["sbo"]):
|
||||
|
|
Loading…
Reference in a new issue