commit c2469f2
hovercats
·
2024-05-21 13:20:07 +0000 UTC
parent b4b011c
sbase: cp errors out when copying a symlink to a destination where it already exist. this affects mv and install aswell. for the most part, this is only an issue when kiss updates or reinstalls a package.
3 files changed,
+28,
-1
+1,
-0
1@@ -100,6 +100,7 @@
2 [submodule "pkg/sbase/src"]
3 path = pkg/sbase/src
4 url = https://github.com/michaelforney/sbase
5+ ignore = all
6 [submodule "pkg/sdhcp/src"]
7 path = pkg/sdhcp/src
8 url = https://github.com/michaelforney/sdhcp
1@@ -0,0 +1,26 @@
2+From 1becf15eefaf4c7b5ac650095e2af04d2902200c Mon Sep 17 00:00:00 2001
3+From: hovercats <hovercatswithlasereyes@protonmail.com>
4+Date: Mon, 23 Oct 2023 20:45:04 +0200
5+Subject: [PATCH] fnck.c: dont check if DEST is a symlink. kiss will error out
6+ when installing if symlinks for the package already exists.
7+
8+---
9+ libutil/fnck.c | 2 +-
10+ 1 file changed, 1 insertion(+), 1 deletion(-)
11+
12+diff --git a/libutil/fnck.c b/libutil/fnck.c
13+index 4f8875b..214b298 100644
14+--- a/libutil/fnck.c
15++++ b/libutil/fnck.c
16+@@ -10,7 +10,7 @@ fnck(const char *a, const char *b,
17+ struct stat sta, stb;
18+
19+ if (!stat(a, &sta)
20+- && !stat(b, &stb)
21++ && !lstat(b, &stb)
22+ && sta.st_dev == stb.st_dev
23+ && sta.st_ino == stb.st_ino) {
24+ weprintf("%s -> %s: same file\n", a, b);
25+--
26+2.45.1
27+
+1,
-1
1@@ -1 +1 @@
2-1b46d26362 r0
3+1b46d26362 r1