From patchwork Sat Dec 10 00:04:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 704681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tb8Z133v9z9t9b for ; Sat, 10 Dec 2016 11:07:53 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="BsEQszi5"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cFVAC-0007h4-RV; Sat, 10 Dec 2016 00:05:16 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cFVA9-0006VF-IA for lede-dev@lists.infradead.org; Sat, 10 Dec 2016 00:05:14 +0000 Received: by mail-pg0-x243.google.com with SMTP id 3so3701408pgd.0 for ; Fri, 09 Dec 2016 16:04:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=fYh015tTfQjGlaDgIwFLJD93riL39QGyn7sCwLq5Un4=; b=BsEQszi5EPppKeY5nb64tdiPwfDmfsSxwRpcKno7VBB73n+fLZzngGyY+igTAYMh1U +RKGGVV6CpKkP3uQMLE56BGWX8x5Y6ioP9WTRGYbdaKHf0Gz8kgTcmSi/T18rPXbnASm kVp6MMQ5SNkniAjJaWTYEXt5EqMjXa0jbfcKekig6O2Oq9apBHHhVitKGk7adrC7xxPU ChxF/lWgVLWtz0AHq+VFdKKMuJqJdaC7gmPhtMxZAkug31es4JLSDmv/wUQO0tmkelCW Svyp20eVKXQ7BPakRpRBU+WL6fCSTQumAc7Rap+xXsIOgibWgrfqfP7GYgZY/YFK6VPY FlwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fYh015tTfQjGlaDgIwFLJD93riL39QGyn7sCwLq5Un4=; b=WaOFycKrPgqDiw+rjyPKGrRxRrmvYCC4A1Qsrw0XR1E4LcLJ+0rvfIGYNe/1nStDIn 6PQ0Q6ueop+ZRbxNgSsUp65zV/pgc8bn/k9V7DinMYNyRgxQTdnpzNKNUx3LxuhCz/zS Va6CoDszKHEiGg+yvPdwJY3w6w14rBlAdD6cCLX62eEKJMfzbO6XMow7/aVVzOb5tvqP eY4Bc1mg5T94klxP5wIqR6E0J1abtxqn0e3gihjo5wrqAl5zuSjZuhnd6ohRIbxWfGgg UUvXfBCoH0Tgr8lToANnvVaF4CIZyP+tZP+C1NCy0D3OIu1656Wv6NghHuWI6idoU+eg 9gHQ== X-Gm-Message-State: AKaTC03CdjyklcJJGpBJMWH1knGvgPsdPBUjcIZ0dypSU86iVCZNCfwJLnKdfbYwSSbKuQ== X-Received: by 10.99.211.21 with SMTP id b21mr103526898pgg.120.1481328292686; Fri, 09 Dec 2016 16:04:52 -0800 (PST) Received: from stb-bld-03.irv.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id 189sm60402906pgh.5.2016.12.09.16.04.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Dec 2016 16:04:51 -0800 (PST) From: Florian Fainelli To: lede-dev@lists.infradead.org Date: Fri, 9 Dec 2016 16:04:49 -0800 Message-Id: <20161210000449.28830-1-f.fainelli@gmail.com> X-Mailer: git-send-email 2.10.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161209_160513_680452_C482EEA0 X-CRM114-Status: UNSURE ( 8.89 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c05:0:0:0:243 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (f.fainelli[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] [PATCH v2] package-ipkg: Do not fail build without base-files X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , john@phrozen.org MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org If the base-files package is not selected, we will fail executing the very first postinst script: make[3]: Leaving directory `/local/users/fainelli/openwrt/trunk' cp -fpR /local/users/fainelli/openwrt/trunk/build_dir/target-arm_xscale_musl-1.1.15_eabi/root-orion /local/users/fainelli/openwrt/trunk/build_dir/target-arm_xscale_musl-1.1.15_eabi/root.orig-orion ./usr/lib/opkg/info/busybox.postinst: line 3: /local/users/fainelli/openwrt/trunk/build_dir/target-arm_xscale_musl-1.1.15_eabi/root-orion/lib/functions.sh: No such file or directory ./usr/lib/opkg/info/busybox.postinst: line 4: default_postinst: command not found postinst script ./usr/lib/opkg/info/busybox.postinst has failed with exit code 127 make[2]: *** [package/install] Error 1 Check for the existence of lib/functions.sh, and if it does not exist, just bail out gracefully. Signed-off-by: Florian Fainelli --- Changes in v2: - be less intrusive, just bail out if function.sh cannot be found/executed include/package-ipkg.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index afd2d4ef7a21..a8871ec71620 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -200,11 +200,13 @@ $(_endef) ( \ echo "#!/bin/sh"; \ echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \ + echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ echo "default_postinst \$$$$0 \$$$$@"; \ ) > postinst; \ ( \ echo "#!/bin/sh"; \ + echo "[ -x "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \ echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \ echo "default_prerm \$$$$0 \$$$$@"; \ ) > prerm; \