Patchwork [1/3] package/parted: relax dependency on lvm2

login
register
mail settings
Submitter Yann E. MORIN
Date Dec. 6, 2013, 7:57 p.m.
Message ID <7340e9cea0b72ac4dbee99d523196cd59281cf87.1386359706.git.yann.morin.1998@free.fr>
Download mbox | patch
Permalink /patch/298235/
State Accepted
Commit b1f2cbb40950a73741dfa578f43f2a5e88cdd953
Headers show

Comments

Yann E. MORIN - Dec. 6, 2013, 7:57 p.m.
From: "Yann E. MORIN" <yann.morin.1998@free.fr>

parted can be configured without support for LVM volumes, so
we can relax the dependency on lvm2, and make it an optional
feature.

Remove now no-longer needed dependency on MMU because of lvm2.

(Based on a code-snippet from Thomas.)

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/parted/Config.in | 3 ---
 package/parted/parted.mk | 9 ++++++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

Patch

diff --git a/package/parted/Config.in b/package/parted/Config.in
index 8af2693..321fdf7 100644
--- a/package/parted/Config.in
+++ b/package/parted/Config.in
@@ -2,8 +2,6 @@  config BR2_PACKAGE_PARTED
 	bool "parted"
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
-	depends on BR2_USE_MMU # lvm2
-	select BR2_PACKAGE_LVM2
 	select BR2_PACKAGE_READLINE
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
@@ -13,5 +11,4 @@  config BR2_PACKAGE_PARTED
 	  http://www.gnu.org/software/parted/
 
 comment "parted needs a toolchain w/ largefile, wchar"
-	depends on BR2_USE_MMU
 	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
diff --git a/package/parted/parted.mk b/package/parted/parted.mk
index 773e332..231ab35 100644
--- a/package/parted/parted.mk
+++ b/package/parted/parted.mk
@@ -7,9 +7,16 @@ 
 PARTED_VERSION = 3.1
 PARTED_SOURCE = parted-$(PARTED_VERSION).tar.xz
 PARTED_SITE = $(BR2_GNU_MIRROR)/parted
-PARTED_DEPENDENCIES = readline util-linux lvm2
+PARTED_DEPENDENCIES = readline util-linux
 PARTED_INSTALL_STAGING = YES
 PARTED_LICENSE = GPLv3+
 PARTED_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_LVM2),y)
+PARTED_DEPENDENCIES += lvm2
+PARTED_CONF_OPT += --enable-device-mapper
+else
+PARTED_CONF_OPT += --disable-device-mapper
+endif
+
 $(eval $(autotools-package))