Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2090676/?format=api
{ "id": 2090676, "url": "http://patchwork.ozlabs.org/api/patches/2090676/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20250527111932.3058650-1-sjg@chromium.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20250527111932.3058650-1-sjg@chromium.org>", "list_archive_url": null, "date": "2025-05-27T11:19:20", "name": "[1/2] buildman: Correct behaviour of --in-tree", "commit_ref": "9002ab0986fa51ed2dffcfb655b062ce026b194d", "pull_url": null, "state": "accepted", "archived": false, "hash": "ff9e3ed541738bcc4f4b8018f92eeb92e63ff6d8", "submitter": { "id": 6170, "url": "http://patchwork.ozlabs.org/api/people/6170/?format=api", "name": "Simon Glass", "email": "sjg@chromium.org" }, "delegate": { "id": 3184, "url": "http://patchwork.ozlabs.org/api/users/3184/?format=api", "username": "sjg", "first_name": "Simon", "last_name": "Glass", "email": "sjg@chromium.org" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20250527111932.3058650-1-sjg@chromium.org/mbox/", "series": [ { "id": 458533, "url": "http://patchwork.ozlabs.org/api/series/458533/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=458533", "date": "2025-05-27T11:19:20", "name": "[1/2] buildman: Correct behaviour of --in-tree", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/458533/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2090676/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2090676/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256\n header.s=google header.b=aTjSlHGi;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org\n header.b=\"aTjSlHGi\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=sjg@chromium.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4b69Bx3VVwz1yDX\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 27 May 2025 21:19:37 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id E7B9583013;\n\tTue, 27 May 2025 13:19:44 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id F24188300F; Tue, 27 May 2025 13:19:43 +0200 (CEST)", "from mail-io1-xd43.google.com (mail-io1-xd43.google.com\n [IPv6:2607:f8b0:4864:20::d43])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 5288882116\n for <u-boot@lists.denx.de>; Tue, 27 May 2025 13:19:41 +0200 (CEST)", "by mail-io1-xd43.google.com with SMTP id\n ca18e2360f4ac-85df99da233so273378339f.3\n for <u-boot@lists.denx.de>; Tue, 27 May 2025 04:19:41 -0700 (PDT)", "from chromium.org (c-73-203-119-151.hsd1.co.comcast.net.\n [73.203.119.151]) by smtp.gmail.com with ESMTPSA id\n e9e14a558f8ab-3dc82e014f4sm36362755ab.40.2025.05.27.04.19.37\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 27 May 2025 04:19:38 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS\n autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=chromium.org; s=google; t=1748344779; x=1748949579; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=5GPmh5waIml4FNDHosRqygZjmG5QGi0pju9IM0TIH8A=;\n b=aTjSlHGiugq04arqCKzzYnnDejdughIrgCKCHYGxX5Oy05qYsrYVA3mTgtsfx3y08Z\n bGR7bUWYRes2UFN+2Zni6yoEn1DuHksWixOi1bFYICmNk2hsM0I4RFBUBBIOkOYtM+hx\n 2y42IMZDbLwRh2dCAPCwTJzOoDmaDoVHkz4mY=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1748344779; x=1748949579;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=5GPmh5waIml4FNDHosRqygZjmG5QGi0pju9IM0TIH8A=;\n b=d1fkBXBQLJPPfwlvYXxZGZKC8lMC0rHqlY5zbIO/sA8CKxRL36eqBGvarqf7tr8u3C\n MmL65gMwIobBeNqTBx0XP5wQe00c2F4k8FBIqdN+Lka/cvWkpLbn0GcnXyu2IFzsdc39\n vpTKncu5xOW+mGKORGRI9lcSnGcNICx2MLAW/1V8vJ3x434qtPOGzFB1gPYw5GKz306+\n D0r5FV8YVeagnJp9GTb6QhhAdQCULYGO3IFH+NTvWpA0LyRYEcbEEg6CLFps/Ku/YF+3\n yl73gvQkVSFitqo6oD1tJCAlTQh+tV7kKnUIUmtl8TgIAmiBa8VMKXgmQZxaC0f6M8MH\n TC9g==", "X-Gm-Message-State": "AOJu0YyHy89j8NT3sXgtjlexs9IrcFFgnHpCaUhvVY+AgpqC0CzryjMp\n +Tf/Bs6VX1sSYqZXoRVV7fl18Nc3HKSoSCugvvu/HiXb+z/dAVREqFsm4V+Ws8gKHJofkoi8Fwg\n 8d8M9+Tf+gFk=", "X-Gm-Gg": "ASbGnctsiYTppq+dOVvfMwZ1wVGTb+dafRARc7C/+H1WNwJI+cfcpAJgHiCfwdyZPtV\n nZ7S8992ySuIfyQKUiixX732JAn3ujBLjPXDoPDKqDY3txHtp1scT9u3Dxbq3pY31SYTL3ixATc\n UcKYHNsncACILSw0c1mVD1uLPRJD1oancFylnyQdB742rWw3sH8lrW0lDxyJykF9kYZmaMujDIl\n rKu1A8FATQG7PtbUaxSPRVwDIOWl+mByPRBuOx7O5ikakeBENu0yCqB+rV0cNXe1tTrKOBBPngd\n rspRy+awfVccyEG+XmLsfLAvMnVdNX3LsA6OKGcNXk8Nze4u8t/Q2avLtVn89lfcRgCRJbPzSP2\n bxps1kPOxlCD+", "X-Google-Smtp-Source": "\n AGHT+IFpX5F2KChwwzwyGdt5PO+aaRa+ZpDPU/P6GIKZ40pE38cp8AQZP7saRKRmHwNGIr2NI4rfjA==", "X-Received": "by 2002:a05:6e02:3991:b0:3dc:8b2c:4bc7 with SMTP id\n e9e14a558f8ab-3dc9b695232mr96044975ab.1.1748344779474;\n Tue, 27 May 2025 04:19:39 -0700 (PDT)", "From": "Simon Glass <sjg@chromium.org>", "To": "U-Boot Mailing List <u-boot@lists.denx.de>", "Cc": "Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org>,\n Andrejs Cainikovs <andrejs.cainikovs@toradex.com>,\n Tom Rini <trini@konsulko.com>", "Subject": "[PATCH 1/2] buildman: Correct behaviour of --in-tree", "Date": "Tue, 27 May 2025 05:19:20 -0600", "Message-ID": "<20250527111932.3058650-1-sjg@chromium.org>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "This option doesn't work as expected since it sets the cwd to the work\ndirectory, which does not necessarily hold the source code.\n\nIt should be left unset, so that the current directory is the source\ndirectory.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\n tools/buildman/builderthread.py | 38 +++++++++++++++++----------------\n tools/buildman/buildman.rst | 6 ++++++\n 2 files changed, 26 insertions(+), 18 deletions(-)", "diff": "diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py\nindex b4cb66397bb..4617f516f40 100644\n--- a/tools/buildman/builderthread.py\n+++ b/tools/buildman/builderthread.py\n@@ -37,6 +37,8 @@ def mkdir(dirname, parents=False):\n Raises:\n OSError: File already exists\n \"\"\"\n+ if os.path.exists(dirname):\n+ return\n try:\n if parents:\n os.makedirs(dirname)\n@@ -45,8 +47,8 @@ def mkdir(dirname, parents=False):\n except OSError as err:\n if err.errno == errno.EEXIST:\n if os.path.realpath('.') == os.path.realpath(dirname):\n- print(f\"Cannot create the current working directory '{dirname}'!\")\n- sys.exit(1)\n+ raise ValueError(\n+ f\"Cannot create the current working directory '{dirname}'!\")\n else:\n raise\n \n@@ -205,21 +207,20 @@ class BuilderThread(threading.Thread):\n args = []\n cwd = work_dir\n src_dir = os.path.realpath(work_dir)\n- if not self.builder.in_tree:\n- if commit_upto is None:\n- # In this case we are building in the original source directory\n- # (i.e. the current directory where buildman is invoked. The\n- # output directory is set to this thread's selected work\n- # directory.\n- #\n- # Symlinks can confuse U-Boot's Makefile since we may use '..'\n- # in our path, so remove them.\n- real_dir = os.path.realpath(out_dir)\n- args.append(f'O={real_dir}')\n- cwd = None\n- src_dir = os.getcwd()\n- else:\n- args.append(f'O={out_rel_dir}')\n+ if commit_upto is None:\n+ # In this case we are building in the original source directory\n+ # (i.e. the current directory where buildman is invoked. The\n+ # output directory is set to this thread's selected work\n+ # directory.\n+ #\n+ # Symlinks can confuse U-Boot's Makefile since we may use '..'\n+ # in our path, so remove them.\n+ real_dir = os.path.realpath(out_dir)\n+ args.append(f'O={real_dir}')\n+ cwd = None\n+ src_dir = os.getcwd()\n+ elif out_rel_dir:\n+ args.append(f'O={out_rel_dir}')\n if self.builder.verbose_build:\n args.append('V=1')\n else:\n@@ -409,7 +410,8 @@ class BuilderThread(threading.Thread):\n \"\"\"\n # Set up the environment and command line\n env = self.builder.make_environment(self.toolchain)\n- mkdir(out_dir)\n+ if not os.path.exists(out_dir):\n+ mkdir(out_dir)\n \n args, cwd, src_dir = self._build_args(brd, out_dir, out_rel_dir,\n work_dir, commit_upto)\ndiff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst\nindex 5fa7b277cb8..2555139334f 100644\n--- a/tools/buildman/buildman.rst\n+++ b/tools/buildman/buildman.rst\n@@ -1333,6 +1333,12 @@ To build a particular target, rather than the default U-Boot target, use the\n `--target` option. This is unlikely to be useful unless you are building a\n single board.\n \n+Buildman normally builds out-of-tree, meaning that the source directory is not\n+disturbed by the build. Use `-i` to do an in-tree build instead. Note that this\n+does not affect the source directory, since buildman creates a separate git\n+'worktree' for each board. This means that it is possible to do an in-tree\n+build of an entire branch, or even a 'current source' build for multiple boards.\n+\n Build summary\n -------------\n \n", "prefixes": [ "1/2" ] }