From 3057fff167167887207defa88464b73e2b4bfc62 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 26 Nov 2014 11:27:58 +0200 Subject: [PATCH] updated for version 2.0.9 --- CHANGELOG | 7 +++++++ INSTALL | 10 ++++++---- PKG-INFO | 2 +- README.rst | 19 +++++++++++++------ install.sh | 2 +- setup.py | 13 +++++++++++-- slackbuild/slpkg.SlackBuild | 2 +- slpkg/__metadata__.py | 2 +- slpkg/config.py | 4 +++- slpkg/desc.py | 9 ++++----- 10 files changed, 48 insertions(+), 22 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a5445e08..98360b24 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +Version 2.0.9 +26-11-2014 + +[Updated] - Fix setup.py to install configuration files after checksum. + - Fix view slpkg config file. + + Version 2.0.8 25-11-2014 diff --git a/INSTALL b/INSTALL index b6cb2413..cb6306e6 100644 --- a/INSTALL +++ b/INSTALL @@ -11,15 +11,17 @@ slpkg works on Slackware distribution. Install slpkg ------------- -There are mainly 3 ways: +There are mainly 4 ways: -1) Download latest slpkg version from https://github.com/dslackw/slpkg/releases +1) Using pip: pip install slpkg --upgrade + +2) Download latest slpkg version from https://github.com/dslackw/slpkg/releases Untar or unzip the archive, cd in slpkg-?.?.? directory. Run install.sh in this directory `./install.sh` and slpkg auto-installed. -2) Download slpkg package from slackbuilds.org. +3) Download slpkg package from slackbuilds.org. -3) Download binary package from sourceforge: +4) Download binary package from sourceforge: https://sourceforge.net/projects/slpkg/ diff --git a/PKG-INFO b/PKG-INFO index 0a286cab..28cba944 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: slpkg -Version: 2.0.8 +Version: 2.0.9 Author: dslackw Author-email: d zlatanidis at gmail com Maintainer: dslackw diff --git a/README.rst b/README.rst index cae1c32d..32fcfedc 100644 --- a/README.rst +++ b/README.rst @@ -11,9 +11,9 @@ Latest Release: -- Version: 2.0.8 +- Version: 2.0.9 - `Package `_ -- `Source `_ +- `Source `_ - `CHANGELOG `_ .. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png @@ -112,14 +112,21 @@ Untar the archive and run install.sh script: .. code-block:: bash - $ tar xvf slpkg-2.0.8.tar.gz - $ cd slpkg-2.0.8 + $ tar xvf slpkg-2.0.9.tar.gz + $ cd slpkg-2.0.9 $ ./install.sh From SourceForge: Download binary package from `SourceForge `_ +Using pip: + +.. code-block:: bash + + $ pip install slpkg --upgrade + + Upgrade ------- @@ -145,7 +152,7 @@ Configuration files Slackware Current ----------------- -For Slackware 'current' users must change the variable VERSION in /etc/slpkg.conf file. +For Slackware 'current' users must change the variable VERSION in '/etc/slpkg.conf' file. .. code-block:: bash @@ -157,7 +164,7 @@ Slackware Mirrors Slpkg uses the central mirror "http://mirrors.slackware.com/slackware/" to find the nearest one. If however for some reason this troublesome -please edit the file in /etc/slpkg/slackware-mirrors +please edit the file in '/etc/slpkg/slackware-mirrors'. Command Line Tool Usage ----------------------- diff --git a/install.sh b/install.sh index 35199e20..30d49b63 100755 --- a/install.sh +++ b/install.sh @@ -21,7 +21,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=slpkg -VERSION=${VERSION:-2.0.8} +VERSION=${VERSION:-2.0.9} TAG=${TAG:-_dsw} # Installation script. diff --git a/setup.py b/setup.py index 83a4ffa5..b67d23c6 100755 --- a/setup.py +++ b/setup.py @@ -31,6 +31,8 @@ from slpkg.__metadata__ import ( __email__, __author__ ) +from slpkg.checksum import md5sum + try: from setuptools import setup @@ -93,5 +95,12 @@ if "install" in sys.argv: if not os.path.exists(conf_path): os.system("mkdir -p {0}".format(conf_path)) for conf in conf_file: - print("Installing '{0}' file".format(conf.split("/")[-1])) - shutil.copy2(conf, conf_path) + filename = conf.split("/")[-1] + print("Installing '{0}' file".format(filename)) + if os.path.isfile(conf_path + filename): + old = md5sum(conf_path + filename) + new = md5sum(conf) + if old != new: + shutil.copy2(conf, conf_path + filename + ".new") + else: + shutil.copy2(conf, conf_path) diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild index 5d92901a..afdcd487 100755 --- a/slackbuild/slpkg.SlackBuild +++ b/slackbuild/slpkg.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=slpkg -VERSION=${VERSION:-2.0.8} +VERSION=${VERSION:-2.0.9} BUILD=${BUILD:-1} TAG=${TAG:-_dsw} diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index 93710e76..55e9d7b5 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -26,7 +26,7 @@ import os __all__ = "slpkg" __author__ = "dslackw" -__version_info__ = (2, 0, 8) +__version_info__ = (2, 0, 9) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" diff --git a/slpkg/config.py b/slpkg/config.py index 6074154c..f8edd2f9 100755 --- a/slpkg/config.py +++ b/slpkg/config.py @@ -46,7 +46,9 @@ class Config(object): 'DEL_BUILD', 'SBO_BUILD_LOG', 'DEFAULT_ANSWER', - 'REMOVE_DEPS_ANSWER' + 'REMOVE_DEPS_ANSWER', + 'DEL_DEPS', + 'USE_COLORS' ] f = open(self.config_file, "r") read_conf = f.read() diff --git a/slpkg/desc.py b/slpkg/desc.py index 1bc71ac5..ebad10d5 100755 --- a/slpkg/desc.py +++ b/slpkg/desc.py @@ -75,8 +75,8 @@ class PkgDesc(object): if self.repo != "sbo": for line in PACKAGES_TXT.splitlines(): if line.startswith(self.name + ":"): - print( - self.COLOR + line[len(self.name) + 1:] + color['ENDC']) + print(self.COLOR + line[len(self.name) + 1:] + + color['ENDC']) count += 1 if count == 11: break @@ -85,9 +85,8 @@ class PkgDesc(object): if (line.startswith("SLACKBUILD SHORT DESCRIPTION: " + self.name + " (")): count += 1 - print( - self.COLOR + line[31:] + color['ENDC']) + print(self.COLOR + line[31:] + color['ENDC']) if count == 0: - pkg_not_found("", self.name, "No matching", "\n") + pkg_not_found("", self.name, "No matching", "\n") else: print("") # new line at end