Bug#797108: init-system-helpers: deb-systemd-helper doesn't remove old links when changing WantedBy= at package upgrade

Felipe Sateler fsateler at debian.org
Fri Aug 28 13:32:42 BST 2015


On 28 August 2015 at 08:28, Christian Seiler <christian at iwakd.de> wrote:
> On 28.08.2015 04:39, Felipe Sateler wrote:
>> On 27 August 2015 at 17:19, Christian Seiler <christian at iwakd.de> wrote:
>>> I've also attached a trivial package in two versions to test this.
>>> They change all 3 options (WantedBy=, Also= and Alias=) to test
>>> everything at the same time. Just extract the source tarballs and
>>> build the native packages if you want to test this.
>>
>> The test packages only have test-changes.service differ, the other 2
>> are the same in both versions...
>
> Yes, sure. But the original service changes all three settings - so
> I can see that all of them are affected. I only include the two
> services to make sure I can change Also=, otherwise I wouldn't have
> included them.
>
>> But I checked that the link is removed if it was existing, a new one I
>> created is preserved, and if I remove an enable link, then the
>> disabled state is preserved to the new name (ie, when moving from
>> targetA to targetB if I disable in targetA then it won't be enabled in
>> targetB).
>
> :-)
>
>> However, (and I don't know if this is new or not), the state does not
>> seem to be removed on package purge: I removed a target, purged the
>> package, then reinstalled the package and the enable link was not
>> generated.
>
> That shouldn't happen. I've just tried in a Jessie VM to just
> install testpkg_42, remove one of the WantedBy= links, purge it,
> install it again - and then everything was recreated as expected.
> On the other hand, I don't remember what you're describing while
> I was testing this, so I'll look into it and try to reproduce
> (and if I can, fix it). I'll probably get back to you tomorrow
> on that, since I'm a bit busy today.

FWIW, I tried to test what happens if a service has more than one
WantedBy target, and only one of those was removed by the admin, and
the new package uses a different 2 targets.

Now I need to clean up manually in order to do more tests

-- 

Saludos,
Felipe Sateler




More information about the Pkg-systemd-maintainers mailing list