mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-06 08:46:21 +01:00
updated for version 2.0.3
This commit is contained in:
parent
038c11eb7c
commit
a27f3f3002
13 changed files with 64 additions and 53 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Version 2.0.3
|
||||||
|
29-10-2014
|
||||||
|
|
||||||
|
[Updated] - Fix arguments.
|
||||||
|
- Fix dpenedencies log.
|
||||||
|
- Fix pydoc pager.
|
||||||
|
- Fix list packaging paging.
|
||||||
|
|
||||||
Version 2.0.2
|
Version 2.0.2
|
||||||
21-10-2014
|
21-10-2014
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
|
|
||||||
Latest Release:
|
Latest Release:
|
||||||
|
|
||||||
- Version: 2.0.2
|
- Version: 2.0.3
|
||||||
- `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/v2.0.2.tar.gz>`_
|
- `Source <https://github.com/dslackw/slpkg/archive/v2.0.3.tar.gz>`_
|
||||||
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_
|
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_
|
||||||
|
|
||||||
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
|
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
|
||||||
|
@ -100,8 +100,8 @@ Untar the archive and run install.sh script:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ tar xvf slpkg-2.0.2.tar.gz
|
$ tar xvf slpkg-2.0.3.tar.gz
|
||||||
$ cd slpkg-2.0.2
|
$ cd slpkg-2.0.3
|
||||||
$ ./install.sh
|
$ ./install.sh
|
||||||
|
|
||||||
Using `pip <https://pip.pypa.io/en/latest/>`_ :
|
Using `pip <https://pip.pypa.io/en/latest/>`_ :
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PRGNAM=slpkg
|
PRGNAM=slpkg
|
||||||
VERSION=${VERSION:-2.0.2}
|
VERSION=${VERSION:-2.0.3}
|
||||||
TAG=${TAG:-_dsw}
|
TAG=${TAG:-_dsw}
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PRGNAM=slpkg
|
PRGNAM=slpkg
|
||||||
VERSION=${VERSION:-2.0.2}
|
VERSION=${VERSION:-2.0.3}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_dsw}
|
TAG=${TAG:-_dsw}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
PRGNAM="slpkg"
|
PRGNAM="slpkg"
|
||||||
VERSION="2.0.1"
|
VERSION="2.0.3"
|
||||||
HOMEPAGE="https://github.com/dslackw/slpkg"
|
HOMEPAGE="https://github.com/dslackw/slpkg"
|
||||||
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v2.0.2.tar.gz"
|
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v2.0.3.tar.gz"
|
||||||
MD5SUM=""
|
MD5SUM=""
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
|
|
|
@ -22,11 +22,10 @@
|
||||||
# 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 subprocess
|
|
||||||
|
|
||||||
__all__ = "slpkg"
|
__all__ = "slpkg"
|
||||||
__author__ = "dslackw"
|
__author__ = "dslackw"
|
||||||
__version_info__ = (2, 0, 2)
|
__version_info__ = (2, 0, 3)
|
||||||
__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"
|
||||||
|
@ -35,7 +34,7 @@ __email__ = "d.zlatanidis@gmail.com"
|
||||||
sp = "-"
|
sp = "-"
|
||||||
|
|
||||||
''' current path '''
|
''' current path '''
|
||||||
path = subprocess.check_output(["pwd"], shell=True).replace("\n", "/")
|
path = os.getcwd() + "/"
|
||||||
|
|
||||||
''' build path '''
|
''' build path '''
|
||||||
build_path = path + "slpkg_Build/"
|
build_path = path + "slpkg_Build/"
|
||||||
|
|
|
@ -26,9 +26,9 @@ import getpass
|
||||||
|
|
||||||
from queue import QueuePkgs
|
from queue import QueuePkgs
|
||||||
from messages import s_user
|
from messages import s_user
|
||||||
|
from __metadata__ import path
|
||||||
from blacklist import BlackList
|
from blacklist import BlackList
|
||||||
from version import prog_version
|
from version import prog_version
|
||||||
from __metadata__ import path
|
|
||||||
from arguments import options, usage
|
from arguments import options, usage
|
||||||
|
|
||||||
from pkg.build import BuildPackage
|
from pkg.build import BuildPackage
|
||||||
|
|
|
@ -22,7 +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 sys
|
import sys
|
||||||
from colors import RED, GREEN, CYAN, YELLOW, ENDC
|
from colors import RED, CYAN, ENDC
|
||||||
|
|
||||||
|
|
||||||
def pkg_not_found(bol, pkg, message, eol):
|
def pkg_not_found(bol, pkg, message, eol):
|
||||||
|
@ -74,28 +74,3 @@ def template(max_len):
|
||||||
Print template
|
Print template
|
||||||
'''
|
'''
|
||||||
print("+" + "=" * max_len)
|
print("+" + "=" * max_len)
|
||||||
|
|
||||||
|
|
||||||
def view_sbo(*args):
|
|
||||||
'''
|
|
||||||
View slackbuild.org
|
|
||||||
'''
|
|
||||||
print # new line at start
|
|
||||||
template(78)
|
|
||||||
print("| {0}Package {1}{2}{3} --> {4}".format(GREEN, CYAN, args[0], GREEN,
|
|
||||||
ENDC + args[1]))
|
|
||||||
template(78)
|
|
||||||
print("| {0}Description : {1}{2}".format(GREEN, ENDC, args[2]))
|
|
||||||
print("| {0}SlackBuild : {1}{2}".format(GREEN, ENDC, args[3]))
|
|
||||||
print("| {0}Sources : {1}{2}".format(GREEN, ENDC, args[4]))
|
|
||||||
print("| {0}Requirements : {1}{2}".format(YELLOW, ENDC, ", ".join(args[5])))
|
|
||||||
template(78)
|
|
||||||
print(" {0}R{1}EADME View the README file".format(RED, ENDC))
|
|
||||||
print(" {0}S{1}lackBuild View the SlackBuild file".format(
|
|
||||||
RED, ENDC))
|
|
||||||
print(" In{0}f{1}o View the Info file".format(RED, ENDC))
|
|
||||||
print(" {0}D{1}ownload Download this package".format(RED, ENDC))
|
|
||||||
print(" {0}B{1}uild Download and build".format(RED, ENDC))
|
|
||||||
print(" {0}I{1}nstall Download/Build/Install".format(
|
|
||||||
RED, ENDC))
|
|
||||||
print(" {0}Q{1}uit Quit\n".format(RED, ENDC))
|
|
||||||
|
|
|
@ -266,7 +266,8 @@ class PackageManager(object):
|
||||||
'''
|
'''
|
||||||
List with the installed packages
|
List with the installed packages
|
||||||
'''
|
'''
|
||||||
space = (" " * 9)
|
tty_size = os.popen('stty size', 'r').read().split()
|
||||||
|
row = int(tty_size[0]) - 2
|
||||||
try:
|
try:
|
||||||
if "sbo" in pattern:
|
if "sbo" in pattern:
|
||||||
search = "_SBo"
|
search = "_SBo"
|
||||||
|
@ -276,15 +277,16 @@ class PackageManager(object):
|
||||||
search = "-noarch-"
|
search = "-noarch-"
|
||||||
elif "all" in pattern:
|
elif "all" in pattern:
|
||||||
search = ""
|
search = ""
|
||||||
index, page = 0, 50
|
index, page = 0, row
|
||||||
for pkg in find_package("", pkg_path):
|
for pkg in find_package("", pkg_path):
|
||||||
if search in pkg:
|
if search in pkg:
|
||||||
index += 1
|
index += 1
|
||||||
print("{0}{1}:{2} {3}".format(GREY, index, ENDC, pkg))
|
print("{0}{1}:{2} {3}".format(GREY, index, ENDC, pkg))
|
||||||
if index == page:
|
if index == page:
|
||||||
raw_input("{0}-- {1}More{2} --".format(space, CYAN,
|
raw_input("\nPress {0}Enter{1} to continue...".format(
|
||||||
ENDC))
|
CYAN, ENDC))
|
||||||
page += 50
|
print # new line after page
|
||||||
|
page += row
|
||||||
print # new line at end
|
print # new line at end
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print # new line at exit
|
print # new line at exit
|
||||||
|
|
|
@ -27,10 +27,10 @@ import pydoc
|
||||||
|
|
||||||
from init import initialization
|
from init import initialization
|
||||||
from downloader import Download
|
from downloader import Download
|
||||||
from colors import RED, GREEN, GREY, ENDC
|
|
||||||
from __metadata__ import tmp, build_path, pkg_path, sp
|
from __metadata__ import tmp, build_path, pkg_path, sp
|
||||||
from messages import (pkg_found, view_sbo, pkg_not_found,
|
from colors import RED, GREEN, GREY, CYAN, YELLOW, ENDC
|
||||||
template, build_FAILED)
|
from messages import (pkg_found, pkg_not_found, template,
|
||||||
|
build_FAILED)
|
||||||
|
|
||||||
from pkg.find import find_package
|
from pkg.find import find_package
|
||||||
from pkg.build import BuildPackage
|
from pkg.build import BuildPackage
|
||||||
|
@ -108,6 +108,31 @@ class SBoNetwork(object):
|
||||||
pkg_not_found("\n", self.name, "Can't view", "\n")
|
pkg_not_found("\n", self.name, "Can't view", "\n")
|
||||||
|
|
||||||
|
|
||||||
|
def view_sbo(*args):
|
||||||
|
'''
|
||||||
|
View slackbuild.org
|
||||||
|
'''
|
||||||
|
print # new line at start
|
||||||
|
template(78)
|
||||||
|
print("| {0}Package {1}{2}{3} --> {4}".format(GREEN, CYAN, args[0], GREEN,
|
||||||
|
ENDC + args[1]))
|
||||||
|
template(78)
|
||||||
|
print("| {0}Description : {1}{2}".format(GREEN, ENDC, args[2]))
|
||||||
|
print("| {0}SlackBuild : {1}{2}".format(GREEN, ENDC, args[3]))
|
||||||
|
print("| {0}Sources : {1}{2}".format(GREEN, ENDC, args[4]))
|
||||||
|
print("| {0}Requirements : {1}{2}".format(YELLOW, ENDC, ", ".join(args[5])))
|
||||||
|
template(78)
|
||||||
|
print(" {0}R{1}EADME View the README file".format(RED, ENDC))
|
||||||
|
print(" {0}S{1}lackBuild View the SlackBuild file".format(
|
||||||
|
RED, ENDC))
|
||||||
|
print(" In{0}f{1}o View the Info file".format(RED, ENDC))
|
||||||
|
print(" {0}D{1}ownload Download this package".format(RED, ENDC))
|
||||||
|
print(" {0}B{1}uild Download and build".format(RED, ENDC))
|
||||||
|
print(" {0}I{1}nstall Download/Build/Install".format(
|
||||||
|
RED, ENDC))
|
||||||
|
print(" {0}Q{1}uit Quit\n".format(RED, ENDC))
|
||||||
|
|
||||||
|
|
||||||
def fill_pager(page):
|
def fill_pager(page):
|
||||||
'''
|
'''
|
||||||
Fix pager spaces
|
Fix pager spaces
|
||||||
|
|
|
@ -55,9 +55,10 @@ class Slack(object):
|
||||||
os.mkdir(slpkg_tmp)
|
os.mkdir(slpkg_tmp)
|
||||||
if not os.path.exists(self.tmp_path):
|
if not os.path.exists(self.tmp_path):
|
||||||
os.mkdir(self.tmp_path)
|
os.mkdir(self.tmp_path)
|
||||||
PACKAGES = URL.read(mirrors("PACKAGES.TXT", "", self.version))
|
PACKAGES = URL(mirrors("PACKAGES.TXT", "", self.version)).reading()
|
||||||
EXTRA = URL.read(mirrors("PACKAGES.TXT", "extra/", self.version))
|
EXTRA = URL(mirrors("PACKAGES.TXT", "extra/", self.version)).reading()
|
||||||
PASTURE = URL.read(mirrors("PACKAGES.TXT", "pasture/", self.version))
|
PASTURE = URL(mirrors("PACKAGES.TXT", "pasture/",
|
||||||
|
self.version)).reading()
|
||||||
self.PACKAGES_TXT = PACKAGES + EXTRA + PASTURE
|
self.PACKAGES_TXT = PACKAGES + EXTRA + PASTURE
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
|
|
@ -54,11 +54,12 @@ class Patches(object):
|
||||||
if not os.path.exists(self.patch_path):
|
if not os.path.exists(self.patch_path):
|
||||||
os.mkdir(self.patch_path)
|
os.mkdir(self.patch_path)
|
||||||
if version == "stable":
|
if version == "stable":
|
||||||
self.PACKAGES_TXT = URL.read(mirrors("PACKAGES.TXT", "patches/",
|
self.PACKAGES_TXT = URL(mirrors("PACKAGES.TXT", "patches/",
|
||||||
version))
|
version)).reading()
|
||||||
self.step = 100
|
self.step = 100
|
||||||
else:
|
else:
|
||||||
self.PACKAGES_TXT = URL.read(mirrors("PACKAGES.TXT", "", version))
|
self.PACKAGES_TXT = URL(mirrors("PACKAGES.TXT", "",
|
||||||
|
version)).reading()
|
||||||
self.step = 700
|
self.step = 700
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# units.py file is part of slpkg.
|
# sizes.py file is part of slpkg.
|
||||||
|
|
||||||
# Copyright 2014 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
|
# Copyright 2014 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
Loading…
Add table
Reference in a new issue