Update tracer to 1.0-1

This commit is contained in:
Jakub Kadlcik 2023-09-15 00:48:46 +02:00
parent eabb594a20
commit e296f5a19b
4 changed files with 23 additions and 54 deletions

1
.gitignore vendored
View File

@ -29,3 +29,4 @@
/tracer-0.7.9.tar.gz
/tracer-0.7.10.tar.gz
/tracer-0.7.11.tar.gz
/tracer-1.0.tar.gz

View File

@ -1,39 +0,0 @@
From 16e3e39fe8ee4483a7aaa328fdc4d2304c14cb11 Mon Sep 17 00:00:00 2001
From: Jakub Kadlcik <frostyx@email.cz>
Date: Wed, 16 Aug 2023 22:06:42 +0200
Subject: [PATCH] Stop using deprecated rpm.fi
Fix #198
Per `help(rpm.fi)`:
> DEPRECATED! This old API mixes storing and iterating over the meta data
> of the files of a package. Use rpm.files and rpm.file data types as a
> much cleaner API.
We could use
return [x.name for x in rpm.files(hdr)]
but this seems easier
return hdr[rpm.RPMTAG_FILENAMES]
---
tracer/packageManagers/rpm.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tracer/packageManagers/rpm.py b/tracer/packageManagers/rpm.py
index 87fb5f1..e8e7347 100644
--- a/tracer/packageManagers/rpm.py
+++ b/tracer/packageManagers/rpm.py
@@ -102,8 +102,8 @@ def package_files(self, pkg_name):
if self._is_installed(pkg_name):
ts = rpm.TransactionSet()
mi = ts.dbMatch("name", pkg_name)
- fi = rpm.fi(next(mi))
- return [f[0] for f in fi]
+ hdr = next(mi)
+ return hdr[rpm.RPMTAG_FILENAMES]
# Tracer will not find uninstalled applications
return []

View File

@ -1 +1 @@
SHA512 (tracer-0.7.11.tar.gz) = d286dec2538b18067f58eac1427a21a9e45f9016439759df3d48001b3fd98e556034f7ed27747055392273a1c26159c738c384b842c54ed612993488c0f2f4be
SHA512 (tracer-1.0.tar.gz) = d244ca913bcc8af78c4158c372f35492a5ea01c2fadf01981211e5ef62bcea8f8c94cb4ae9d52bbd0054271b4721ceff1265e4ee8d56b6cb338b376e948312ac

View File

@ -17,8 +17,8 @@
%endif
Name: tracer
Version: 0.7.11
Release: 4%{?dist}
Version: 1.0
Release: 1%{?dist}
Summary: Finds outdated running applications in your system
BuildArch: noarch
@ -29,10 +29,6 @@ URL: http://tracer-package.com/
# cd tracer
# tito build --tgz
Source0: %{name}-%{version}.tar.gz
# Fix a crash that can occur when tracer is run after package updates
# https://bugzilla.redhat.com/show_bug.cgi?id=2235578
# https://github.com/FrostyX/tracer/pull/199
Patch0: 199.patch
BuildRequires: asciidoc
BuildRequires: gettext
@ -76,11 +72,13 @@ BuildRequires: python2-psutil
BuildRequires: python2-six
BuildRequires: dbus-python
BuildRequires: python2-distro
BuildRequires: python2-backports-functools_lru_cache
Requires: dbus-python
Requires: python2-psutil
Requires: python2-future
Requires: python2-six
Requires: python2-distro
Requires: python2-backports-functools_lru_cache
Requires: %{name}-common = %{version}-%{release}
%if %{with suggest}
Suggests: python-argcomplete
@ -201,14 +199,23 @@ make DESTDIR=%{buildroot}%{_datadir} mo
%changelog
* Thu Sep 14 2023 Adam Williamson <awilliam@redhat.com> - 0.7.11-4
- Backport PR #199 to fix crash caused by using removed rpm Python API
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sun Jun 18 2023 Python Maint <python-maint@redhat.com> - 0.7.11-2
- Rebuilt for Python 3.12
* Fri Sep 15 2023 Jakub Kadlcik <frostyx@email.cz> 1.0-1
- Fix querying RPM files on EPEL7 (frostyx@email.cz)
- Use backported lru_cache on EPEL7 (frostyx@email.cz)
- Don't hang forever when executed via SSH (frostyx@email.cz)
- Don't check if package is installed before listing its files
(frostyx@email.cz)
- Replace regexes where they are not needed (frostyx@email.cz)
- Query all packages at once, its faster than one by one (frostyx@email.cz)
- Cache some properties for a massive performance boost (frostyx@email.cz)
- Refactor unnecessary condition (frostyx@email.cz)
- Fix weird indentation (frostyx@email.cz)
- Pass the whole application to the provided_by function, not just its name
(frostyx@email.cz)
- Stop using deprecated rpm.fi (frostyx@email.cz)
- Attempt to fix readthedocs deprecation error (frostyx@email.cz)
- More reliable check if /usr/lib/sysimage/dnf/ database should be used
(frostyx@email.cz)
* Sun Jun 18 2023 Jakub Kadlcik <frostyx@email.cz> 0.7.11-1
- Rather create a /run/reboot-required not /var/run/reboot-required