mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Merge branch 'develop'
This commit is contained in:
commit
a3d74039a4
6 changed files with 28 additions and 13 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Version 2.2.6
|
||||||
|
26-2-2015
|
||||||
|
|
||||||
|
[Feature] - Added counter download.
|
||||||
|
|
||||||
|
[Updated] - Update Slackware release message.
|
||||||
|
|
||||||
|
|
||||||
Version 2.2.5
|
Version 2.2.5
|
||||||
24-2-2015
|
24-2-2015
|
||||||
|
|
||||||
|
|
2
PKG-INFO
2
PKG-INFO
|
@ -1,6 +1,6 @@
|
||||||
Metadata-Version: 1.1
|
Metadata-Version: 1.1
|
||||||
Name: slpkg
|
Name: slpkg
|
||||||
Version: 2.2.5
|
Version: 2.2.6
|
||||||
Author: dslackw
|
Author: dslackw
|
||||||
Author-email: d zlatanidis at gmail com
|
Author-email: d zlatanidis at gmail com
|
||||||
Maintainer: dslackw
|
Maintainer: dslackw
|
||||||
|
|
|
@ -23,6 +23,11 @@
|
||||||
|
|
||||||
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/slpkg_package.png
|
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/slpkg_package.png
|
||||||
:target: https://github.com/dslackw/slpkg
|
:target: https://github.com/dslackw/slpkg
|
||||||
|
|
||||||
|
|
|
||||||
|
|
||||||
|
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/poweredbyslack.gif
|
||||||
|
:target: http://www.slackware.com/
|
||||||
|
|
|
|
||||||
|
|
||||||
.. contents:: Table of Contents:
|
.. contents:: Table of Contents:
|
||||||
|
|
|
@ -79,16 +79,15 @@ def select_slack_release(slack_rel):
|
||||||
defined wrong
|
defined wrong
|
||||||
'''
|
'''
|
||||||
if slack_rel not in ['stable', 'current']:
|
if slack_rel not in ['stable', 'current']:
|
||||||
print("\n You have not specified the Slackware release.\n"
|
return 'FAULT'
|
||||||
" Edit file '/etc/slpkg/slpkg.conf' and change the \n"
|
return slack_rel
|
||||||
" value of the variable RELEASE.\n")
|
|
||||||
|
|
||||||
|
|
||||||
class MetaData(object):
|
class MetaData(object):
|
||||||
|
|
||||||
__all__ = "slpkg"
|
__all__ = "slpkg"
|
||||||
__author__ = "dslackw"
|
__author__ = "dslackw"
|
||||||
__version_info__ = (2, 2, 5)
|
__version_info__ = (2, 2, 6)
|
||||||
__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"
|
||||||
|
@ -131,6 +130,7 @@ class MetaData(object):
|
||||||
'slackr', 'slonly', 'ktown', 'multi', 'slacke',
|
'slackr', 'slonly', 'ktown', 'multi', 'slacke',
|
||||||
'salix', 'slackl', 'rested']
|
'salix', 'slackl', 'rested']
|
||||||
|
|
||||||
|
# read value from configuration file
|
||||||
if os.path.isfile('%s%s' % (conf_path, 'slpkg.conf')):
|
if os.path.isfile('%s%s' % (conf_path, 'slpkg.conf')):
|
||||||
f = open('%s%s' % (conf_path, 'slpkg.conf'), 'r')
|
f = open('%s%s' % (conf_path, 'slpkg.conf'), 'r')
|
||||||
conf = f.read()
|
conf = f.read()
|
||||||
|
@ -164,7 +164,7 @@ class MetaData(object):
|
||||||
repositories = [repo.strip() for repo in repositories]
|
repositories = [repo.strip() for repo in repositories]
|
||||||
|
|
||||||
# Check Slackware release
|
# Check Slackware release
|
||||||
select_slack_release(slack_rel)
|
slack_rel = select_slack_release(slack_rel)
|
||||||
|
|
||||||
# Grap sub repositories
|
# Grap sub repositories
|
||||||
ktown_kde_repo = grab_sub_repo(repositories, 'ktown')
|
ktown_kde_repo = grab_sub_repo(repositories, 'ktown')
|
||||||
|
|
|
@ -28,8 +28,8 @@ from __metadata__ import MetaData as _m
|
||||||
|
|
||||||
def options():
|
def options():
|
||||||
arguments = [
|
arguments = [
|
||||||
"\nslpkg - version {0} | set: {1}\n".format(_m.__version__,
|
"\nslpkg - version {0} | Slackware release: {1}\n".format(
|
||||||
_m.slack_rel),
|
_m.__version__, _m.slack_rel),
|
||||||
"Slpkg is a user-friendly package manager for Slackware "
|
"Slpkg is a user-friendly package manager for Slackware "
|
||||||
"installations\n",
|
"installations\n",
|
||||||
"Commands:",
|
"Commands:",
|
||||||
|
@ -88,8 +88,8 @@ def usage(repo):
|
||||||
error_repo = ("slpkg: error: repository '{0}' does not exist"
|
error_repo = ("slpkg: error: repository '{0}' does not exist"
|
||||||
"\n".format(repo))
|
"\n".format(repo))
|
||||||
view = [
|
view = [
|
||||||
"\nslpkg - version {0} | set: {1}\n".format(_m.__version__,
|
"\nslpkg - version {0} | Slackware release: {1}\n".format(
|
||||||
_m.slack_rel),
|
_m.__version__, _m.slack_rel),
|
||||||
"Usage: slpkg Commands:",
|
"Usage: slpkg Commands:",
|
||||||
" [update] [upgrade] [repo-add [repository name] [URL]]",
|
" [update] [upgrade] [repo-add [repository name] [URL]]",
|
||||||
" [repo-remove [repository]] [repo-list]",
|
" [repo-remove [repository]] [repo-list]",
|
||||||
|
|
|
@ -40,15 +40,17 @@ class Download(object):
|
||||||
'''
|
'''
|
||||||
Download files usign wget.
|
Download files usign wget.
|
||||||
'''
|
'''
|
||||||
|
dwn_count = 1
|
||||||
for dwn in self.url:
|
for dwn in self.url:
|
||||||
self.file_name = dwn.split("/")[-1]
|
self.file_name = dwn.split("/")[-1]
|
||||||
print("\n[ {0}Download{1} ] -->{1} {2}\n".format(_m.color['GREEN'],
|
print("\n[{0}/{1}][ {2}Download{3} ] --> {4}\n".format(
|
||||||
_m.color['ENDC'],
|
dwn_count, len(self.url), _m.color['GREEN'], _m.color['ENDC'],
|
||||||
self.file_name))
|
self.file_name))
|
||||||
try:
|
try:
|
||||||
subprocess.call("wget {0} --directory-prefix={1} {2}".format(
|
subprocess.call("wget {0} --directory-prefix={1} {2}".format(
|
||||||
self.wget_options, self.path, dwn), shell=True)
|
self.wget_options, self.path, dwn), shell=True)
|
||||||
self._check_if_downloaded()
|
self._check_if_downloaded()
|
||||||
|
dwn_count += 1
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print # new line at cancel
|
print # new line at cancel
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue