Merge branch 'develop'

This commit is contained in:
Dimitris Zlatanidis 2020-03-06 17:44:12 +01:00
commit 3c5c79fdc7
5 changed files with 20 additions and 6 deletions

View file

@ -1,3 +1,7 @@
3.8.5 - 5/03/2020
Added:
- set export variable $TAG #126
3.8.4 - 25/02/2020 3.8.4 - 25/02/2020
BugFix: BugFix:
- Grab MD5SUM from wrong info file return None - Grab MD5SUM from wrong info file return None

View file

@ -1,4 +1,4 @@
# slpkg 3.8.4 # slpkg 3.8.5
Slpkg is a powerful software package manager that installs, updates, and removes packages on Slpkg is a powerful software package manager that installs, updates, and removes packages on
[Slackware](http://www.slackware.com/) based systems. It automatically computes dependencies and [Slackware](http://www.slackware.com/) based systems. It automatically computes dependencies and

View file

@ -76,7 +76,7 @@ class MetaData:
__all__ = "slpkg" __all__ = "slpkg"
__author__ = "dslackw" __author__ = "dslackw"
__version_info__ = (3, 8, 4) __version_info__ = (3, 8, 5)
__version__ = "{0}.{1}.{2}".format(*__version_info__) __version__ = "{0}.{1}.{2}".format(*__version_info__)
__license__ = "GNU General Public License v3 (GPLv3)" __license__ = "GNU General Public License v3 (GPLv3)"
__email__ = "d.zlatanidis@gmail.com" __email__ = "d.zlatanidis@gmail.com"

View file

@ -22,6 +22,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
from pkg_resources import parse_version from pkg_resources import parse_version
from slpkg.messages import Msg from slpkg.messages import Msg
@ -34,16 +35,25 @@ def slack_package(prgnam):
"""Return maximum binary Slackware package from output directory """Return maximum binary Slackware package from output directory
""" """
msg = Msg() msg = Msg()
binaries, cache, binary = [], "0", "" TAG, binaries, cache, binary = "_SBo", [], "0", ""
for exp in os.environ.keys():
if exp == "TAG":
TAG = os.environ["TAG"]
break
for pkg in find_package(prgnam, _meta_.output): for pkg in find_package(prgnam, _meta_.output):
if pkg.startswith(prgnam) and pkg[:-4].endswith("_SBo"): if pkg.startswith(prgnam) and pkg[:-4].endswith(TAG):
binaries.append(pkg) binaries.append(pkg)
for bins in binaries: for bins in binaries:
binary = bins binary = bins
if parse_version(bins) > parse_version(cache): if parse_version(bins) > parse_version(cache):
binary = bins binary = bins
cache = binary cache = binary
if not binary: if not binary:
msg.build_FAILED(prgnam) msg.pkg_not_found(prgnam)
raise SystemExit(1) raise SystemExit(1)
return ["".join(_meta_.output + binary)] return ["".join(_meta_.output + binary)]

View file

@ -269,7 +269,7 @@ class SBoInstall(BlackList, Utils):
args[3] arch args[3] arch
""" """
ver = GetFromInstalled(args[1]).version() ver = GetFromInstalled(args[1]).version()
print(f" {args[0]}{args[1] + ver} {self.endc}" print(f" {args[0]}{args[1] + ver} {self.endc}"
f"{' ' * (24-len(args[1] + ver))}{args[2]}" f"{' ' * (24-len(args[1] + ver))}{args[2]}"
f"{' ' * (18-len(args[2]))} {args[3]}" f"{' ' * (18-len(args[2]))} {args[3]}"
f"{' ' * (15-len(args[3]))}{''}" f"{' ' * (15-len(args[3]))}{''}"