Executive summary:

    All the tests passed when run as a normal user.  Some new bugs:

    1. No error message when removing a non-existent path
    1B. No warning message when adding a existing path
    2. No escaping of non-printable chars in path names

Using the clear directions from Alessandro I installed the resolute-
proposed localsearch on my desktop:

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 26.04.1 LTS
Release:        26.04
Codename:       resolute

# cat << EOF | tee /etc/apt/sources.list.d/proposed.sources
Types: deb
URIs: http://archive.ubuntu.com/ubuntu
Suites: $(. /etc/os-release && echo $VERSION_CODENAME)-proposed
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
EOF

# apt update

# apt install -t resolute-proposed localsearch
Upgrading:
  localsearch                   localsearch-extractor-iso
  localsearch-extractor-ffmpeg  localsearch-extractor-office

Summary:
  Upgrading: 4, Installing: 0, Removing: 0, Not Upgrading: 109
  Download size: 490 kB
  Space needed: 12.3 kB / 33.7 GB available

Continue? [Y/n] y

# ls -lct /usr/bin/localsearch
-rwxr-xr-x 1 root root 115936 Oct 12 22:39 /usr/bin/localsearch

# localsearch --version
LocalSearch 3.11.2
This program is free software and comes without any warranty.
It is licensed under version 2 or later of the General Public License which can
be viewed at:
  http://www.gnu.org/licenses/gpl.txt

*** Test #2: Trying --add as root fails: ***

# mkdir -p /tmp/sru-2164265
# localsearch index --add --recursive /tmp/sru-2164265

(localsearch index:48221): dconf-WARNING **: 22:41:36.207: failed to
commit changes to dconf: The connection is closed

# localsearch index
Path                                                         Recursive
/home/idallen                                                *

*** Test #2 again: Trying --add as me (idallen) succeeds: ***

$ localsearch index --add --recursive /tmp/sru-2164265
$ localsearch index
Path                                                         Recursive
/home/idallen                                                *
/tmp/sru-2164265                                             *

*** Test #3,#4: Trying --remove as me (idallen) succeeds: ***

$ pkill -x dconf-service
$ localsearch index --remove /tmp/sru-2164265
$ localsearch index
Path                                                         Recursive
/home/idallen                                                *

*** New Bug #1: Using --remove on a non-existent path gives no error:
***

$ localsearch index --remove /tmp/sru-2164265
$ localsearch index --remove /tmp/sru-2164265
$ localsearch index --remove /tmp/sru-2164265
$ localsearch index --remove /tmp/sru-2164265
$ localsearch index --remove /tmp/sru-2164265
$ localsearch index --remove /tmp/sru-2164265

*** New Bug #1B: Adding an already-existing path gives no warning: ***

$ localsearch index --add /tmp/sru-2164265
$ localsearch index --add /tmp/sru-2164265
$ localsearch index --add /tmp/sru-2164265
$ localsearch index --add /tmp/sru-2164265
$ localsearch index --add /tmp/sru-2164265
$ localsearch index --add /tmp/sru-2164265
$ localsearch index --add /tmp/sru-2164265
$ localsearch index --add /tmp/sru-2164265

*** Test #5: Trying the loop succeeds: ***

    for i in $(seq 20); do
      localsearch index --add --recursive /tmp/sru-2164265 >/dev/null
      pkill -x dconf-service
      localsearch index --remove /tmp/sru-2164265
      localsearch index | grep -q sru-2164265 && echo "LOST $i"
    done
Good: no output

*** Test #6: Regression check works: ***

$ gsettings set org.freedesktop.Tracker3.Miner.Files \
  index-recursive-directories "['\$HOME', '&DOWNLOAD', '/tmp/sru-2164265']"
$ localsearch index
Path                                                         Recursive
/home/idallen                                                *
/home/idallen/Downloads                                      *
/tmp/sru-2164265                                             *

$ localsearch index --remove /home/idallen/Downloads
$ localsearch index --remove /tmp/sru-2164265

$ localsearch index
Path                                                         Recursive
/home/idallen                                                *

*** New Bug #2: localsearch doesn't make special characters in paths
visible (e.g. LF,BEL): ***

$ NEWLINE=$(printf "\n")
$ gsettings set org.freedesktop.Tracker3.Miner.Files \
  index-recursive-directories "['\$HOME', '/tmp/sru-2164265${NEWLINE}']"
$ gsettings get org.freedesktop.Tracker3.Miner.Files \
  index-recursive-directories
['$HOME', '/tmp/sru-2164265\n']
$ localsearch index
Path                                                         Recursive
/home/idallen                                                *
/tmp/sru-2164265
                                            *

$ BEL=$(printf "\a")
$ gsettings set org.freedesktop.Tracker3.Miner.Files \
  index-recursive-directories "['\$HOME', '/tmp/sru-2164265${BEL}']"
$ gsettings get org.freedesktop.Tracker3.Miner.Files \
  index-recursive-directories
['$HOME', '/tmp/sru-2164265\a']
$ localsearch index
Path                                                         Recursive
/home/idallen                                                *
/tmp/sru-2164265                                            *

Not escaping non-printing characters makes displaying and removing paths
difficult.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2164265

Title:
  [SRU] localsearch index --remove silently discards the removal when
  dconf-service is not already running

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/localsearch/+bug/2164265/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to