Bug#800388: PathChanged triggers too early, not just when file is closed
Joachim Breitner
nomeata at debian.org
Mon Sep 28 19:51:11 BST 2015
Hi,
Am Montag, den 28.09.2015, 20:27 +0200 schrieb Joachim Breitner:
> local-apt-repository ships with the following file:
>
> $ cat /lib/systemd/system/local-apt-repository.path
> [Path]
> PathChanged=/srv/local-apt-repository
>
> [Install]
> WantedBy=paths.target
>
> If a process opens a not-yet-existing file in /srv/local-apt-repository,
> starts writing and eventually closes it that systemd would activate the
> corresponding service only after the close – at least that is my reading
> of systemd.path(5).
>
> This can be reproduced by installing local-apt-repository, and running
>
> $ pv -L 100 < .../some.deb > /srv/local-apt-repository/some.deb
>
> and observing in the journal that dpkg-deb complains about an invalid
> file.
>
> Is the documentation misleading me here, or is there a bug?
>
> If it is not a bug: Would it be possible to provide the behaviour that
> was hoping for here?
I should add that it seems that changing an _existing_ file does, as
documented, not cause the trigger to fire, only the creation of a new
file. So I would assume that it is actually the change to the directory
that causes the unwanted, first firing. Not sure if this is even
fixable, i.e. whether systemd can detect that a newly created file was
just opened for writing.
Greetings,
Joachim
--
--
Joachim "nomeata" Breitner
Debian Developer
nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: F0FBF51F
JID: nomeata at joachim-breitner.de | http://people.debian.org/~nomeata
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150928/4d33c763/attachment-0002.sig>
More information about the Pkg-systemd-maintainers
mailing list