Control: severity -1 normal
Control: tags -1 + patch

Hello maintainer of the 'pmount' Debian package, hello everybody else in
Cc.

I decided that [this bug] needs some love and deserves a fix once and
for all!

[this bug]: <https://bugs.debian.org/776240>

I looked at all the patches that have been proposed over 11 years (!)
and I combined them into one that works for me™.

The attached patch is intended to be directly applied to the installed
package, as in:

  # cd /
  # zstdcat /tmp/pmount_completion_v2.diff.zst | patch -p1 --dry-run
  # zstdcat /tmp/pmount_completion_v2.diff.zst | patch -p1

Obviously, in order to apply it to the Debian source package, paths
need to be adapted a little, but that's trivial to do.


The patch:

 * removes '/etc/bash_completion.d/pmount' entirely, since it is my
   understanding that placing completion scripts into that location is
   obsolete and/or deprecated

 * does not define mdir in the _pmount() function, since 'pmount' is
   used to mount removable devices, hence there's no point in searching among
   already-created mount points under /media

 * fixes the _pumount() function, by properly quoting (with
   double-quotes) the $mdir variable expansion in the sed expression,
   and by avoiding messing up with /dev, since you can just

      $ pumount my_key

    if you have some device mounted on /media/my_key (by pmount)

The patch also takes into account the [current] (well, sort of, it's
from 6 years ago...) upstream version of the completion script,
improving it.

[current]: 
<https://github.com/MisterDA/pmount/blob/b0bef3600f0cc08676c8bfed8102cd101da29e57/completions/bash/pmount>

This of course assumes that the new upstream project is actually 
Antonin "MisterDA" Décimo's [one] on GitHub, as stated in bug [#1065172]...

[one]: <https://github.com/MisterDA/pmount>
[#1065172]: <https://bugs.debian.org/1065172>

If this is really the case, then please forward the improvements
upstream, as well (by using the pmount completion script resulting from
my patch to create a GitHub PR against the upstream repository).


In any case, please apply my patch to the 'pmount' Debian source
package as soon as possible, in order to fix this bug once and for all.

Looking forward to seeing a fixed pmount bash completion in Debian!
Thanks for your time and dedication.



-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

Attachment: pmount_completion_v2.diff.zst
Description: application/zstd

Attachment: pgpQbLXR9nXKW.pgp
Description: PGP signature

Reply via email to