mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
updated for version 1.3.7
This commit is contained in:
parent
62ce5bff44
commit
42909117b0
5 changed files with 34 additions and 45 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
29-05-2014
|
||||||
|
Version 1.3.7
|
||||||
|
|
||||||
|
[Updated] - Fix link filename with version
|
||||||
|
|
||||||
28-05-2014
|
28-05-2014
|
||||||
Version 1.3.6
|
Version 1.3.6
|
||||||
|
|
||||||
|
|
2
PKG-INFO
2
PKG-INFO
|
@ -1,6 +1,6 @@
|
||||||
Metadata-Version: 1.1
|
Metadata-Version: 1.1
|
||||||
Name: slpkg
|
Name: slpkg
|
||||||
Version: 1.3.6
|
Version: 1.3.7
|
||||||
Author: dslackw
|
Author: dslackw
|
||||||
Author-email: d zlatanidis at gmail com
|
Author-email: d zlatanidis at gmail com
|
||||||
Maintainer: dslackw
|
Maintainer: dslackw
|
||||||
|
|
|
@ -17,7 +17,8 @@ Slpkg is a terminal tool in order to easy use Slackware packages.
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
- Download package with all dependencies build and install all
|
- Download package with all dependencies,
|
||||||
|
build and install all in a command
|
||||||
- Automatic tool build and install packages
|
- Automatic tool build and install packages
|
||||||
- List all installed packages
|
- List all installed packages
|
||||||
- Τracking dependencies
|
- Τracking dependencies
|
||||||
|
|
67
bin/slpkg
67
bin/slpkg
|
@ -51,7 +51,7 @@ import subprocess
|
||||||
|
|
||||||
|
|
||||||
__author__ = "dslackw"
|
__author__ = "dslackw"
|
||||||
__version__ = "1.3.6"
|
__version__ = "1.3.7"
|
||||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||||
__email__ = "d.zlatanidis@gmail.com"
|
__email__ = "d.zlatanidis@gmail.com"
|
||||||
|
|
||||||
|
@ -363,6 +363,7 @@ def sbo_dependencies_links_pkg(name):
|
||||||
colors.CYAN, name, colors.RED, colors.ENDC))
|
colors.CYAN, name, colors.RED, colors.ENDC))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
find_version = sbo_version_pkg(find_sbo_url, name)
|
||||||
find_sbo_dwn = sbo_slackbuild_dwn(find_sbo_url, name)
|
find_sbo_dwn = sbo_slackbuild_dwn(find_sbo_url, name)
|
||||||
find_source_dwn = sbo_source_dwn(find_sbo_url, name)
|
find_source_dwn = sbo_source_dwn(find_sbo_url, name)
|
||||||
find_extra_dwn = sbo_extra_dwn(find_sbo_url, name)
|
find_extra_dwn = sbo_extra_dwn(find_sbo_url, name)
|
||||||
|
@ -370,14 +371,16 @@ def sbo_dependencies_links_pkg(name):
|
||||||
|
|
||||||
# create flag to know how much extra source there are
|
# create flag to know how much extra source there are
|
||||||
if find_extra_dwn != []:
|
if find_extra_dwn != []:
|
||||||
flag = str(len(find_extra_dwn))
|
flag = ("extra" + str(len(find_extra_dwn))).split()
|
||||||
dep_links_results.append(flag)
|
dep_links_results.append(flag)
|
||||||
|
|
||||||
|
version = find_version.split()
|
||||||
sbo_dwn = find_sbo_dwn.split()
|
sbo_dwn = find_sbo_dwn.split()
|
||||||
source_dwn = find_source_dwn.split()
|
source_dwn = find_source_dwn.split()
|
||||||
dependencies = find_sbo_req.split()
|
dependencies = find_sbo_req.split()
|
||||||
|
|
||||||
dep_links_results.append(find_extra_dwn)
|
dep_links_results.append(find_extra_dwn)
|
||||||
|
dep_links_results.append(version)
|
||||||
dep_links_results.append(source_dwn)
|
dep_links_results.append(source_dwn)
|
||||||
dep_links_results.append(sbo_dwn)
|
dep_links_results.append(sbo_dwn)
|
||||||
|
|
||||||
|
@ -387,6 +390,7 @@ def sbo_dependencies_links_pkg(name):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
dep_links_results.append(dependencies)
|
dep_links_results.append(dependencies)
|
||||||
|
|
||||||
for line in dependencies:
|
for line in dependencies:
|
||||||
print
|
print
|
||||||
sbo_dependencies_links_pkg(line)
|
sbo_dependencies_links_pkg(line)
|
||||||
|
@ -734,50 +738,24 @@ def sbo_build(name):
|
||||||
if link.startswith('http'):
|
if link.startswith('http'):
|
||||||
dwn_link.append(link)
|
dwn_link.append(link)
|
||||||
|
|
||||||
dwn_link.reverse() # upside-down list
|
|
||||||
|
# grep the version
|
||||||
|
version = []
|
||||||
|
for ver in results:
|
||||||
|
for i in range(0, 10):
|
||||||
|
if ver.startswith(str(i)):
|
||||||
|
version.append(ver)
|
||||||
|
|
||||||
|
# upside-down lists
|
||||||
|
version .reverse()
|
||||||
|
dwn_link.reverse()
|
||||||
|
|
||||||
files = []
|
files = []
|
||||||
for i in range(len(dwn_link)):
|
for i in range(len(dwn_link)):
|
||||||
files.append(get_file(dwn_link[i])) # get tar archives from link
|
files.append(get_file(dwn_link[i])) # get tar archives from link
|
||||||
|
|
||||||
# get version from source code
|
|
||||||
version = []
|
|
||||||
j = 1
|
|
||||||
for i in range(len(files) / 2):
|
|
||||||
if files[j].endswith("tar.gz"):
|
|
||||||
ver = files[j]
|
|
||||||
ver = ver[:-7] # remove archive type .tar.gz
|
|
||||||
ver = get_version(ver) # remove file name and take the version
|
|
||||||
ver = ver.replace("-", "")
|
|
||||||
version.append(ver)
|
|
||||||
j += 2
|
|
||||||
|
|
||||||
elif files[j].endswith("tar.bz2"):
|
# removes archives type
|
||||||
ver = files[j]
|
|
||||||
ver = ver[:-8]
|
|
||||||
ver = get_version(ver)
|
|
||||||
ver = ver.replace("-", "")
|
|
||||||
version.append(ver)
|
|
||||||
j += 2
|
|
||||||
|
|
||||||
elif files[j].endswith("zip"):
|
|
||||||
ver = files[j]
|
|
||||||
ver = ver[:-4]
|
|
||||||
ver = get_version(ver)
|
|
||||||
ver = ver.replace("-", "")
|
|
||||||
version.append(ver)
|
|
||||||
j += 2
|
|
||||||
|
|
||||||
elif files[j].endswith("tar.xz"):
|
|
||||||
ver = files[j]
|
|
||||||
ver = ver[:-7]
|
|
||||||
ver = get_version(ver)
|
|
||||||
ver = ver.replace("-", "")
|
|
||||||
version.append(ver)
|
|
||||||
j += 2
|
|
||||||
|
|
||||||
|
|
||||||
# get filename from sbo script
|
|
||||||
filename = []
|
filename = []
|
||||||
y = 0
|
y = 0
|
||||||
for i in range(len(files) / 2):
|
for i in range(len(files) / 2):
|
||||||
|
@ -811,14 +789,19 @@ def sbo_build(name):
|
||||||
for i in range(len(filename)):
|
for i in range(len(filename)):
|
||||||
filename_version.append(filename[i] + "-" + version[i])
|
filename_version.append(filename[i] + "-" + version[i])
|
||||||
|
|
||||||
|
|
||||||
|
print
|
||||||
|
print ("{}Start --> \n{}".format(colors.GREEN, colors.ENDC))
|
||||||
wget_links = set(dwn_link) # remove duplicate links
|
wget_links = set(dwn_link) # remove duplicate links
|
||||||
|
|
||||||
|
|
||||||
# dwonload links
|
# dwonload links
|
||||||
for link in wget_links:
|
for link in wget_links:
|
||||||
os.system("wget {}".format(link))
|
os.system("wget {}".format(link))
|
||||||
|
|
||||||
|
|
||||||
# build packages and store slackware files in /tmp directory
|
# build packages and store slackware files in /tmp directory
|
||||||
if results[0] == "1": # check how many extra sources
|
if results[0] == "extra1": # check how many extra sources
|
||||||
|
|
||||||
for i in range(len(files) / 2):
|
for i in range(len(files) / 2):
|
||||||
if len(files) < 4:
|
if len(files) < 4:
|
||||||
|
@ -842,7 +825,7 @@ def sbo_build(name):
|
||||||
for j in range(0, 2):
|
for j in range(0, 2):
|
||||||
files.pop(0)
|
files.pop(0)
|
||||||
|
|
||||||
elif results[0] == "2": # check how many extra sources
|
elif results[0] == "extra2": # check how many extra sources
|
||||||
|
|
||||||
for i in range(len(files) / 2):
|
for i in range(len(files) / 2):
|
||||||
if len(files) < 5:
|
if len(files) < 5:
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ from distutils.core import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = 'slpkg',
|
name = 'slpkg',
|
||||||
version = "1.3.6",
|
version = "1.3.7",
|
||||||
description = "Python tool to manage Slackware packages",
|
description = "Python tool to manage Slackware packages",
|
||||||
keywords = ["slackware", "slpkg", "upgrade", "install", "remove",
|
keywords = ["slackware", "slpkg", "upgrade", "install", "remove",
|
||||||
"view", "slackpkg", "tool"],
|
"view", "slackpkg", "tool"],
|
||||||
|
|
Loading…
Reference in a new issue