From patchwork Sat Nov 21 01:45:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Barnett X-Patchwork-Id: 547117 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 871691402B1 for ; Sat, 21 Nov 2015 12:45:20 +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=punbg0nJ; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B1034959EA; Sat, 21 Nov 2015 01:45:19 +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 n2pf+JQGdnZQ; Sat, 21 Nov 2015 01:45:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 2931095A02; Sat, 21 Nov 2015 01:45:19 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id A6AA71CF3EB for ; Sat, 21 Nov 2015 01:45:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A37BD95A03 for ; Sat, 21 Nov 2015 01:45:18 +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 Ot6SyD7TVwyV for ; Sat, 21 Nov 2015 01:45:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) by hemlock.osuosl.org (Postfix) with ESMTPS id C89FB959CE for ; Sat, 21 Nov 2015 01:45:16 +0000 (UTC) Received: by ioc74 with SMTP id 74so140982784ioc.2 for ; Fri, 20 Nov 2015 17:45:16 -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=WgS46sZnewKD3K+MnuYeq8OSkdT2M+VDi5zrMskdSCI=; b=punbg0nJ3uVEvBivrDdg8SqBrV6DI5X1/S65khC2PK1nyhZRZlh1rVfolz1h5j8G7G N6atAIY/PAbDmP+7PAz6APS7zydkedSV38TEN8F0DV+hRcfLEiO5s/J3bQgGC+xS4J2T eQhwXugwVhXTO2mwkxLhc2TvW4+waAHfnglW4dSB0M82Dy8Oec9zzQeQR9usJqMpU79r sNbMv3kHZJmaTDIn4wfumS9HI+m4osXQCoybks/MzcSeMxW+Sjwv3ueGIj3kDCGvWd2x +bH57Y4sEJ3hKLCLKH7wr03zN6Z1EWT0UuerHN2FL90R/WaAlpS1J2k2YILss0qEYVun Xy4g== X-Received: by 10.107.160.208 with SMTP id j199mr16219283ioe.23.1448070316068; Fri, 20 Nov 2015 17:45:16 -0800 (PST) Received: from ryan-ubuntu.barnett.net (50-83-61-125.client.mchsi.com. [50.83.61.125]) by smtp.gmail.com with ESMTPSA id j188sm914223iof.28.2015.11.20.17.45.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Nov 2015 17:45:14 -0800 (PST) From: Ryan Barnett To: buildroot@buildroot.org Date: Fri, 20 Nov 2015 19:45:04 -0600 Message-Id: <1448070305-10768-1-git-send-email-ryanbarnett3@gmail.com> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH v2 1/2] apply-patches: only use first field of line for series file X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" A series file for quilt has a valid syntax of: fixes/autoconf.diff -p1 fixes/doc-html-local-css.diff -p1 fixes/gnu-inline.diff -p1 However, with the current way that a series file is handled, it will error out because the -p1 is tried as a file. This is because in the for loop that iterates the files, we only look for invalid lines. Then each line is used within a bash for loop which uses spaces a delimiter. In order to fix this, we should only use the string that comes before a space in the series file. Signed-off-by: Ryan Barnett CC: Arnout Vandecappelle --- support/scripts/apply-patches.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh index 2edf054..6525f94 100755 --- a/support/scripts/apply-patches.sh +++ b/support/scripts/apply-patches.sh @@ -115,7 +115,10 @@ function scan_patchdir { # If there is a series file, use it instead of using ls sort order # to apply patches. Skip line starting with a dash. if [ -e "${path}/series" ] ; then - for i in `grep -Ev "^#" ${path}/series 2> /dev/null` ; do + # Some series files for quilt contain a '-p1' at the end, handle this + # by only using the first word from series file + series_patches="`grep -Ev "^#" ${path}/series | cut -d ' ' -f1 2> /dev/null`" + for i in $series_patches; do apply_patch "$path" "$i" series done else