diff options
author | James Knight <james.knight@rockwellcollins.com> | 2015-10-28 17:36:26 -0400 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-11-04 22:48:00 +0100 |
commit | 9a9950dba81eb1ec25ac98080d2b5ab764b704f7 (patch) | |
tree | 0f38e7961e7b8e16fa79df452f879f8523585636 /package/e2fsprogs | |
parent | f700463c66376283ab4bffc391209bf20c63088d (diff) |
e2fsprogs: prevent undesired cleanup with a usr merged target
The following commit prevents the e2fsprogs package from inadvertently
removing its own binaries when a target includes BusyBox and is
targeting a usr-merged environment.
While an action has been added to cleanup BusyBox-provided (if any)
ext2-related tools when including e2fsprogs, the action will delete
desired e2fsprogs binaries in an already prepared usr-merged target.
Adjusting the cleanup to occur before installing e2fsprogs binaries so
that if a usr-merged target exists, it will first delete the previous
binaries (if any) followed by installing new binaries.
Signed-off-by: James Knight <james.knight@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/e2fsprogs')
-rw-r--r-- | package/e2fsprogs/e2fsprogs.mk | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk index 178372b2a..4b81b4473 100644 --- a/package/e2fsprogs/e2fsprogs.mk +++ b/package/e2fsprogs/e2fsprogs.mk @@ -106,9 +106,16 @@ ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK),y) E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_E2FSCK_SYMLINKS endif -# Remove busybox tune2fs and e2label, since we want the e2fsprogs full -# blown variants to take precedence, but they are not installed in the -# same location. +# If BusyBox is included, its configuration may supply its own variant +# of ext2-related tools. Since Buildroot desires having full blown +# variants take precedence (in this case, e2fsprogs), we want to remove +# BusyBox's variant of e2fsprogs provided binaries. e2fsprogs targets +# /usr/{bin,sbin} where BusyBox targets /{bin,sbin}. We will attempt to +# remove BusyBox-generated ext2-related tools from /{bin,sbin}. We need +# to do this in the pre-install stage to ensure we do not accidentally +# remove e2fsprogs's binaries in usr-merged environments (ie. if they +# are removed, they would be re-installed in this package's install +# stage). ifeq ($(BR2_PACKAGE_BUSYBOX),y) E2FSPROGS_DEPENDENCIES += busybox @@ -119,7 +126,7 @@ define E2FSPROGS_REMOVE_BUSYBOX_APPLETS $(RM) -f $(TARGET_DIR)/sbin/tune2fs $(RM) -f $(TARGET_DIR)/sbin/e2label endef -E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_REMOVE_BUSYBOX_APPLETS +E2FSPROGS_PRE_INSTALL_TARGET_HOOKS += E2FSPROGS_REMOVE_BUSYBOX_APPLETS endif define E2FSPROGS_TARGET_TUNE2FS_SYMLINK |