diff --git a/CHANGELOG b/CHANGELOG
index 578e030e..3b89e8cb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,8 @@
+Version 1.8.7
+19-09-2014
+
+[Updated] - Fix build time
+
Version 1.8.6
14-09-2014
diff --git a/PKG-INFO b/PKG-INFO
index aad61470..e93e4f53 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: slpkg
-Version: 1.8.6
+Version: 1.8.7
Author: dslackw
Author-email: d zlatanidis at gmail com
Maintainer: dslackw
diff --git a/README.rst b/README.rst
index cc738222..0800dd74 100644
--- a/README.rst
+++ b/README.rst
@@ -7,11 +7,14 @@
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
:target: https://github.com/dslackw/slpkg
+.. contents:: Table of Contents:
+
+
Latest Release:
-- Version: 1.8.6
+- Version: 1.8.7
- `Package `_
-- `Source `_
+- `Source `_
- `CHANGELOG `_
`Slpkg `_ is a terminal multitool in order to easy use `Slackware `_
@@ -57,7 +60,7 @@ And as we say Slackers, Keep it Simple Stupid!
Features
-========
+--------
- Build third party packages from source with all dependencies
- Install packages through from official `Slackware `_ mirrors
@@ -81,12 +84,13 @@ Features
It's a quick and easy way to manage your packages in `Slackware `_
to a command.
-Video Tutorial
-==============
+Tutorial
+--------
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/screenshot-1.png
:target: https://asciinema.org/a/12082
+
Installation
------------
@@ -94,8 +98,8 @@ Untar the archive and run install.sh script:
.. code-block:: bash
- $ tar xvf slpkg-1.8.6.tar.gz
- $ cd slpkg-1.8.6
+ $ tar xvf slpkg-1.8.7.tar.gz
+ $ cd slpkg-1.8.7
$ ./install.sh
Using `pip `_ :
diff --git a/install.sh b/install.sh
index 5e3a5a15..a975faf7 100755
--- a/install.sh
+++ b/install.sh
@@ -21,11 +21,12 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=slpkg
-VERSION=${VERSION:-1.8.6}
+VERSION=${VERSION:-1.8.7}
TAG=${TAG:-_dsw}
cd ..
# Installation script.
+# With this script allows you to install the slpkg as a package SlackBuild.
# Select archive to copy in slackbuild directory
# support wget download.
if [ -f $PRGNAM-$VERSION.zip ]; then
diff --git a/man/slpkg.8 b/man/slpkg.8
index 3bb2fbd0..aca962a1 100644
--- a/man/slpkg.8
+++ b/man/slpkg.8
@@ -68,7 +68,7 @@ slackbuilds.org is up to date.
.SS -s , sbo, slack [sbo, slack ...] download, build and install package with all dependencies
\fBslpkg\fP \fB-s\fP <\fIsbo\fP> <\fIslack\fP> <\fIname of package\fP>
.PP
-Installs packages from the repository slackbuilds.org automatically resolving all
+Installs or upgrade packages from the repository slackbuilds.org automatically resolving all
dependencies of the package. Also installs the official distribution Slackware
packages.
.SS -f find packages
@@ -80,7 +80,7 @@ Find installed packages with view total file size.
.PP
Tracking all dependencies of that package.
The sequence shown is that you must follow to correctly install package.
-.SS -n , find from SBo repositority
+.SS -n , find packages from SBo repositority
\fBslpkg\fP \fB-n\fP <\fIname of package\fP>
.PP
With this method you can find the SBo script that interests you through
diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild
index b95019f8..5c9d2387 100755
--- a/slackbuild/slpkg.SlackBuild
+++ b/slackbuild/slpkg.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=slpkg
-VERSION=${VERSION:-1.8.6}
+VERSION=${VERSION:-1.8.7}
BUILD=${BUILD:-1}
TAG=${TAG:-_dsw}
diff --git a/slackbuild/slpkg.info b/slackbuild/slpkg.info
index 415e7c53..f3c8fcc7 100644
--- a/slackbuild/slpkg.info
+++ b/slackbuild/slpkg.info
@@ -1,7 +1,7 @@
PRGNAM="slpkg"
-VERSION="1.8.6"
+VERSION="1.8.7"
HOMEPAGE="https://github.com/dslackw/slpkg"
-DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.6.tar.gz"
+DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.7.tar.gz"
MD5SUM=""
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py
index 854ef61d..65de9711 100644
--- a/slpkg/__metadata__.py
+++ b/slpkg/__metadata__.py
@@ -26,7 +26,7 @@ import subprocess
__all__ = "slpkg"
__author__ = "dslackw"
-__version_info__ = (1, 8, 6)
+__version_info__ = (1, 8, 7)
__version__ = "{0}.{1}.{2}".format(*__version_info__)
__license__ = "GNU General Public License v3 (GPLv3)"
__email__ = "d.zlatanidis@gmail.com"
diff --git a/slpkg/pkg/build.py b/slpkg/pkg/build.py
index 0ddf7f1c..f76e35e0 100755
--- a/slpkg/pkg/build.py
+++ b/slpkg/pkg/build.py
@@ -22,6 +22,7 @@
# along with this program. If not, see .
import os
+import re
import sys
import time
import shutil
@@ -37,8 +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/sbo/build_logs/.
+ Build package from source and create log
+ file in path /var/log/slpkg/sbo/build_logs/.
Also check md5sum calculates.
'''
prgnam = script.replace(".tar.gz", "")
@@ -53,6 +54,7 @@ def build_package(script, sources, path):
os.mkdir(build_logs)
log_date = time.strftime("%d/%m/%Y")
start_log_time = time.strftime("%H:%M:%S")
+ start_time = time.time()
log_line = ("#" * 79 + "\n\n")
try:
if os.path.isfile(build_logs + log_file):
@@ -96,24 +98,27 @@ 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), \
+ 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(":", "")
- rmv_time = int(end_time) - int(start_time)
+ end_time = time.time()
+ diff_time = round(end_time - start_time, 2)
# calculate build time per package
- if rmv_time <= 60:
- sum_time = str(rmv_time) + " Sec"
- elif rmv_time > 60:
- div_time = round(float(rmv_time) / 60, 2)
- rest_time = str(div_time).replace(".", " ").split()
- sum_time = rest_time[0] + " Min " + rest_time[1] + " Sec"
+ if diff_time <= 60:
+ sum_time = str(diff_time) + " Sec"
+ elif diff_time > 60:
+ sum_time = round(diff_time / 60, 2)
+ sum_time_list = re.findall(r"\d+", str(sum_time))
+ sum_time = ("{0} Min {1} Sec".format(sum_time_list[0], sum_time_list[1]))
+ elif diff_time > 3600:
+ sum_time = round(diff_time / 3600, 2)
+ sum_time_list = re.findall(r"\d+", str(sum_time))
+ sum_time = ("{0} Hours {1} Min".format(sum_time_list[0], sum_time_list[1]))
with open(build_logs + log_file, "a") as log: # append END tag to a log file
log.seek(2) # EOF
log.write(log_line)
log.write("Time : " + end_log_time + "\n")
- log.write("Total build time : " + sum_time + "\n")
+ log.write("Total build time : {0}\n".format(sum_time))
log.write(" " * 38 + "E N D\n\n")
log.write(log_line)
log.close()
diff --git a/slpkg/sbo/views.py b/slpkg/sbo/views.py
index c3c51013..de63bfd8 100755
--- a/slpkg/sbo/views.py
+++ b/slpkg/sbo/views.py
@@ -65,10 +65,8 @@ def sbo_network(name):
'''
FAULT = ""
UNST = ["UNSUPPORTED", "UNTESTED"]
- for item in UNST:
- for un in source_dwn:
- if item == un:
- FAULT = item
+ if "".join(source_dwn) in UNST:
+ FAULT = "".join(source_dwn)
while True:
try:
read = raw_input("_ ")