[rpmreaper] canonize also provided filenames for symlinked system dirs
Miroslav Lichvar
mlichvar at fedoraproject.org
Tue May 6 09:14:39 UTC 2014
commit 84a0e5627f802ee1d2ab5a28ad8bc5599275d5e2
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date: Tue May 6 11:07:27 2014 +0200
canonize also provided filenames for symlinked system dirs
rpmreaper-provfilename.patch | 22 ++++++++++++++++++++++
rpmreaper.spec | 2 ++
2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/rpmreaper-provfilename.patch b/rpmreaper-provfilename.patch
new file mode 100644
index 0000000..3c55820
--- /dev/null
+++ b/rpmreaper-provfilename.patch
@@ -0,0 +1,22 @@
+commit 13926c11f6b33aa1ade43dddfea194cb4210760b
+Author: Miroslav Lichvar <mlichvar at redhat.com>
+Date: Tue May 6 10:19:26 2014 +0200
+
+ canonize also provided filenames for symlinked system dirs
+
+ This is needed with packages which provide a filename in a symlinked
+ system dir, but don't include it.
+
+diff --git a/rpm.c b/rpm.c
+index 38bc26f..9f10ddb 100644
+--- a/rpm.c
++++ b/rpm.c
+@@ -124,6 +124,8 @@ static int rpm_read_provs(const struct repo *repo, struct pkgs *p, uint firstpid
+ provides = rpmdsNew(header, RPMTAG_PROVIDENAME, 0);
+ while (rpmdsNext(provides) != -1) {
+ prov = rpmdsN(provides);
++ if (prov[0] == '/')
++ prov = get_cpath(rd, prov);
+ provflags = rpmdsFlags(provides);
+ provver = rpmdsEVR(provides);
+ provflags &= RPMSENSE_LESS | RPMSENSE_GREATER |
diff --git a/rpmreaper.spec b/rpmreaper.spec
index 4e6139a..8f905e1 100644
--- a/rpmreaper.spec
+++ b/rpmreaper.spec
@@ -7,6 +7,7 @@ Group: Applications/System
License: GPLv2+
URL: https://fedorahosted.org/rpmreaper/
Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
+Patch1: rpmreaper-provfilename.patch
BuildRequires: ncurses-devel rpm-devel
Requires: less rpm
@@ -17,6 +18,7 @@ allows removing unnecessary packages and their dependencies from the system.
%prep
%setup -q
+%patch1 -p1 -b .provfilename
%build
make %{?_smp_mflags} EXTRA_CFLAGS="$RPM_OPT_FLAGS"
More information about the scm-commits
mailing list