updated for version 1.8.9

This commit is contained in:
Dimitris Zlatanidis 2014-09-23 23:00:07 +03:00
parent f7cedfc3cc
commit 66e26daf6c
16 changed files with 76 additions and 46 deletions

View file

@ -1,5 +1,13 @@
Version 1.8.9
23-09-2014
[Feature] - Added short description
- Added view matching packages from SBo repostirory
[Updated] - Update open-close files as SLACKBUILDS.TXT
Version 1.8.8
22-08-2014
22-09-2014
[Updated] - Fix Alignment viewing packages
- Fix build time

View file

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

View file

@ -7,9 +7,9 @@
Latest Release:
- Version: 1.8.8
- Version: 1.8.9
- `Package <https://sourceforge.net/projects/slpkg/files/slpkg/binary/>`_
- `Source <https://github.com/dslackw/slpkg/archive/v1.8.8.tar.gz>`_
- `Source <https://github.com/dslackw/slpkg/archive/v1.8.9.tar.gz>`_
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
@ -88,7 +88,7 @@ Tutorial
--------
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/screenshot-1.png
:target: https://asciinema.org/a/12082
:target: https://asciinema.org/a/12340
Installation
@ -98,8 +98,8 @@ Untar the archive and run install.sh script:
.. code-block:: bash
$ tar xvf slpkg-1.8.8.tar.gz
$ cd slpkg-1.8.8
$ tar xvf slpkg-1.8.9.tar.gz
$ cd slpkg-1.8.9
$ ./install.sh
Using `pip <https://pip.pypa.io/en/latest/>`_ :
@ -158,7 +158,7 @@ build and install with all dependencies :
.. code-block:: bash
$ slpkg -s sbo brasero
Building dependency tree...... Done
Reading package lists ......Done
The following packages will be automatically installed or upgraded
with new version:
@ -183,6 +183,27 @@ build and install with all dependencies :
Do you want to continue [Y/n]? y
$ slpkg -s sbo fmpeg
Reading package lists ....Done
Packages with name matching [ fmpeg ]
+==============================================================================
| Package Version Arch Repository
+==============================================================================
Matching:
ffmpegthumbnailer 2.0.8 x86_64 SBo
ffmpeg 2.1.5 x86_64 SBo
ffmpeg2theora 0.29 x86_64 SBo
gst-ffmpeg 0.10.13 x86_64 SBo
Installing summary
===============================================================================
Total found 4 matching packages.
0 installed package and 4 uninstalled packages.
Find packages from `Slackware official mirrors <http://mirrors.slackware.com/>`_
download and install:
@ -191,16 +212,15 @@ download and install:
$ slpkg -s slack mozilla
Packages with name matching [ mozilla ]
Reading package lists.............................. Done
Reading package lists ..............................Done
+==============================================================================
| Package Version Arch Build Repos Size
+==============================================================================
Installing:
mozilla-firefox 24.1.0esr x86_64 1 Slack 23524 K
mozilla-nss 3.15.2 x86_64 2 Slack 1592 K
mozilla-thunderbird 24.1.0 x86_64 1 Slack 24208 K
mozilla-firefox 24.1.0esr x86_64 1 Slack 23524 K
mozilla-nss 3.15.2 x86_64 2 Slack 1592 K
mozilla-thunderbird 24.1.0 x86_64 1 Slack 24208 K
Installing summary
===============================================================================
@ -217,7 +237,7 @@ and also displays installed packages:
.. code-block:: bash
$ slpkg -t brasero
Reading package lists...... Done
Reading package lists ......Done
+=========================
| brasero dependencies :
@ -240,7 +260,7 @@ Check if your packages is up to date from slackbuilds.org:
.. code-block:: bash
$ slpkg -c sbo upgrade
Reading package lists. Done
Reading package lists ...Done
These packages need upgrading:
@ -269,7 +289,7 @@ Check if your distribution is up to date from `Slackware official mirrors
.. code-block:: bash
$ slpkg -c slack upgrade
Reading package lists....... Done
Reading package lists .......Done
These packages need upgrading:
@ -294,11 +314,12 @@ Find packages from slackbuilds.org:
.. code-block:: bash
$ slpkg -n bitfighter
Reading package lists. Done
Reading package lists ...Done
+===============================================================================
| Package bitfighter --> http://slackbuilds.org/repository/14.1/games/bitfighter/
+===============================================================================
| Description : multi-player combat game
| SlackBuild : bitfighter.tar.gz
| Sources : bitfighter-019c.tar.gz, classic_level_pack.zip
| Requirements : OpenAL, SDL2, speex, libmodplug

View file

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

View file

@ -229,6 +229,7 @@ $ \fBslpkg -n termcolor\fP
+==============================================================================
| Package termcolor --> http://slackbuilds.org/repository/14.1/python/termcolor/
+==============================================================================
| Description : ANSII Color formatting for output in terminal
| SlackBuild : termcolor.tar.gz
| Source : termcolor-1.1.0.tar.gz
| Requirements :

0
setup.py Normal file → Executable file
View file

View file

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

View file

@ -1,7 +1,7 @@
PRGNAM="slpkg"
VERSION="1.8.8"
VERSION="1.8.9"
HOMEPAGE="https://github.com/dslackw/slpkg"
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.8.tar.gz"
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.9.tar.gz"
MD5SUM=""
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""

View file

@ -34,4 +34,4 @@ def get_file(link, char):
results.append(link[i])
if link[i] == char:
break
return "".join(results[::-1]).replace("/", "").strip()
return ("".join(results[::-1]).replace("/", "").strip())

View file

@ -107,7 +107,7 @@ def main():
if args.verbose:
prog_version()
if args.a:
s_user(getpass.getuser())
s_user(getpass.getuser())
build_package(args.a[0], args.a[1:], path)
if args.l:
pkg_list(args.l)
@ -180,7 +180,7 @@ def main():
s_user(getpass.getuser())
pkg_upgrade(args.u)
if args.o:
s_user(getpass.getuser())
s_user(getpass.getuser())
pkg_reinstall(args.o)
if args.r:
s_user(getpass.getuser())

View file

@ -37,7 +37,7 @@ def pkg_install(binary):
'''
for pkg in binary:
try:
print subprocess.check_output("installpkg {0}".format(pkg), shell=True)
print(subprocess.check_output("installpkg {0}".format(pkg), shell=True))
except subprocess.CalledProcessError:
message = "Can't install"
if len(binary) > 1:
@ -52,8 +52,8 @@ def pkg_upgrade(binary):
'''
for pkg in binary:
try:
print subprocess.check_output("upgradepkg --install-new {0}".format(pkg),
shell=True)
print(subprocess.check_output("upgradepkg --install-new {0}".format(pkg),
shell=True))
except subprocess.CalledProcessError:
message = "Can't upgrade"
if len(binary) > 1:
@ -68,8 +68,8 @@ def pkg_reinstall(binary):
'''
for pkg in binary:
try:
print subprocess.check_output("upgradepkg --reinstall {0}".format(pkg),
shell=True)
print(subprocess.check_output("upgradepkg --reinstall {0}".format(pkg),
shell=True))
except subprocess.CalledProcessError:
message = "Can't reinstall"
if len(binary) > 1:
@ -134,19 +134,19 @@ def pkg_remove(binary):
if remove_dep == "y" or remove_dep == "Y":
for dep in dependencies:
if find_package(dep + sp, pkg_path):
print subprocess.check_output("removepkg {0}".format(dep), shell=True)
print(subprocess.check_output("removepkg {0}".format(dep), shell=True))
rmv_list.append(dep)
os.remove(dep_path + rmv)
rmv_dependencies += dependencies[:-1]
else:
if find_package(rmv + sp, pkg_path):
print subprocess.check_output("removepkg {0}".format(rmv), shell=True)
print(subprocess.check_output("removepkg {0}".format(rmv), shell=True))
rmv_list.append(rmv)
f.close()
os.remove(dep_path + rmv)
else:
if find_package(rmv + sp, pkg_path):
print subprocess.check_output("removepkg {0}".format(rmv), shell=True)
print(subprocess.check_output("removepkg {0}".format(rmv), shell=True))
rmv_list.append(rmv)
# Prints all removed packages
if len(rmv_list) > 1:
@ -200,8 +200,8 @@ def pkg_display(binary):
'''
for pkg in binary:
if find_package(pkg + sp, pkg_path):
print subprocess.check_output("cat {0}{1}".format(pkg_path,
" /var/log/packages/".join(find_package(pkg +sp, pkg_path))), shell=True)
print(subprocess.check_output("cat {0}{1}".format(pkg_path,
" /var/log/packages/".join(find_package(pkg +sp, pkg_path))), shell=True))
else:
message = "Can't dislpay"
if len(binary) > 1:

View file

@ -25,4 +25,4 @@ def sbo_slackbuild_dwn(sbo_url):
'''
Create download slackbuild tar.gz archive
'''
return sbo_url[:-1] + ".tar.gz"
return (sbo_url[:-1] + ".tar.gz")

View file

@ -41,7 +41,7 @@ def sbo_search_pkg(name):
if line.startswith("SLACKBUILD LOCATION"):
if name == get_file(line[23:].strip(), "/").replace("\n", ""):
SLACKBUILDS_TXT.close()
return sbo_url + line[23:].strip() + "/"
return (sbo_url + line[23:].strip() + "/")
except KeyboardInterrupt:
print # new line at exit
sys.exit()

View file

@ -127,11 +127,10 @@ def sbo_build(name):
elif "UNTESTED" in dep_arch:
ARCH_COLOR = colors.YELLOW
sbo_packages_view(DEP_COLOR, dep, ver, ARCH_COLOR, dep_arch)
msg_ins = "package"
msg_upg = msg_ins
msg_upg = msg_ins = "package"
if count_installed > 1:
msg_ins = msg_ins + "s"
if msg_upg > 1:
if count_upgraded > 1:
msg_upg = msg_upg + "s"
print("\nInstalling summary")
print("=" * 79)
@ -144,11 +143,12 @@ def sbo_build(name):
UNST = ["UNSUPPORTED", "UNTESTED"]
if src in UNST:
print("\n{0}The package {1}{2}\n".format(colors.RED, src, ENDC))
sys.exit()
read = ""
# exit if all packages already installed
if pkg_sum == len(dependencies):
sys.exit()
read = raw_input("Do you want to continue [Y/n]? ")
elif pkg_sum == len(dependencies):
read = ""
else:
read = raw_input("Do you want to continue [Y/n]? ")
if read == "Y" or read == "y":
if not os.path.exists(build_path):
os.mkdir(build_path)
@ -269,7 +269,7 @@ def sbo_build(name):
ins_msg = ins_msg + "s"
if uns > 1:
uns_msg = uns_msg + "s"
print("\nMatching summary")
print("\nInstalling summary")
print("=" * 79)
print("{0}Total found {1} matching {2}.".format(
GREY, len(sbo_matching), total_msg))

View file

@ -49,7 +49,7 @@ def install(slack_pkg):
package_location = ([] for i in range(9))
GREEN, GREY, ENDC = colors.GREEN, colors.GREY, colors.ENDC
arch = COLOR = str()
# create directories if not exist
# create directories if not exists
tmp_path = slpkg_tmp + "packages/"
if not os.path.exists(slpkg_tmp):
os.mkdir(slpkg_tmp)

View file

@ -30,4 +30,4 @@ def slack_ver():
with open("/etc/slackware-version", "r") as f:
sv = f.read()
f.close()
return ".".join(re.findall(r"\d+", sv))
return (".".join(re.findall(r"\d+", sv)))