Skip to contentSkip to conversation

kbd: fix target install

PATCH New Niels Skou Olsen 2 participants 3 messages Mar 12, 2016 – Mar 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbd: fix target install

The package makefile fails to append to the KBD_INSTALL_TARGET_OPTS variable in autotools-package. This means that the DESTDIR and install target are lost, and so the package is never installed to target.

To fix it the append must happen after the eval of autotools-package.

---
 package/kbd/kbd.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/kbd/kbd.mk +3 -2
index 9dabce1..72519ff 100644
@@ -17,6 +17,7 @@ KBD_LICENSE = GPLv2+
 KBD_LICENSE_FILES = COPYING
 KBD_AUTORECONF = YES
 
-KBD_INSTALL_TARGET_OPTS += MKINSTALLDIRS=$(@D)/config/mkinstalldirs
-
 $(eval $(autotools-package))
+
+# must happen after the autotools-package eval, or else the append becomes an overwrite
+KBD_INSTALL_TARGET_OPTS += MKINSTALLDIRS=$(@D)/config/mkinstalldirs
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 kbd: fix target install

Niel, All,

On 2016-03-12 13:43 +0100, Niels Skou Olsen spake thusly:

Quoted 16 lines

The package makefile fails to append to the KBD_INSTALL_TARGET_OPTS variable in autotools-package. This means that the DESTDIR and install target are lost, and so the package is never installed to target.

To fix it the append must happen after the eval of autotools-package.

---
 package/kbd/kbd.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/kbd/kbd.mk +0 -0
index 9dabce1..72519ff 100644

package/kbd/kbd.mk KBD_LICENSE = GPLv2+ · line 23

Quoted 9 lines
package/kbd/kbd.mk +3 -2
@@ -17,6 +17,7 @@ KBD_LICENSE = GPLv2+
 KBD_LICENSE_FILES = COPYING
 KBD_AUTORECONF = YES
 
-KBD_INSTALL_TARGET_OPTS += MKINSTALLDIRS=$(@D)/config/mkinstalldirs
-
 $(eval $(autotools-package))
+
+# must happen after the autotools-package eval, or else the append becomes an overwrite
+KBD_INSTALL_TARGET_OPTS += MKINSTALLDIRS=$(@D)/config/mkinstalldirs

We don;t usually do that.

Instead, when the package does not behave properly, we prefer to override all of it, like, for example, in the rpm package:

    KBD_INSTALL_TARGET_OPTS = \
        DESTDIR=$(TARGET_DIR)/usr \
        MKINSTALLDIRS=$(@D)/config/mkinstalldirs \
        install

    $(eval $(autotools-package))

I marked your patch as Changes Requested on outr Patchwork. Care to fix and respi, please?

Regards,
Yann E. MORIN.

Quoted 7 lines
Signature · 6 lines
2.5.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 kbd: fix target install

Quoted 10 lines · Yann E. MORIN

Niel, All,

On 2016-03-12 13:43 +0100, Niels Skou Olsen spake thusly:

Quoted 4 lines

The package makefile fails to append to the KBD_INSTALL_TARGET_OPTS variable in autotools-package. This means that the DESTDIR and install target are lost, and so the package is never installed to target.

Quoted 6 lines
Quoted 1 line

To fix it the append must happen after the eval of autotools-package.

We don;t usually do that.

Instead, when the package does not behave properly, we prefer to override all of it, like, for example, in the rpm package:

OK, I agree that overriding is cleaner. I will re-submit a kbd patch that overrides instead of appending.

Btw, I just grepped through the packages, and found that util-linux does the same. It appends to autotools-package and host-autotools-package variables *after* evaluating the macros.

Best regards,
Niels

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160313/4237fbf7/attachment.html>