Fix "Failed to add path to set" error during nixos-rebuild
This commit is contained in:
parent
29aa7abe87
commit
a4cd5afd03
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0cgnnl6kqaz3als5y9g8jvsvbs4c8ccp0vl4s1g8rwk69w2cwxd2";
|
sha256 = "0cgnnl6kqaz3als5y9g8jvsvbs4c8ccp0vl4s1g8rwk69w2cwxd2";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./reexec.patch ];
|
patches = [ ./reexec.patch ./ignore-duplicates.patch ];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ pkgconfig intltool gperf libcap dbus kmod xz pam acl
|
[ pkgconfig intltool gperf libcap dbus kmod xz pam acl
|
||||||
|
20
pkgs/os-specific/linux/systemd/ignore-duplicates.patch
Normal file
20
pkgs/os-specific/linux/systemd/ignore-duplicates.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
Ignore duplicate paths in "systemctl start".
|
||||||
|
|
||||||
|
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||||
|
index a4290c4..d3ac3ad 100644
|
||||||
|
--- a/src/systemctl/systemctl.c
|
||||||
|
+++ b/src/systemctl/systemctl.c
|
||||||
|
@@ -1596,8 +1596,11 @@ static int start_unit_one(
|
||||||
|
|
||||||
|
r = set_put(s, p);
|
||||||
|
if (r < 0) {
|
||||||
|
- log_error("Failed to add path to set.");
|
||||||
|
- return r;
|
||||||
|
+ free(p);
|
||||||
|
+ if (r != -EEXIST) {
|
||||||
|
+ log_error("Failed to add path %s to set.", p);
|
||||||
|
+ return r;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
p = NULL;
|
Loading…
x
Reference in New Issue
Block a user