diff mbox

[06/16] package/dosfstools: add missing symlinks

Message ID 1421684056-5266-7-git-send-email-maxtram95@gmail.com
State Accepted
Headers show

Commit Message

Maxim Mikityanskiy Jan. 19, 2015, 4:14 p.m. UTC
Install alternative symlinks for dosfstools mkfs.fat, fsck.fat and
fatlabel. Those symlinks are generally installed by make install, but
buildroot does not use make install for dosfstools, but symlinks should
be installed anyway.

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
---
 package/dosfstools/dosfstools.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Samuel Martin Feb. 2, 2015, 4:22 p.m. UTC | #1
On Mon, Jan 19, 2015 at 5:14 PM, Maxim Mikityanskiy <maxtram95@gmail.com> wrote:
> Install alternative symlinks for dosfstools mkfs.fat, fsck.fat and
> fatlabel. Those symlinks are generally installed by make install, but
> buildroot does not use make install for dosfstools, but symlinks should
> be installed anyway.
>
> Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>

Reviewed-by: Samuel Martin <s.martin49@gmail.com>

Regards,
Thomas Petazzoni March 8, 2015, 10:04 p.m. UTC | #2
Dear Maxim Mikityanskiy,

On Mon, 19 Jan 2015 18:14:06 +0200, Maxim Mikityanskiy wrote:
> Install alternative symlinks for dosfstools mkfs.fat, fsck.fat and
> fatlabel. Those symlinks are generally installed by make install, but
> buildroot does not use make install for dosfstools, but symlinks should
> be installed anyway.
> 
> Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>

Thanks, I've applied your patch, but I've basically rewritten entirely
the installation logic to use makefile code instead of shell code. See
http://git.buildroot.net/buildroot/commit/?id=cef6a787cad4d5417b8672c8fd4c200bf29655ac.

To be honest, I wonder why dosfstools provides such sub-options to
select which binaries should be installed. The binaries are really
small:

-rwxr-xr-x 1 thomas thomas 40780 mars   8 22:59 fatlabel
-rwxr-xr-x 1 thomas thomas 42816 mars   8 22:59 fsck.fat
-rwxr-xr-x 1 thomas thomas 24432 mars   8 22:59 mkfs.fat

So I believe we could probably just install all of them unconditionally.

But oh, well, this is for another patch.

Thanks!

Thomas
diff mbox

Patch

diff --git a/package/dosfstools/dosfstools.mk b/package/dosfstools/dosfstools.mk
index a9d8392..f768c97 100644
--- a/package/dosfstools/dosfstools.mk
+++ b/package/dosfstools/dosfstools.mk
@@ -37,6 +37,19 @@  define DOSFSTOOLS_INSTALL_TARGET_CMDS
 	test -z "$(DOSFSTOOLS_INSTALL_BIN_FILES_y)" || \
 	$(INSTALL) -m 755 $(addprefix $(@D)/,$(DOSFSTOOLS_INSTALL_BIN_FILES_y)) \
 		$(TARGET_DIR)/sbin/
+	if [[ "$(BR2_PACKAGE_DOSFSTOOLS_FATLABEL)" = y ]]; then \
+		ln -fs fatlabel $(TARGET_DIR)/sbin/dosfslabel; \
+	fi
+	if [[ "$(BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT)" = y ]]; then \
+		ln -fs fsck.fat $(TARGET_DIR)/sbin/dosfsck; \
+		ln -fs fsck.fat $(TARGET_DIR)/sbin/fsck.msdos; \
+		ln -fs fsck.fat $(TARGET_DIR)/sbin/fsck.vfat; \
+	fi
+	if [[ "$(BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT)" = y ]]; then \
+		ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkdosfs; \
+		ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkfs.msdos; \
+		ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkfs.vfat; \
+	fi
 endef
 
 define HOST_DOSFSTOOLS_BUILD_CMDS