From patchwork Sat Apr 28 09:31:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Panteleev X-Patchwork-Id: 501 Return-Path: Delivered-To: patchwork@archlinux.org Received: from apollo.archlinux.org (localhost [127.0.0.1]) by apollo.archlinux.org (Postfix) with ESMTP id F15A13A26400 for ; Sat, 28 Apr 2018 09:31:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on apollo.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-BL-Results: [127.0.9.2] [127.0.0.6] Received: from orion.archlinux.org (orion.archlinux.org [IPv6:2a01:4f8:160:6087::1]) by apollo.archlinux.org (Postfix) with ESMTPS for ; Sat, 28 Apr 2018 09:31:51 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id 26DE0A167B2F8; Sat, 28 Apr 2018 09:31:40 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS; Sat, 28 Apr 2018 09:31:40 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id E4DF52CFB3; Sat, 28 Apr 2018 09:31:36 +0000 (UTC) Authentication-Results: luna.archlinux.org; dkim=none Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 442602CE14 for ; Sat, 28 Apr 2018 09:31:36 +0000 (UTC) Received: from orion.archlinux.org (orion.archlinux.org [88.198.91.70]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sat, 28 Apr 2018 09:31:36 +0000 (UTC) Received: from orion.archlinux.org (localhost [127.0.0.1]) by orion.archlinux.org (Postfix) with ESMTP id CE542A167B2DF for ; Sat, 28 Apr 2018 09:31:31 +0000 (UTC) Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by orion.archlinux.org (Postfix) with ESMTPS for ; Sat, 28 Apr 2018 09:31:31 +0000 (UTC) Received: by mail-wm0-f42.google.com with SMTP id a137so4437772wme.1 for ; Sat, 28 Apr 2018 02:31:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8Unryd/T89y7cNw+UvOq1qiAjmBlsyciTq500h2eoeo=; b=ngsCDhSY7IWgqeQvzIA5DcOg4c0Zo1OJuCLX8B+BQS50XD/MLTNhK4MBdrTRjYHBUk iDAKWne++NL8iUvBdwGUHnSah+2MH5ILxct3dlEl8ca7XlK/nN2clijXLdxXlNH6ssxy J42csoxsE/PDaO4pEQVmWQNWCpIFXfAtObcX3a9IbCvPTC9Bbju4MmOxJdQF6bxgcVMp 7i4XYQQ3Jw7wRLjeY9JW21iDiBKZoA3uwrKOqn/9P2e1H6djngKmHXOADq1sP8UWgsg1 yyymU1slLhknFB/kFeC3gKHS8+LopyQ9dApsjx9WscvWsnE4xBeMJ5QUJt8mG4A9esbu 03oQ== X-Gm-Message-State: ALQs6tCDkLkCrNRlsa/ozKtV5iAJj1Q+qCsnVu02kaWJVk+D2npYU7Fj Rcb8VjbORCwGt/eQDRJc8lB98yNn X-Google-Smtp-Source: AB8JxZqIFDSZABF00R3bIleNjuwrD74CsPQ2ycDsj66CtNIHrWkMiwDicTkq62qOo0BSGLrJwtXKGg== X-Received: by 10.28.94.201 with SMTP id s192mr582990wmb.54.1524907891195; Sat, 28 Apr 2018 02:31:31 -0700 (PDT) Received: from home.thecybershadow.net ([89.28.117.31]) by smtp.gmail.com with ESMTPSA id o16sm2907038wmi.14.2018.04.28.02.31.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Apr 2018 02:31:30 -0700 (PDT) From: Vladimir Panteleev To: pacman-dev@archlinux.org Date: Sat, 28 Apr 2018 09:31:08 +0000 Message-Id: <20180428093108.8263-3-archlinux@thecybershadow.net> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180428093108.8263-1-archlinux@thecybershadow.net> References: <20180428093108.8263-1-archlinux@thecybershadow.net> Subject: [pacman-dev] [PATCH 2/2] libmakepkg: Use the correct path in extract_sources X-BeenThere: pacman-dev@archlinux.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Discussion list for pacman development Cc: Vladimir Panteleev Errors-To: pacman-dev-bounces@archlinux.org Sender: "pacman-dev" When extracting sources, we need to get the full path to the file being extracted (so that we can operate on it), instead of just the filename component. Previously, the filename coincidentally resolved to the same file as the one we should be working on (due to the working directory being appropriately set), but this assumption no longer holds now that a source may reside in a different directory. Fix this fragile assumption by correctly using the full path instead. --- scripts/libmakepkg/source.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/libmakepkg/source.sh.in b/scripts/libmakepkg/source.sh.in index 02bb16f5..0bdd9602 100644 --- a/scripts/libmakepkg/source.sh.in +++ b/scripts/libmakepkg/source.sh.in @@ -90,7 +90,7 @@ extract_sources() { get_all_sources_for_arch 'all_sources' for netfile in "${all_sources[@]}"; do - local file=$(get_filename "$netfile") + local file=$(get_filepath "$netfile") local proto=$(get_protocol "$netfile") case "$proto" in bzr*)