updated for version 1.8.5

This commit is contained in:
Dimitris Zlatanidis 2014-09-12 06:09:36 +03:00
parent acecf5b3cf
commit 72dddc9fa8
12 changed files with 41 additions and 34 deletions

View file

@ -1,3 +1,11 @@
Version 1.8.5
13-09-2014
[Updated] - Fix convert kb to mb
- Fix build sources with spaces in filenames like
"Sublime Text 2.0.2 x64.tar.bz2"
Version 1.8.4
10-09-2014

View file

@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: slpkg
Version: 1.8.4
Version: 1.8.5
Author: dslackw
Author-email: d zlatanidis at gmail com
Maintainer: dslackw

View file

@ -9,9 +9,9 @@
Latest Release:
- Version: 1.8.4
- `Package <https://sourceforge.net/projects/slpkg/>`_
- `Source <https://github.com/dslackw/slpkg/archive/v1.8.4.tar.gz>`_
- Version: 1.8.5
- `Package <https://sourceforge.net/projects/slpkg/files/slpkg/binary/>`_
- `Source <https://github.com/dslackw/slpkg/archive/v1.8.5.tar.gz>`_
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_
`Slpkg <https://github.com/dslackw/slpkg>`_ is a terminal multitool in order to easy use `Slackware <http://www.slackware.com/>`_
@ -91,8 +91,8 @@ Untar the archive and run install.sh script:
.. code-block:: bash
$ tar xvf slpkg-1.8.4.tar.gz
$ cd slpkg-1.8.4
$ tar xvf slpkg-1.8.5.tar.gz
$ cd slpkg-1.8.5
$ ./install.sh
Using `pip <https://pip.pypa.io/en/latest/>`_ :
@ -202,8 +202,8 @@ download and install:
Total 3 packages.
3 packages will be installed, 0 allready installed.
Need to get 6.02 Mb of archives.
After this process, 15.72 Mb of additional disk space will be used.
Need to get 48.17 Mb of archives.
After this process, 125.75 Mb of additional disk space will be used.
Would you like to install [Y/n]?
@ -280,8 +280,8 @@ Check if your distribution is up to date from `Slackware official mirrors
Installing summary
===============================================================================
Total 3 package will be upgrading.
Need to get 1.70 Mb of archives.
After this process, 9.51 Mb of additional disk space will be used.
Need to get 13.58 Mb of archives.
After this process, 76.10 Mb of additional disk space will be used.
Would you like to upgrade [Y/n]?
@ -296,7 +296,7 @@ Find packages from slackbuilds.org:
| Package bitfighter --> http://slackbuilds.org/repository/14.1/games/bitfighter/
+===============================================================================
| SlackBuild : bitfighter.tar.gz
| Sources : bitfighter-019c.tar.gz
| Sources : bitfighter-019c.tar.gz, classic_level_pack.zip
| Requirements : OpenAL, SDL2, speex, libmodplug
+===============================================================================
README View the README file

View file

@ -21,7 +21,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=slpkg
VERSION=${VERSION:-1.8.4}
VERSION=${VERSION:-1.8.5}
TAG=${TAG:-_dsw}
cd ..

View file

@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=slpkg
VERSION=${VERSION:-1.8.4}
VERSION=${VERSION:-1.8.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_dsw}

View file

@ -1,7 +1,7 @@
PRGNAM="slpkg"
VERSION="1.8.4"
VERSION="1.8.5"
HOMEPAGE="https://github.com/dslackw/slpkg"
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.4.tar.gz"
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.5.tar.gz"
MD5SUM=""
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""

View file

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

View file

@ -38,7 +38,8 @@ from slpkg.sbo.greps import sbo_checksum_pkg
def build_package(script, sources, path):
'''
Build package from source and
create log file in path /var/log/slpkg/logs/
create log file in path /var/log/slpkg/sbo/build_logs/.
Also check md5sum calculates.
'''
prgnam = script.replace(".tar.gz", "")
log_file = ("build_{0}_log".format(prgnam))
@ -60,6 +61,8 @@ def build_package(script, sources, path):
tar.extractall()
tar.close()
for src in sources:
# fix build sources with spaces
src = src.replace("%20", " ")
sbo_md5 = sbo_checksum_pkg(prgnam)
md5 = md5sum(src)
if sbo_md5 != md5:
@ -93,7 +96,8 @@ def build_package(script, sources, path):
log.write(log_line)
log.close()
subprocess.Popen("./{0}.SlackBuild 2>&1 | tee -a {1}{2}".format(
prgnam, build_logs, log_file), shell=True, stdout=sys.stdout).communicate()
prgnam, build_logs, log_file), \
shell=True, stdout=sys.stdout).communicate()
end_log_time = time.strftime("%H:%M:%S")
start_time = start_log_time.replace(":", "")
end_time = end_log_time.replace(":", "")

View file

@ -25,7 +25,6 @@ import os
from slpkg.url_read import url_read
from slpkg.__metadata__ import arch, lib_path
from search import sbo_search_pkg
def sbo_source_dwn(name):

View file

@ -26,7 +26,6 @@ import sys
import subprocess
from slpkg.colors import colors
from slpkg.checksum import md5sum
from slpkg.functions import get_file
from slpkg.__metadata__ import tmp, pkg_path, build_path, log_path, sp
from slpkg.messages import pkg_not_found, pkg_found, template, build_FAILED
@ -37,7 +36,6 @@ from slpkg.pkg.manager import pkg_upgrade
from init import initialization
from search import sbo_search_pkg
from file_size import server_file_size
from download import sbo_slackbuild_dwn
from dependency import sbo_dependencies_pkg
from greps import sbo_source_dwn, sbo_version_pkg
@ -104,10 +102,10 @@ def sbo_build(name):
pkg_sum += 1
sys.stdout.write("Done\n")
'''
Tag with color green if package already installed
and color red if not installed. Also if package
arch is UNSUPPORTED tag with color red and if
UNTESTED with color yellow.
Tag with color green if package already installed,
color yellow for packages to upgrade and color red
if not installed. Also if package arch is UNSUPPORTED
tag with color red and if UNTESTED with color yellow.
'''
master_pkg = ("{0}-{1}".format(name, sbo_ver[-1]))
if find_package(master_pkg, pkg_path):
@ -169,11 +167,9 @@ def sbo_build(name):
before proceed to install
'''
UNST = ["UNSUPPORTED", "UNTESTED"]
for item in UNST:
for un in pkg_arch:
if item == un:
print("\n{0}The package {1}{2}\n".format(colors.RED, item, ENDC))
sys.exit()
if src in UNST:
print("\n{0}The package {1}{2}\n".format(colors.RED, src, ENDC))
sys.exit()
# exit if all packages already installed
if pkg_sum == len(dependencies):
sys.exit()

View file

@ -102,8 +102,8 @@ def install(slack_pkg):
" " * (6-len(pkgs[-5:-4])), "Slack", \
" " , comp, " " * (3-len(comp)), "K"
comp_unit, uncomp_unit = "Mb", "Mb"
compressed = round((sum(map(float, comp_sum)) * 0.0001220703125), 2)
uncompressed = round((sum(map(float, uncomp_sum)) * 0.0001220703125), 2)
compressed = round((sum(map(float, comp_sum)) / 1024), 2)
uncompressed = round((sum(map(float, uncomp_sum)) / 1024), 2)
if compressed < 1:
compressed, comp_unit = sum(map(int, comp_sum)), "Kb"
if uncompressed < 1:

View file

@ -98,8 +98,8 @@ def patches():
" " * (6-len(upg[-(5+len(slack)):-(4+len(slack))])), "Slack", \
" " , size, " " * (3-len(size)), "K"
comp_unit, uncomp_unit = "Mb", "Mb"
compressed = round((sum(map(float, comp_sum)) * 0.0001220703125), 2)
uncompressed = round((sum(map(float, uncomp_sum)) * 0.0001220703125), 2)
compressed = round((sum(map(float, comp_sum)) / 1024), 2)
uncompressed = round((sum(map(float, uncomp_sum)) / 1024), 2)
if compressed < 1:
compressed = sum(map(int, comp_sum))
comp_unit = "Kb"