A FIXED -> FIXED transition happens, e.g., here:
https://todo.sr.ht/~sircmpwn/meta.sr.ht/46#event-47525
because I fucked up a link and listed this one twice,
and Drew opened each link first, then closed them,
hence marking the ticket as FIXED twice
With this patch, we just do nothing if there's nothing to do
To reproduce, the setup:
* run todo.sr.ht-lmtp,
listen on sock=127.0.0.1:2525,
with posting-domain=todo.nabijaczleweli.xyz
* register users:
+ ~nabijaczleweli <nabijaczleweli/srht/test@nabijaczleweli.xyz>
+ ~nabijaczleweli2 <nabijaczleweli/srht/test2@nabijaczleweli.xyz>
* create tracker "~nabijaczleweli/test", potentially unsubscribe
* do not subscribe ~nabijaczleweli2 to that tracker
Now, run
-- >8 --
$ telnet 127.0.0.1 2525
ehlo owo
mail from:<nabijaczleweli/srht/test2@nabijaczleweli.xyz>
rcpt to:<~nabijaczleweli/test@todo.nabijaczleweli.xyz>
data
From: nabijaczleweli/srht/test2@nabijaczleweli.xyz
To: ~nabijaczleweli/test@todo.nabijaczleweli.xyz
Subject: Repro
This will not be delivered to nabijaczleweli2
.
quit
-- >8 --
If you didn't unsubscribe, ~nabijaczleweli will get the e-mail;
either way, ~nabijaczleweli2 won't receive it.
This goes against the intent of 6599be5371
This happens because in submit_ticket() tracker.subscriptions is either
empty or contains just ~nabijaczleweli; concatenating it with
ticket.subscriptions allows picking up the potential new sub created by
get_or_create_subscription().
With this patch, delivering that same mail will also notify
~nabijaczleweli2.
This fixes the problem described in
https://lists.sr.ht/~sircmpwn/sr.ht-dev/%3C20200714151756.gxmowmpohmtps76h@tarta.local.nabijaczleweli.xyz%3E
importlib.resources will guarantee to find any importable module, and
check that the resource ('Makefile') can be found within it.
This lets us get rid of the current getsitepackages() hack and
environment variable fallback, which is both verbose and badly handles
some edge cases when installing modules, and instead use the recommended
way to find data files shipped with a python module.