From patchwork Sat Jun 29 05:02:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1124683 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Y6H4h1Ly"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45bM3F0LV2z9s4Y for ; Sat, 29 Jun 2019 15:03:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 94B8787734; Sat, 29 Jun 2019 05:03:19 +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 1DceycU7NzvH; Sat, 29 Jun 2019 05:03:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CC08A87739; Sat, 29 Jun 2019 05:03:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id EC3DF1BF296 for ; Sat, 29 Jun 2019 05:03:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E987222851 for ; Sat, 29 Jun 2019 05:03:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pobXGknvEn7g for ; Sat, 29 Jun 2019 05:03:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by silver.osuosl.org (Postfix) with ESMTPS id 5022520485 for ; Sat, 29 Jun 2019 05:03:14 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id 196so3481398pgc.6 for ; Fri, 28 Jun 2019 22:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/uIzcQg8VWjS/epJ49bH1lv4o8mKVrqtYttlX6NMVyM=; b=Y6H4h1Ly50uODYROJz89HnHyKM+6JFH6v/3rPDbDxaIq1CzN+Lp28TAUwxxhkWrI28 EGqGN5+/GGKAJXtuPLMPHL+v4S6aVKNfhgqVYVN51MGm14bAdtACYi+nFleaxZ8vH6n9 fn8z2l1uIr6rZrwRnFhD7j+Zl8EdK5VonyT1ks2jHYJrakSAy2DIIXfhpJzhhiA65RGh nsEfswsvZRjgqCfN2RfSXeWtt37lyLQptW6M+wDgftIXlcSxVEhHcmWgjIKuGoajPm/v webEREOtIMWeycr+D/jgof3VqsCkb05PASREc/OnOzfhY4ZwIuMADcf8PyMAUhLa30xz ddhg== 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:mime-version:content-transfer-encoding; bh=/uIzcQg8VWjS/epJ49bH1lv4o8mKVrqtYttlX6NMVyM=; b=YYmDntkonTZtk0wY4mCzcSJ3Smld+fupIAeYlgtb3pQaZnVxzGWEJiCwh5Pt2bhgtB O0qMnrggOKAueA73Tvb3VUw6sLvm0eYTxJ2NcHeMROvMidkycenMWu/uMCmNi/ZbWVp1 rOp9DUdP4LJKpyOR0qc2oeZi085ccUlEXh4uZPF1CbBvmYDgaxzGFJqQWtxrdqmBUPkU sQb2y28vJlsWmlC/V7Trc6jGca2GNHpVRZX703qrDtpt+wL6qKNKvSqANKipBQGrg+3T 28bX2npvEydWmoXMvm73j6z/BgIFrnMVPR3tVc/FQufTk58928NrRJNXohsg6ivivOFO YCLw== X-Gm-Message-State: APjAAAXkLFk0umf7FImebaBUCCSgcb8DSEbuUHtIx0hVTd6QUUnZu/6q THgSfHnUNiUQsox8w5Ft6mMGCXrXRE6Y9RmP X-Google-Smtp-Source: APXvYqzca1dd+0r1NQAvnjDV7ACsN9R6G+J3ORrjtebkXaORcCb+Y3f+m34L4GQcGFV/x0THNzybRA== X-Received: by 2002:a65:498c:: with SMTP id r12mr12450827pgs.27.1561784593436; Fri, 28 Jun 2019 22:03:13 -0700 (PDT) Received: from localhost.localdomain ([123.201.100.132]) by smtp.gmail.com with ESMTPSA id y14sm3313541pjr.13.2019.06.28.22.03.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 28 Jun 2019 22:03:13 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Sat, 29 Jun 2019 10:32:05 +0530 Message-Id: <20190629050214.17852-18-itsatharva@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190629050214.17852-1-itsatharva@gmail.com> References: <20190629050214.17852-1-itsatharva@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 18/27] autobuild-run: define download directory as part of Builder class X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Atharva Lele , yann.morin.1998@free.fr, thomas.petazzoni@bootlin.com Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Atharva Lele Acked-by: Arnout Vandecappelle (Essensium/Mind) --- scripts/autobuild-run | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index a755d1f..d0b31c2 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -293,6 +293,7 @@ class Builder: # frequently needed directories self.idir = "instance-%d" % self.instance self.srcdir = os.path.join(self.idir, "buildroot") + self.dldir = os.path.join(self.idir, "dl") if self.debug: self.log = sys.stdout @@ -310,9 +311,8 @@ class Builder: log_write(self.log, "INFO: preparing a new build") # Create the download directory if it doesn't exist - dldir = os.path.join(self.idir, "dl") - if not os.path.exists(dldir): - os.mkdir(dldir) + if not os.path.exists(self.dldir): + os.mkdir(self.dldir) # recursively find files under root def find_files(root): @@ -332,12 +332,12 @@ class Builder: # regularly re-download files to check that their upstream # location is still correct. for i in range(0, 5): - flist = list(find_files(dldir)) + flist = list(find_files(self.dldir)) if not flist: break f = flist[randint(0, len(flist) - 1)] log_write(self.log, "INFO: removing %s from downloads" % - os.path.relpath(f, dldir)) + os.path.relpath(f, self.dldir)) os.remove(f) branch = get_branch() @@ -457,14 +457,13 @@ class Builder: # path to the output directory here is not relative to the # Buildroot sources, but to the location of the autobuilder # script. - dldir = os.path.abspath(os.path.join(self.idir, "dl")) outputdir = os.path.abspath(os.path.join(self.idir, "output")) f = open(os.path.join(outputdir, "logfile"), "w+") log_write(self.log, "INFO: build started") cmd = ["nice", "-n", str(self.nice), "make", "O=%s" % outputdir, - "-C", self.srcdir, "BR2_DL_DIR=%s" % dldir, + "-C", self.srcdir, "BR2_DL_DIR=%s" % self.dldir, "BR2_JLEVEL=%s" % self.njobs] \ + self.make_opts.split() sub = subprocess.Popen(cmd, stdout=f, stderr=f) @@ -497,7 +496,7 @@ class Builder: return -1 cmd = ["make", "O=%s" % outputdir, "-C", self.srcdir, - "BR2_DL_DIR=%s" % dldir, "legal-info"] \ + "BR2_DL_DIR=%s" % self.dldir, "legal-info"] \ + self.make_opts.split() ret = subprocess.call(cmd, stdout=f, stderr=f) if ret != 0: