Skip to content

Commit

Permalink
Merge branch 'fix_repo2solv_with_busybox' into 'master'
Browse files Browse the repository at this point in the history
[libsolv] Fix repo2solv with BusyBox. Fixes JB#44370

See merge request mer-core/libsolv!6
  • Loading branch information
pvuorela committed Jan 21, 2019
2 parents c2582f7 + 38cb240 commit 145d3bf
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
30 changes: 30 additions & 0 deletions rpm/0001-Fix-repo2solv-to-work-with-Busybox-find-tool.patch
@@ -0,0 +1,30 @@
From d2783eab98a0363436c521a679b39070aa7a8a2c Mon Sep 17 00:00:00 2001
From: Pekka Vuorela <pekka.vuorela@jolla.com>
Date: Mon, 21 Jan 2019 16:45:04 +0200
Subject: [PATCH] Fix repo2solv to work with Busybox find tool

Got quite confused by "." as arg0. Added a new instance as first
real parameter as I could assume that being the original intention.
---
tools/repo2solv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/repo2solv.c b/tools/repo2solv.c
index e055e408..fb60884b 100644
--- a/tools/repo2solv.c
+++ b/tools/repo2solv.c
@@ -169,9 +169,9 @@ read_plaindir_repo(Repo *repo, const char *dir)
close(fds[1]);
}
if (recursive)
- execl("/usr/bin/find", ".", "-name", ".", "-o", "-name", ".*", "-prune", "-o", "-name", "*.delta.rpm", "-o", "-name", "*.patch.rpm", "-o", "-name", "*.rpm", "-a", "-type", "f", "-print0", (char *)0);
+ execl("/usr/bin/find", "/usr/bin/find", ".", "-name", ".", "-o", "-name", ".*", "-prune", "-o", "-name", "*.delta.rpm", "-o", "-name", "*.patch.rpm", "-o", "-name", "*.rpm", "-a", "-type", "f", "-print0", (char *)0);
else
- execl("/usr/bin/find", ".", "-maxdepth", "1", "-name", ".", "-o", "-name", ".*", "-prune", "-o", "-name", "*.delta.rpm", "-o", "-name", "*.patch.rpm", "-o", "-name", "*.rpm", "-a", "-type", "f", "-print0", (char *)0);
+ execl("/usr/bin/find", "/usr/bin/find", ".", "-maxdepth", "1", "-name", ".", "-o", "-name", ".*", "-prune", "-o", "-name", "*.delta.rpm", "-o", "-name", "*.patch.rpm", "-o", "-name", "*.rpm", "-a", "-type", "f", "-print0", (char *)0);
perror("/usr/bin/find");
_exit(1);
}
--
2.20.1

3 changes: 3 additions & 0 deletions rpm/libsolv.spec
Expand Up @@ -20,6 +20,8 @@ BuildRequires: swig
BuildRequires: cmake
BuildRequires: libxml2-devel

Patch1: 0001-Fix-repo2solv-to-work-with-Busybox-find-tool.patch

%description
A new approach to package dependency solving.

Expand Down Expand Up @@ -87,6 +89,7 @@ A new approach to package dependency solving.

%prep
%setup -q -n %{name}-%{version}/upstream
%patch1 -p1

%build
%cmake . \
Expand Down

0 comments on commit 145d3bf

Please sign in to comment.