Bug#1004333: deb-systemd-helper does not recognize purged package
Marc Haber
mh+debian-bugs at zugschlus.de
Tue Jan 25 08:52:36 GMT 2022
retitle -1 please consider more debugging in state file handling
severity -1 minor
thanks
Turns out that it was an issue in the test system.
Please, however, consider adding a bit more debugging and error
processing. Here is the patch that I used to debug this. This is clearly
not suitable for the release code, but I think you get the idea
--- /usr/bin/deb-systemd-helper 2021-11-01 15:05:55.000000000 +0100
+++ /home/mh/deb-systemd-helper 2022-01-25 00:14:53.235498204 +0100
@@ -464,12 +464,17 @@
my $statefile = $mask_link;
$statefile =~ s,^/etc/systemd/$instance/,$masked_state_dir/,;
+ debug "statefile $statefile.";
# Store the fact that we masked this service, so that we can unmask it on
# installation time. We cannot unconditionally unmask because that would
# interfere with the user’s decision to mask a service.
- make_path(dirname($statefile));
- open(my $fh, '>>', $statefile);
+ debug "dirname statefile ". dirname($statefile);
+ system("ls -l ". dirname($statefile));
+ if (! -e dirname($statefile)) {
+ make_path(dirname($statefile)) or die "cannot make_path: $!";
+ }
+ open(my $fh, '>>', $statefile) or die "cannot open: $!";
close($fh);
}
Retitling and resetting severity.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
More information about the Pkg-systemd-maintainers
mailing list