Skip to content
Snippets Groups Projects
Verified Commit adf42961 authored by Daniel M. Capella's avatar Daniel M. Capella
Browse files

pacdiff: Restore behavior for mlocate

Presuming splitting mlocate calls into multiple invocations slows it
down.
parent b0558b92
No related branches found
Tags v20201112.0.8839
No related merge requests found
Pipeline #93719 passed
......@@ -126,7 +126,7 @@ else
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
fi
if ! type -P fakeroot >/dev/null; then
if ! type -p fakeroot >/dev/null; then
die 'Cannot find the fakeroot binary'
fi
......
......@@ -215,10 +215,14 @@ merge_file() {
cmd() {
if (( USE_LOCATE )); then
# GL-125: We call locate separately for each pattern for compatibility with plocate.
for p in \*.pacnew \*.pacorig \*.pacsave '*.pacsave.[0-9]*'; do
locate -0 -e -b "$p"
done
# plocate searches for files that match all patterns whereas mlocate searches for files that match one or more patterns
if type -p plocate >/dev/null; then
for p in \*.pacnew \*.pacorig \*.pacsave '*.pacsave.[0-9]*'; do
locate -0 -e -b "$p"
done
else
locate -0 -e -b \*.pacnew \*.pacorig \*.pacsave '*.pacsave.[0-9]*'
fi
elif (( USE_FIND )); then
find "$diffsearchpath" \( -name \*.pacnew -o -name \*.pacorig -o -name \*.pacsave -o -name '*.pacsave.[0-9]*' \) -print0
elif (( USE_PACDB )); then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment