From 50ff4ed14fff927aa763a232dd9bd7fa15db9eb8 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 9 Sep 2022 20:00:19 +0300 Subject: [PATCH 1/7] Rename configs files Signed-off-by: Dimitris Zlatanidis --- ChangeLog.txt | 6 +++++- configs/blacklist.yaml | 2 -- configs/slpkg.yaml | 22 ---------------------- slackbuild/slpkg.SlackBuild | 4 ++-- slpkg/blacklist.py | 2 +- slpkg/configs.py | 2 +- 6 files changed, 9 insertions(+), 29 deletions(-) delete mode 100644 configs/blacklist.yaml delete mode 100644 configs/slpkg.yaml diff --git a/ChangeLog.txt b/ChangeLog.txt index f16f18b5..52491e0f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,9 @@ +4.1.5 - 9/9/2022 +Updated: +- Rename config files to .yml + 4.1.4 - 17/07/2022 --Added +Added: - setup.cfg file - Option to upgrade sbo packages diff --git a/configs/blacklist.yaml b/configs/blacklist.yaml deleted file mode 100644 index 348c014f..00000000 --- a/configs/blacklist.yaml +++ /dev/null @@ -1,2 +0,0 @@ -blacklist: - packages: [] diff --git a/configs/slpkg.yaml b/configs/slpkg.yaml deleted file mode 100644 index 7adcb108..00000000 --- a/configs/slpkg.yaml +++ /dev/null @@ -1,22 +0,0 @@ -configs: - os_arch: x86_64 - tmp_path: /tmp - tmp_slpkg: /tmp/slpkg - build_path: /tmp/slpkg/build - lib_path: /var/lib/slpkg - etc_path: /etc/slpkg - db_path: /var/lib/slpkg/database - sbo_repo_path: /var/lib/slpkg/repository - log_packages: /var/log/packages - database: database.slpkg - repo_version: 15.0 - sbo_url: http://slackbuilds.org/slackbuilds/15.0 - sbo_txt: SLACKBUILDS.TXT - tar_suffix: .tar.gz - pkg_suffix: .tgz - repo_tag: _SBo - installpkg: upgradepkg --install-new - reinstall: upgradepkg --reinstall - removepkg: removepkg - colors: on - wget_options: -c -N diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild index 50714a1b..9282c559 100755 --- a/slackbuild/slpkg.SlackBuild +++ b/slackbuild/slpkg.SlackBuild @@ -98,8 +98,8 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr # install configuration files mkdir -p $PKG/etc/slpkg -install -D -m0644 configs/slpkg.yaml $PKG/etc/slpkg/slpkg.yaml.new -install -D -m0644 configs/blacklist.yaml $PKG/etc/slpkg/blacklist.yaml.new +install -D -m0644 configs/slpkg.yml $PKG/etc/slpkg/slpkg.yml.new +install -D -m0644 configs/blacklist.yml $PKG/etc/slpkg/blacklist.yml.new mkdir -p $PKG/usr/man/man1 cp man/slpkg.1 $PKG/usr/man/man1 diff --git a/slpkg/blacklist.py b/slpkg/blacklist.py index 3f950fb2..fc74b05f 100644 --- a/slpkg/blacklist.py +++ b/slpkg/blacklist.py @@ -15,7 +15,7 @@ class Blacklist: etc_path: str = Configs.etc_path def get(self): - file = f'{self.etc_path}/blacklist.yaml' + file = f'{self.etc_path}/blacklist.yml' if os.path.isfile(file): with open(file, 'r') as black: return yaml.safe_load(black)['blacklist']['packages'] diff --git a/slpkg/configs.py b/slpkg/configs.py index 0cdb518c..f483c4ba 100644 --- a/slpkg/configs.py +++ b/slpkg/configs.py @@ -53,7 +53,7 @@ class Configs: os.makedirs(build_path) ''' Overwrite with user configuration. ''' - config_file: str = f'{etc_path}/{prog_name}.yaml' + config_file: str = f'{etc_path}/{prog_name}.yml' if os.path.isfile(config_file): with open(config_file, 'r') as conf: configs = yaml.safe_load(conf) From 27378b9d583a5d264cdbd96608b35b90197f3486 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 9 Sep 2022 20:07:08 +0300 Subject: [PATCH 2/7] Rename configs files Signed-off-by: Dimitris Zlatanidis --- slackbuild/doinst.sh | 4 ++-- slpkg/version.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/slackbuild/doinst.sh b/slackbuild/doinst.sh index c07a4c6f..063dd5a8 100644 --- a/slackbuild/doinst.sh +++ b/slackbuild/doinst.sh @@ -8,8 +8,8 @@ config() { fi } -config etc/slpkg/slpkg.yaml.new -config etc/slpkg/blacklist.yaml.new +config etc/slpkg/slpkg.yml.new +config etc/slpkg/blacklist.yml.new if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 diff --git a/slpkg/version.py b/slpkg/version.py index a322d90c..a0932796 100644 --- a/slpkg/version.py +++ b/slpkg/version.py @@ -10,7 +10,7 @@ from slpkg.configs import Configs @dataclass class Version: prog_name: str = Configs.prog_name - version_info: tuple = (4, 1, 4) + version_info: tuple = (4, 1, 5) version: str = '{0}.{1}.{2}'.format(*version_info) license: str = 'MIT License' author: str = 'dslackw' From 074ee534bd0ae3b8786a5c98580e9bcf1d3a34b9 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 9 Sep 2022 20:32:41 +0300 Subject: [PATCH 3/7] Bugfixed: View upgraded version for noarch packages Signed-off-by: Dimitris Zlatanidis --- slpkg/views/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slpkg/views/views.py b/slpkg/views/views.py index f2bfb6d4..2337032e 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -95,6 +95,9 @@ class ViewMessage: if '--reinstall' in self.flags: install, set_color = 'upgrade', color['YELLOW'] + if 'noarch' in installed: + self.arch = 'noarch' + if installed: print(f'[{set_color} {install} {color["ENDC"]}] -> ' f'{sbo}-{version} {set_color}' From c51dd786462d7355bad639c9c4cb36bd3c014508 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 9 Sep 2022 20:40:39 +0300 Subject: [PATCH 4/7] Bugfixed: message when nothing to update Signed-off-by: Dimitris Zlatanidis --- slpkg/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/slpkg/main.py b/slpkg/main.py index e6af051c..7730df76 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -68,6 +68,10 @@ class Argparse: upgrade = Upgrade() packages = list(upgrade.packages()) + if not packages: + print('\nEverything is up-to-date.\n') + raise SystemExit() + install = Slackbuilds(packages, self.flags, install=True) install.execute() raise SystemExit() From 737bc82de2de983e8db048eccbfd6d3bfeef4701 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 9 Sep 2022 20:41:52 +0300 Subject: [PATCH 5/7] Updated for version 4.1.5 Signed-off-by: Dimitris Zlatanidis --- README.rst | 4 ++-- setup.cfg | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index ee1a4a94..15fa1d09 100644 --- a/README.rst +++ b/README.rst @@ -30,8 +30,8 @@ Install from the official third-party `SBo repository Date: Sat, 10 Sep 2022 19:51:00 +0300 Subject: [PATCH 6/7] Fixed: TypeError: argument of type 'NoneType' is not iterable Signed-off-by: Dimitris Zlatanidis --- slpkg/views/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slpkg/views/views.py b/slpkg/views/views.py index 2337032e..4797b7d2 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -95,7 +95,7 @@ class ViewMessage: if '--reinstall' in self.flags: install, set_color = 'upgrade', color['YELLOW'] - if 'noarch' in installed: + if installed and 'noarch' in installed: self.arch = 'noarch' if installed: From b30132eaecedb645deb21ff980c86ab2d4f48bf4 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 11 Sep 2022 19:24:52 +0300 Subject: [PATCH 7/7] Updated ChangeLog.txt Signed-off-by: Dimitris Zlatanidis --- ChangeLog.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 52491e0f..8d46284e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,8 @@ 4.1.5 - 9/9/2022 Updated: - Rename config files to .yml +Bugfixed: +- Show version to noarch packages 4.1.4 - 17/07/2022 Added: