Benjamin Kästner
unread,Dec 14, 2020, 4:00:03 PM12/14/20You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Package: rmlint
Version: 2.8.0-3
Severity: normal
Tags: patch
Dear Maintainer,
rmlint's shell script template lib/formats/sh.sh contains `original_check', a function that checks whether the original has changed when option "-p" is used.
However, the result of the check is discarded, as `original_check's last if clause is missing a `return ERR_VAL'. This has been fixed upstream in version 2.10.1 by b9d328be2041e42813119d060c86893853b8e250.
Here's a simple test scenario:
$ mkdir test && cd test
$ echo hi > hello
$ cp hello world # files are the same
$ rmlint . # rmlint finds duplicate
$ echo world > world
$ diff hello world
1c1
< hi
---
> world
$ ./rmlint.sh -d -p
$ ls
hello rmlint.json
According to the shell script's documentation and output, -p should keep both "hello" and "world". However, after the steps above, "world" is gone. While the script's output says its "cancelling", the files are gone for
good.
Given that this might lead to data loss, I'm not sure whether "normal" is the correct severity, but this is my first bug report on Debian. The attached patch is the second half of upstream's b9d328be2041e42813119d060c86893853b8e250.
-- System Information:
Debian Release: 10.7
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-13-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages rmlint depends on:
ii libblkid1 2.33.1-0.1
ii libc6 2.28-10
ii libelf1 0.176-1.1
ii libglib2.0-0 2.58.3-2+deb10u2
ii libjson-glib-1.0-0 1.4.4-2
Versions of packages rmlint recommends:
pn rmlint-gui <none>
Versions of packages rmlint suggests:
pn rmlint-doc <none>
-- no debconf information