mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
updated for version 1.4.1
This commit is contained in:
parent
dc4fa1446a
commit
519756c8f4
4 changed files with 15 additions and 36 deletions
|
@ -1,3 +1,8 @@
|
|||
31-05-2014
|
||||
Version 1.4.1
|
||||
|
||||
[Updated] - Fix to avoid download package if already installed
|
||||
|
||||
30-05-2014
|
||||
Version 1.4.0
|
||||
|
||||
|
|
2
PKG-INFO
2
PKG-INFO
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 1.1
|
||||
Name: slpkg
|
||||
Version: 1.4.0
|
||||
Version: 1.4.1
|
||||
Author: dslackw
|
||||
Author-email: d zlatanidis at gmail com
|
||||
Maintainer: dslackw
|
||||
|
|
42
bin/slpkg
42
bin/slpkg
|
@ -51,7 +51,7 @@ import subprocess
|
|||
|
||||
|
||||
__author__ = "dslackw"
|
||||
__version__ = "1.4.0"
|
||||
__version__ = "1.4.1"
|
||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||
__email__ = "d.zlatanidis@gmail.com"
|
||||
|
||||
|
@ -144,26 +144,6 @@ def get_file(link, char):
|
|||
return file
|
||||
|
||||
|
||||
# get version from files
|
||||
def get_version(name):
|
||||
char = "-"
|
||||
|
||||
j = 0
|
||||
results = []
|
||||
for i in name:
|
||||
j += 1
|
||||
results.append(name[-j:])
|
||||
|
||||
for file in results:
|
||||
if file.startswith(char):
|
||||
file = file
|
||||
break
|
||||
|
||||
file = file.strip(" ") # remove spaces from string
|
||||
|
||||
return file
|
||||
|
||||
|
||||
|
||||
# this fuction return if the package exist
|
||||
def find_package(find_pkg, directory):
|
||||
|
@ -243,7 +223,6 @@ def SBo_search_pkg(name):
|
|||
|
||||
# find slackbuild download
|
||||
def SBo_slackbuild_dwn(SBo_url, name):
|
||||
|
||||
SBo_url = SBo_url.replace(name + "/", name + ".tar.gz")
|
||||
SBo_url = SBo_url.replace("repository", "slackbuilds")
|
||||
|
||||
|
@ -288,7 +267,6 @@ def SBo_extra_dwn(SBo_url, name):
|
|||
read_info = url_read(SBo_url)
|
||||
results = []
|
||||
|
||||
|
||||
for line in read_info.splitlines():
|
||||
if line.startswith(' '):
|
||||
line = line[10:-1]
|
||||
|
@ -789,16 +767,17 @@ def SBo_build(name):
|
|||
for i in range(len(filename)):
|
||||
filename_version.append(filename[i] + "-" + version[i])
|
||||
|
||||
|
||||
print
|
||||
print ("{}Start --> \n{}".format(colors.GREEN, colors.ENDC))
|
||||
wget_links = set(dwn_link) # remove duplicate links
|
||||
|
||||
|
||||
# dwonload links
|
||||
for link in wget_links:
|
||||
os.system("wget {}".format(link))
|
||||
|
||||
if find_package(filename_version[i], packages) == []:
|
||||
os.system("wget {}".format(link))
|
||||
print
|
||||
print ("{}Start --> \n{}".format(colors.GREEN, colors.ENDC))
|
||||
else:
|
||||
print
|
||||
pass
|
||||
|
||||
# build packages and store slackware files in /tmp directory
|
||||
if results[0] == "extra1": # check how many extra sources
|
||||
|
@ -817,7 +796,6 @@ def SBo_build(name):
|
|||
|
||||
else:
|
||||
|
||||
print
|
||||
print ("{}The package {}`{}`{} is already installed{}".format(colors.GREEN,
|
||||
colors.CYAN, filename_version[i], colors.GREEN, colors.ENDC))
|
||||
print
|
||||
|
@ -834,7 +812,6 @@ def SBo_build(name):
|
|||
|
||||
else:
|
||||
|
||||
print
|
||||
print ("{}The package {}`{}`{} is already installed{}".format(colors.GREEN,
|
||||
colors.CYAN, filename_version[i], colors.GREEN, colors.ENDC))
|
||||
print
|
||||
|
@ -859,7 +836,6 @@ def SBo_build(name):
|
|||
break
|
||||
else:
|
||||
|
||||
print
|
||||
print ("{}The package {}`{}`{} is already installed{}".format(colors.GREEN,
|
||||
colors.CYAN, filename_version[i], colors.GREEN, colors.ENDC))
|
||||
print
|
||||
|
@ -875,7 +851,6 @@ def SBo_build(name):
|
|||
os.system("upgradepkg --install-new {}".format(install_pkg))
|
||||
else:
|
||||
|
||||
print
|
||||
print ("{}The package {}`{}`{} is already installed{}".format(colors.GREEN,
|
||||
colors.CYAN, filename_version[i], colors.GREEN, colors.ENDC))
|
||||
print
|
||||
|
@ -895,7 +870,6 @@ def SBo_build(name):
|
|||
os.system("upgradepkg --install-new {}".format(install_pkg))
|
||||
|
||||
else:
|
||||
print
|
||||
print ("{}The package {}`{}`{} is already installed{}".format(colors.GREEN,
|
||||
colors.CYAN, filename_version[i], colors.GREEN, colors.ENDC))
|
||||
print
|
||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ from distutils.core import setup
|
|||
|
||||
setup(
|
||||
name = 'slpkg',
|
||||
version = "1.4.0",
|
||||
version = "1.4.1",
|
||||
description = "Python tool to manage Slackware packages",
|
||||
keywords = ["slackware", "slpkg", "upgrade", "install", "remove",
|
||||
"view", "slackpkg", "tool"],
|
||||
|
|
Loading…
Reference in a new issue