updated for version 1.8.7

This commit is contained in:
Dimitris Zlatanidis 2014-09-19 23:07:40 +03:00
parent 5c288a60d2
commit 47a40644d6
10 changed files with 45 additions and 32 deletions

View file

@ -1,3 +1,8 @@
Version 1.8.7
19-09-2014
[Updated] - Fix build time
Version 1.8.6 Version 1.8.6
14-09-2014 14-09-2014

View file

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

View file

@ -7,11 +7,14 @@
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png .. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
:target: https://github.com/dslackw/slpkg :target: https://github.com/dslackw/slpkg
.. contents:: Table of Contents:
Latest Release: Latest Release:
- Version: 1.8.6 - Version: 1.8.7
- `Package <https://sourceforge.net/projects/slpkg/files/slpkg/binary/>`_ - `Package <https://sourceforge.net/projects/slpkg/files/slpkg/binary/>`_
- `Source <https://github.com/dslackw/slpkg/archive/v1.8.6.tar.gz>`_ - `Source <https://github.com/dslackw/slpkg/archive/v1.8.7.tar.gz>`_
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_ - `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/>`_ `Slpkg <https://github.com/dslackw/slpkg>`_ is a terminal multitool in order to easy use `Slackware <http://www.slackware.com/>`_
@ -57,7 +60,7 @@ And as we say Slackers, Keep it Simple Stupid!
Features Features
======== --------
- Build third party packages from source with all dependencies - Build third party packages from source with all dependencies
- Install packages through from official `Slackware <http://www.slackware.com/>`_ mirrors - Install packages through from official `Slackware <http://www.slackware.com/>`_ mirrors
@ -81,12 +84,13 @@ Features
It's a quick and easy way to manage your packages in `Slackware <http://www.slackware.com/>`_ It's a quick and easy way to manage your packages in `Slackware <http://www.slackware.com/>`_
to a command. to a command.
Video Tutorial Tutorial
============== --------
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/screenshot-1.png .. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/screenshot-1.png
:target: https://asciinema.org/a/12082 :target: https://asciinema.org/a/12082
Installation Installation
------------ ------------
@ -94,8 +98,8 @@ Untar the archive and run install.sh script:
.. code-block:: bash .. code-block:: bash
$ tar xvf slpkg-1.8.6.tar.gz $ tar xvf slpkg-1.8.7.tar.gz
$ cd slpkg-1.8.6 $ cd slpkg-1.8.7
$ ./install.sh $ ./install.sh
Using `pip <https://pip.pypa.io/en/latest/>`_ : Using `pip <https://pip.pypa.io/en/latest/>`_ :

View file

@ -21,11 +21,12 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=slpkg PRGNAM=slpkg
VERSION=${VERSION:-1.8.6} VERSION=${VERSION:-1.8.7}
TAG=${TAG:-_dsw} TAG=${TAG:-_dsw}
cd .. cd ..
# Installation script. # Installation script.
# With this script allows you to install the slpkg as a package SlackBuild.
# Select archive to copy in slackbuild directory # Select archive to copy in slackbuild directory
# support wget download. # support wget download.
if [ -f $PRGNAM-$VERSION.zip ]; then if [ -f $PRGNAM-$VERSION.zip ]; then

View file

@ -68,7 +68,7 @@ slackbuilds.org is up to date.
.SS -s , sbo, slack [sbo, slack ...] download, build and install package with all dependencies .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> \fBslpkg\fP \fB-s\fP <\fIsbo\fP> <\fIslack\fP> <\fIname of package\fP>
.PP .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 dependencies of the package. Also installs the official distribution Slackware
packages. packages.
.SS -f find packages .SS -f find packages
@ -80,7 +80,7 @@ Find installed packages with view total file size.
.PP .PP
Tracking all dependencies of that package. Tracking all dependencies of that package.
The sequence shown is that you must follow to correctly install 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> \fBslpkg\fP \fB-n\fP <\fIname of package\fP>
.PP .PP
With this method you can find the SBo script that interests you through With this method you can find the SBo script that interests you through

View file

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

View file

@ -1,7 +1,7 @@
PRGNAM="slpkg" PRGNAM="slpkg"
VERSION="1.8.6" VERSION="1.8.7"
HOMEPAGE="https://github.com/dslackw/slpkg" 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="" MD5SUM=""
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""

View file

@ -26,7 +26,7 @@ import subprocess
__all__ = "slpkg" __all__ = "slpkg"
__author__ = "dslackw" __author__ = "dslackw"
__version_info__ = (1, 8, 6) __version_info__ = (1, 8, 7)
__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 import os
import re
import sys import sys
import time import time
import shutil import shutil
@ -37,8 +38,8 @@ from slpkg.sbo.greps import sbo_checksum_pkg
def build_package(script, sources, path): def build_package(script, sources, path):
''' '''
Build package from source and Build package from source and create log
create log file in path /var/log/slpkg/sbo/build_logs/. file in path /var/log/slpkg/sbo/build_logs/.
Also check md5sum calculates. Also check md5sum calculates.
''' '''
prgnam = script.replace(".tar.gz", "") prgnam = script.replace(".tar.gz", "")
@ -53,6 +54,7 @@ def build_package(script, sources, path):
os.mkdir(build_logs) os.mkdir(build_logs)
log_date = time.strftime("%d/%m/%Y") log_date = time.strftime("%d/%m/%Y")
start_log_time = time.strftime("%H:%M:%S") start_log_time = time.strftime("%H:%M:%S")
start_time = time.time()
log_line = ("#" * 79 + "\n\n") log_line = ("#" * 79 + "\n\n")
try: try:
if os.path.isfile(build_logs + log_file): if os.path.isfile(build_logs + log_file):
@ -96,24 +98,27 @@ def build_package(script, sources, path):
log.write(log_line) log.write(log_line)
log.close() log.close()
subprocess.Popen("./{0}.SlackBuild 2>&1 | tee -a {1}{2}".format( 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() shell=True, stdout=sys.stdout).communicate()
end_log_time = time.strftime("%H:%M:%S") end_log_time = time.strftime("%H:%M:%S")
start_time = start_log_time.replace(":", "") end_time = time.time()
end_time = end_log_time.replace(":", "") diff_time = round(end_time - start_time, 2)
rmv_time = int(end_time) - int(start_time)
# calculate build time per package # calculate build time per package
if rmv_time <= 60: if diff_time <= 60:
sum_time = str(rmv_time) + " Sec" sum_time = str(diff_time) + " Sec"
elif rmv_time > 60: elif diff_time > 60:
div_time = round(float(rmv_time) / 60, 2) sum_time = round(diff_time / 60, 2)
rest_time = str(div_time).replace(".", " ").split() sum_time_list = re.findall(r"\d+", str(sum_time))
sum_time = rest_time[0] + " Min " + rest_time[1] + " Sec" 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 with open(build_logs + log_file, "a") as log: # append END tag to a log file
log.seek(2) # EOF log.seek(2) # EOF
log.write(log_line) log.write(log_line)
log.write("Time : " + end_log_time + "\n") 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(" " * 38 + "E N D\n\n")
log.write(log_line) log.write(log_line)
log.close() log.close()

View file

@ -65,10 +65,8 @@ def sbo_network(name):
''' '''
FAULT = "" FAULT = ""
UNST = ["UNSUPPORTED", "UNTESTED"] UNST = ["UNSUPPORTED", "UNTESTED"]
for item in UNST: if "".join(source_dwn) in UNST:
for un in source_dwn: FAULT = "".join(source_dwn)
if item == un:
FAULT = item
while True: while True:
try: try:
read = raw_input("_ ") read = raw_input("_ ")