From patchwork Mon Mar 18 02:33:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Manning X-Patchwork-Id: 228344 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 05FA72C00C4 for ; Mon, 18 Mar 2013 13:33:32 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2EAC9A0004; Mon, 18 Mar 2013 02:33:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cduzeGd5iygN; Mon, 18 Mar 2013 02:33:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 41982A000C; Mon, 18 Mar 2013 02:33:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 95AE58F74B for ; Mon, 18 Mar 2013 02:33:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1F77B8B6F3 for ; Mon, 18 Mar 2013 02:33:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HydBmU7XWnbN for ; Mon, 18 Mar 2013 02:33:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by whitealder.osuosl.org (Postfix) with ESMTPS id 529798A935 for ; Mon, 18 Mar 2013 02:33:28 +0000 (UTC) Received: by mail-pb0-f51.google.com with SMTP id un15so5938876pbc.24 for ; Sun, 17 Mar 2013 19:33:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=VjFme5OyJhN5aVXwPUYFr+0FR3RPt/bRdXDCAyD0Qzk=; b=To1ZWEs2Ylanm19ZOKYgOYtkfPnsn5fNoxcNf99ktAmWhiCkp98qY4xbxbqGLoI+nv OuLmXFZ0jkjSVLDUwB9ESL8LAv2zwrnz9h2yzqHrwVTC3eLqmqw0GGOnIonJTZTuC8pD qg+QExfsKlXnxOeWVzawSwd/xkgJRya/prwOPy3IwFsqrbV9nZB8er4RyjALxc/vyNbu kZ/xMV18YR1LsgFJRad5S8H6eC1zsl9xiEVRFP51mygSvwwZIRG1KqtH1QRfyjnPJ8RW F8wZOtaz1mur79D+ZgviB4iTKpmwk6UebA0n7B9o10tNLzStQuCLzJeEbDnSuHs4pW+K efpg== MIME-Version: 1.0 X-Received: by 10.68.11.169 with SMTP id r9mr30607090pbb.221.1363574007782; Sun, 17 Mar 2013 19:33:27 -0700 (PDT) Received: by 10.70.26.99 with HTTP; Sun, 17 Mar 2013 19:33:27 -0700 (PDT) Date: Mon, 18 Mar 2013 15:33:27 +1300 Message-ID: From: Charles Manning To: buildroot@busybox.net Subject: [Buildroot] Package overriding X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Hello Buildrooters It seems to me that the package override feature is misnamed and has some shortcomings. First off, the name is, IMHO, poor. Package Override is applied before tha packages are parsed. It does not override them. Instead it is really overriding configurations before the packages are read. Perhaps it should really be called CONFIG_OVERRIDE? There is also a deficiency in that Package Override cannot override anything set up in the packages. For example, I recently needed to add two more configuration lines to building bluez_utils. Instead of: BLUEZ_UTILS_CONF_OPT = --enable-test --enable-tools I wanted BLUEZ_UTILS_CONF_OPT = --enable-test --enable-tools --enable-bccmd --enable-dund A logical way I can see to do this would be to have a mechanism similar to Package Override but that is applied after the packages are parsed. Does that sound useful? Is there a better way? Thanks Charles --- Makefile (revision 20385) +++ Makefile (working copy) @@ -319,11 +319,20 @@ -include $(PACKAGE_OVERRIDE_FILE) endif include package/*/*.mk include hj/package/*/*.mk include boot/common.mk include linux/linux.mk +POST_PACKAGE_OVERRIDE_FILE=$(call qstrip,$(BR2_POST_PACKAGE_OVERRIDE_FILE)) +ifneq ($(POST_PACKAGE_OVERRIDE_FILE),) +-include $(POST_PACKAGE_OVERRIDE_FILE) +endif + + Then have POST_PACKAGE_OVERRIDE_FILE point to a file which has # Add bluez_utils options we need BLUEZ_UTILS_CONF_OPT += --enable-bccmd --enable-dund