linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/2] f2fs-tools: delete only if the libf2fs_format.so* exists
@ 2025-05-08 12:42 Jianan Huang via Linux-f2fs-devel
  2025-05-08 12:42 ` [f2fs-dev] [PATCH 2/2] f2fs-tools: clean up dump.f2fs etc. when uninstall Jianan Huang via Linux-f2fs-devel
  2025-05-09  6:18 ` [f2fs-dev] [PATCH 1/2] f2fs-tools: delete only if the libf2fs_format.so* exists Chao Yu via Linux-f2fs-devel
  0 siblings, 2 replies; 4+ messages in thread
From: Jianan Huang via Linux-f2fs-devel @ 2025-05-08 12:42 UTC (permalink / raw)
  To: jaegeuk, chao; +Cc: wanghui33, linux-f2fs-devel

Otherwise we will get the following error when executing make uninstall:

make  uninstall-hook
make[2]: Entering directory '/home/huangjianan/code/f2fs-tools/mkfs'
rm /usr/local/lib/libf2fs_format.so*
rm: cannot remove '/usr/local/lib/libf2fs_format.so*': No such file or directory
make[2]: *** [Makefile:827: uninstall-hook] Error 1
make[2]: Leaving directory '/home/huangjianan/code/f2fs-tools/mkfs'
make[1]: *** [Makefile:790: uninstall-am] Error 2
make[1]: Leaving directory '/home/huangjianan/code/f2fs-tools/mkfs'
make: *** [Makefile:418: uninstall-recursive] Error 1

Fixes: b067004c92dc ("add configure option --with-root-libdir")
Signed-off-by: Jianan Huang <huangjianan@xiaomi.com>
---
 mkfs/Makefile.am | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mkfs/Makefile.am b/mkfs/Makefile.am
index bfffd88..fb7bce8 100644
--- a/mkfs/Makefile.am
+++ b/mkfs/Makefile.am
@@ -27,4 +27,6 @@ install-exec-hook:
 	fi
 
 uninstall-hook:
-	rm $(DESTDIR)$(root_libdir)/libf2fs_format.so*
+	if test -f "$(DESTDIR)$(root_libdir)/libf2fs_format.so*"; then \
+		rm $(DESTDIR)$(root_libdir)/libf2fs_format.so*; \
+	fi
\ No newline at end of file
-- 
2.43.0



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-09  6:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08 12:42 [f2fs-dev] [PATCH 1/2] f2fs-tools: delete only if the libf2fs_format.so* exists Jianan Huang via Linux-f2fs-devel
2025-05-08 12:42 ` [f2fs-dev] [PATCH 2/2] f2fs-tools: clean up dump.f2fs etc. when uninstall Jianan Huang via Linux-f2fs-devel
2025-05-09  6:22   ` Chao Yu via Linux-f2fs-devel
2025-05-09  6:18 ` [f2fs-dev] [PATCH 1/2] f2fs-tools: delete only if the libf2fs_format.so* exists Chao Yu via Linux-f2fs-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).