From bf2e677d1108d045e790f3a77ac8ca621e07a8d1 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 25 Feb 2015 10:01:08 +0200 Subject: [PATCH 1/6] fix release message --- slpkg/__metadata__.py | 8 ++++---- slpkg/arguments.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index d82426ab..a95691b7 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -79,9 +79,8 @@ def select_slack_release(slack_rel): defined wrong ''' if slack_rel not in ['stable', 'current']: - print("\n You have not specified the Slackware release.\n" - " Edit file '/etc/slpkg/slpkg.conf' and change the \n" - " value of the variable RELEASE.\n") + return 'FAULT' + return slack_rel class MetaData(object): @@ -131,6 +130,7 @@ class MetaData(object): 'slackr', 'slonly', 'ktown', 'multi', 'slacke', 'salix', 'slackl', 'rested'] + # read value from configuration file if os.path.isfile('%s%s' % (conf_path, 'slpkg.conf')): f = open('%s%s' % (conf_path, 'slpkg.conf'), 'r') conf = f.read() @@ -164,7 +164,7 @@ class MetaData(object): repositories = [repo.strip() for repo in repositories] # Check Slackware release - select_slack_release(slack_rel) + slack_rel = select_slack_release(slack_rel) # Grap sub repositories ktown_kde_repo = grab_sub_repo(repositories, 'ktown') diff --git a/slpkg/arguments.py b/slpkg/arguments.py index 4e0060df..2df523f5 100644 --- a/slpkg/arguments.py +++ b/slpkg/arguments.py @@ -28,8 +28,8 @@ from __metadata__ import MetaData as _m def options(): arguments = [ - "\nslpkg - version {0} | set: {1}\n".format(_m.__version__, - _m.slack_rel), + "\nslpkg - version {0} | Slackware release: {1}\n".format( + _m.__version__, _m.slack_rel), "Slpkg is a user-friendly package manager for Slackware " "installations\n", "Commands:", @@ -88,8 +88,8 @@ def usage(repo): error_repo = ("slpkg: error: repository '{0}' does not exist" "\n".format(repo)) view = [ - "\nslpkg - version {0} | set: {1}\n".format(_m.__version__, - _m.slack_rel), + "\nslpkg - version {0} | Slackware release: {1}\n".format( + _m.__version__, _m.slack_rel), "Usage: slpkg Commands:", " [update] [upgrade] [repo-add [repository name] [URL]]", " [repo-remove [repository]] [repo-list]", From 747e95c02a93bdb48e2b0e528cd31912098453df Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 25 Feb 2015 10:01:45 +0200 Subject: [PATCH 2/6] added checksum --- CHECKSUMS.md5 | 1 + 1 file changed, 1 insertion(+) diff --git a/CHECKSUMS.md5 b/CHECKSUMS.md5 index 4de03f29..e6695a05 100644 --- a/CHECKSUMS.md5 +++ b/CHECKSUMS.md5 @@ -15,3 +15,4 @@ b37d59524be1ce9ef1c4e13e91ceb763 ./slpkg-2.2.0.tar.gz 3b869056c2309ee3f694b2c11f5533bd ./slpkg-2.2.1.tar.gz c32bc46bcb2f5a7b4fbc681a6cccc3de ./slpkg-2.2.2.tar.gz 3c7259a18644573e116b4836095aebd8 ./slpkg-2.2.3.tar.gz +246571f3f6489dd98a67df3a2d1acb58 ./slpkg-2.2.5.tar.gz From 15e1c6782e38c49bb18ace65c8001ab11214a795 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 26 Feb 2015 09:48:30 +0200 Subject: [PATCH 3/6] added counter download --- slpkg/downloader.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/slpkg/downloader.py b/slpkg/downloader.py index c5c7ba52..ea3f26b2 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -40,15 +40,17 @@ class Download(object): ''' Download files usign wget. ''' + dwn_count = 1 for dwn in self.url: self.file_name = dwn.split("/")[-1] - print("\n[ {0}Download{1} ] -->{1} {2}\n".format(_m.color['GREEN'], - _m.color['ENDC'], - self.file_name)) + print("\n[{0}/{1}][ {2}Download{3} ] --> {4}\n".format( + dwn_count, len(self.url), _m.color['GREEN'], _m.color['ENDC'], + self.file_name)) try: subprocess.call("wget {0} --directory-prefix={1} {2}".format( self.wget_options, self.path, dwn), shell=True) self._check_if_downloaded() + dwn_count += 1 except KeyboardInterrupt: print # new line at cancel sys.exit(0) From 923b39eb13b086c45bb926709b75c8c02280df4d Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 26 Feb 2015 10:12:12 +0200 Subject: [PATCH 4/6] update --- CHANGELOG | 8 ++++++++ README.rst | 3 +++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index d76fd3e7..3ee20adf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +Version 2.2.6 +26-2-2015 + +[Feature] - Added counter download. + +[Updated] - Update Slackware release message. + + Version 2.2.5 24-2-2015 diff --git a/README.rst b/README.rst index d399b488..b901e2d3 100644 --- a/README.rst +++ b/README.rst @@ -23,6 +23,9 @@ .. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/slpkg_package.png :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: From 80543d4e6147d4912de6f904f01726e41a5d5b35 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 26 Feb 2015 10:13:12 +0200 Subject: [PATCH 5/6] update --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index b901e2d3..63767dd4 100644 --- a/README.rst +++ b/README.rst @@ -24,6 +24,8 @@ .. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/slpkg_package.png :target: https://github.com/dslackw/slpkg +| + .. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/poweredbyslack.gif :target: http://www.slackware.com/ | From 7b2a96ae8d16c8b4a864d58e7870d34710365f0b Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 26 Feb 2015 10:32:26 +0200 Subject: [PATCH 6/6] update version --- PKG-INFO | 2 +- slpkg/__metadata__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PKG-INFO b/PKG-INFO index d905d24c..441e824c 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: slpkg -Version: 2.2.5 +Version: 2.2.6 Author: dslackw Author-email: d zlatanidis at gmail com Maintainer: dslackw diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index a95691b7..8e468ad7 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -87,7 +87,7 @@ class MetaData(object): __all__ = "slpkg" __author__ = "dslackw" - __version_info__ = (2, 2, 5) + __version_info__ = (2, 2, 6) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com"