diff options
author | Dmitry Bogatov <KAction@debian.org> | 2019-05-28 04:35:57 +0000 |
---|---|---|
committer | Dmitry Bogatov <KAction@debian.org> | 2019-05-28 04:36:07 +0000 |
commit | 9896a453b092edfc871450389569315ef72fd767 (patch) | |
tree | e3e6d46fcdd0e5ca7bd660847fc8cda0951cfa89 | |
parent | cb411affcbc2eb183ee5f35e50c3863c0b94f98a (diff) |
Change path of "noreplace" flag file
First of all, "noreplace" flag file is architecture-independent and is
not meant to be edited by system administrator, so it does not belong to
/var.
New namings scheme provides more options for extensibility, i.e
introducing more flag files. While it is definitely not good thing to
have, it seems, unfortunately, necessary to support, e.g
uninstalled-not-purged situation.
-rwxr-xr-x | dh_runit | 4 | ||||
-rw-r--r-- | t/928935.t | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -62,8 +62,8 @@ PKG: foreach my $pkg (@{$dh{DOPACKAGES}}) { | |||
62 | my $name = $conf->{name} || basename($path); | 62 | my $name = $conf->{name} || basename($path); |
63 | 63 | ||
64 | if ($conf->{noreplace}) { | 64 | if ($conf->{noreplace}) { |
65 | make_path("${tmp}/var/lib/runit/noreplace/"); | 65 | make_path("${tmp}/usr/share/runit/meta/${name}/"); |
66 | open(my $fh, ">", "${tmp}/var/lib/runit/noreplace/${name}") | 66 | open(my $fh, ">", "${tmp}/usr/share/runit/meta/${name}/noreplace") |
67 | || die $!; | 67 | || die $!; |
68 | close($fh); | 68 | close($fh); |
69 | } | 69 | } |
@@ -6,5 +6,5 @@ use T; | |||
6 | 6 | ||
7 | system_ok('dh_runit', 'debian/test.runscript', 'name=test,noreplace'); | 7 | system_ok('dh_runit', 'debian/test.runscript', 'name=test,noreplace'); |
8 | 8 | ||
9 | my $noreplace = 'debian/dh-runit-test/var/lib/runit/noreplace/test'; | 9 | my $noreplace = 'debian/dh-runit-test/usr/share/runit/meta/test/noreplace'; |
10 | ok(-f $noreplace, 'noreplace file correctly created'); | 10 | ok(-f $noreplace, 'noreplace file correctly created'); |