mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
feature added view version
This commit is contained in:
parent
104730de97
commit
95f475acb2
1 changed files with 15 additions and 10 deletions
|
@ -66,7 +66,6 @@ class SBoInstall(object):
|
||||||
def start(self, if_upgrade):
|
def start(self, if_upgrade):
|
||||||
try:
|
try:
|
||||||
self.if_upgrade = if_upgrade
|
self.if_upgrade = if_upgrade
|
||||||
self.view_version()
|
|
||||||
if self.if_upgrade:
|
if self.if_upgrade:
|
||||||
self.slackbuilds, self.pkg_ver = (self.slackbuilds[0],
|
self.slackbuilds, self.pkg_ver = (self.slackbuilds[0],
|
||||||
self.slackbuilds[1])
|
self.slackbuilds[1])
|
||||||
|
@ -101,13 +100,13 @@ class SBoInstall(object):
|
||||||
self.top_view()
|
self.top_view()
|
||||||
Msg().upg_inst(self.if_upgrade)
|
Msg().upg_inst(self.if_upgrade)
|
||||||
# view master packages
|
# view master packages
|
||||||
for sbo, ver, ar in zip(self.master_packages, self.pkg_ver,
|
for sbo, ar in zip(self.master_packages, mas_src):
|
||||||
mas_src):
|
|
||||||
tagc, count_ins, count_upg, count_uni = self.tag(
|
tagc, count_ins, count_upg, count_uni = self.tag(
|
||||||
sbo, count_ins, count_upg, count_uni)
|
sbo, count_ins, count_upg, count_uni)
|
||||||
|
ver = self.package_ver(sbo)
|
||||||
name = '-'.join(sbo.split('-')[:-1]) + '-' + ver
|
name = '-'.join(sbo.split('-')[:-1]) + '-' + ver
|
||||||
if not if_upgrade:
|
if not ver:
|
||||||
name = '-'.join(sbo.split('-')[:-1])
|
name = name[:-1]
|
||||||
self.view_packages(tagc, name, sbo.split('-')[-1],
|
self.view_packages(tagc, name, sbo.split('-')[-1],
|
||||||
self.select_arch(ar))
|
self.select_arch(ar))
|
||||||
self._view_installing_for_deps()
|
self._view_installing_for_deps()
|
||||||
|
@ -115,7 +114,10 @@ class SBoInstall(object):
|
||||||
for dep, ar in zip(self.dependencies, dep_src):
|
for dep, ar in zip(self.dependencies, dep_src):
|
||||||
tagc, count_ins, count_upg, count_uni = self.tag(
|
tagc, count_ins, count_upg, count_uni = self.tag(
|
||||||
dep, count_ins, count_upg, count_uni)
|
dep, count_ins, count_upg, count_uni)
|
||||||
name = '-'.join(dep.split('-')[:-1])
|
ver = self.package_ver(dep)
|
||||||
|
name = '-'.join(dep.split('-')[:-1]) + '-' + ver
|
||||||
|
if not ver:
|
||||||
|
name = name[:-1]
|
||||||
self.view_packages(tagc, name, dep.split('-')[-1],
|
self.view_packages(tagc, name, dep.split('-')[-1],
|
||||||
self.select_arch(ar))
|
self.select_arch(ar))
|
||||||
count_total = (count_ins + count_upg + count_uni)
|
count_total = (count_ins + count_upg + count_uni)
|
||||||
|
@ -226,12 +228,14 @@ class SBoInstall(object):
|
||||||
"Size"))
|
"Size"))
|
||||||
Msg().template(78)
|
Msg().template(78)
|
||||||
|
|
||||||
def view_version(self):
|
def package_ver(self, sbo):
|
||||||
'''
|
'''
|
||||||
Create empty seats if not upgrade
|
Return package version if package exist
|
||||||
'''
|
'''
|
||||||
if not self.if_upgrade:
|
pkg = "".join(find_package(sbo.split("-")[0] + "-", _m.pkg_path))
|
||||||
self.pkg_ver = [''] * len(self.slackbuilds)
|
if pkg:
|
||||||
|
return split_package(pkg)[1]
|
||||||
|
return ""
|
||||||
|
|
||||||
def view_packages(self, *args):
|
def view_packages(self, *args):
|
||||||
'''
|
'''
|
||||||
|
@ -263,6 +267,7 @@ class SBoInstall(object):
|
||||||
else:
|
else:
|
||||||
paint = _m.color['RED']
|
paint = _m.color['RED']
|
||||||
count_uni += 1
|
count_uni += 1
|
||||||
|
|
||||||
return paint, count_ins, count_upg, count_uni
|
return paint, count_ins, count_upg, count_uni
|
||||||
|
|
||||||
def select_arch(self, src):
|
def select_arch(self, src):
|
||||||
|
|
Loading…
Add table
Reference in a new issue