Hi,
I did a quick test with the following changes to deb-systemd-helper
--- deb-systemd-helper.dist 2015-02-14 10:38:45.058351945 +0100
+++ deb-systemd-helper 2015-02-14 11:10:24.550995696 +0100
@@ -325,7 +325,7 @@
if (is_purge() || -l $link) {
my $link_state = $link;
$link_state =~ s,^/etc/systemd/system/,$enabled_state_dir/,;
- unlink($link_state);
+ unlink($link_state) if -l $link_state;
}
next unless -l $link;
@@ -386,8 +386,12 @@
}
make_path(dirname($mask_link));
- symlink('/dev/null', $mask_link) or
- error("unable to link $mask_link to /dev/null: $!");
+ if (-l $mask_link) {
+ debug "$mask_link exists";
+ unlink ($mask_link) or error("unable to unlink $mask_link: $!");
+ }
+ symlink("/dev/null", $mask_link) or
+ error("unable to link $mask_link to /dev/null: $!");
$changed_sth = 1;
my $statefile = $mask_link;
Now the openntpd package purged. I do not know if this is a correct fix or
if something else is needed.
/Jörgen
On Wed, Jan 14, 2015 at 9:09 PM, Dererk <[email protected]> wrote:
> On 11/01/15 14:01, Jörgen Tegnér wrote:
> > Package: openntpd
> > Version: 20080406p-10
> > Severity: normal
> >
> > Dear Maintainer,
> >
> > *** Reporter, please consider answering these questions, where
> appropriate ***
> >
> > * What led up to the situation?
> > I wished to use ntpd instead of openntpd
> > * What exactly did you do (or not do) that was effective (or
> > ineffective)?
> > apt-get purge openntpd
> > * What was the outcome of this action?
> > #aot-get purge openntpd
> > ....
> > 0 upgraded, 0 newly installed, 1 to remove and 559 not upgraded.
> > 1 not fully installed or removed.
> > After this operation, 201 kB disk space will be freed.
> > Do you want to continue? [Y/n]
> > (Reading database ... 263377 files and directories currently installed.)
> > Removing openntpd (20080406p-10) ...
> > /usr/bin/deb-systemd-helper: error: unable to link
> /etc/systemd/system/openntpd.service to /dev/null: File exists
> > dpkg: error processing package openntpd (--remove):
> > subprocess installed post-removal script returned error exit status 1
> > Errors were encountered while processing:
> > openntpd
> > E: Sub-process /usr/bin/dpkg returned an error code (1)
> > * What outcome did you expect instead?
> > package purged
> > *** End of the template - remove these template lines ***
> >
> Hi JörgenTegnér!
>
> Thanks for contributing and reporting this issue!
>
> At first glance, It appears to be an issue with the dh_systemd helpers
> at postrm scripts, let me dig a little bit into it and confirm.
>
>
> Thanks,
>
> Dererk
>
> --
> BOFH excuse #55:
>
> Plumber mistook routing panel for decorative wall fixture
>
>
>