From nobody Mon Feb 9 19:53:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1660148245; cv=none; d=zohomail.com; s=zohoarc; b=hi+UQPNq51Qxls5OuES9CW0Hf+vsGFQQi4RgPLpDT5lQY0aXGIH2GAxaDz3pAUb1jjm9iQXutL0PxVdF3ZQ9Tw6y9akz9JMHnqfh+xUAz82oVQQGzxxV4oGcbO1dzgqDrCJ5xp8iIbXWvHKGaEkMb9QiP1jNg84g6GCL7LdKn10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660148245; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dgRChK8JfIhkMsgqE18YDhW7fvyQXGc2BF9QOhCQSHg=; b=Fd7gev32p849qyQXdMntm2Ca6Jw42UI95Uh6Y83Sx5IK/TN8mQ0OnFmVgKokl3BQYhvfmF3l7kWbisuxpQQG9QLQDslJXRXt9ICl04Tg+Ql3DpmaqmXKBuaAcd1zjWOudJ6jHRgzxr/NFpxnWQzHfTnu6dHfVYXrQo9xQq9Xq3o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1660148245408843.5075414191247; Wed, 10 Aug 2022 09:17:25 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-167-zTBjqo7fPUy3W9mo4th1wg-1; Wed, 10 Aug 2022 12:17:22 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4FD4C38107A0; Wed, 10 Aug 2022 16:17:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3CB5F492C3B; Wed, 10 Aug 2022 16:17:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F11451946A59; Wed, 10 Aug 2022 16:17:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 68EFA1946A4F for ; Wed, 10 Aug 2022 16:17:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 4944218EAA; Wed, 10 Aug 2022 16:17:16 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.193.88]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CCD899457F for ; Wed, 10 Aug 2022 16:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660148244; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=dgRChK8JfIhkMsgqE18YDhW7fvyQXGc2BF9QOhCQSHg=; b=ZWCL5wsrnjzE1LcztGmNUUGgR3pNUh+vp8Q7BxvPEMOLUQjz7+uEKPI86musa4HMQ2f0w8 QsJYv2q3XdS8eN9SGQwv+sYyfVT/7QkBxJuJY47DwQqHtRzfeklMjgGkvB0Kr1D4DC+Lu/ yKtRIkBCyCWba3lPwNTtHbLf2C4X5oQ= X-MC-Unique: zTBjqo7fPUy3W9mo4th1wg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/2] scripts: Add $DESTDIR support to meson-install-web.py Date: Wed, 10 Aug 2022 18:17:12 +0200 Message-Id: <20220810161713.121711-2-abologna@redhat.com> In-Reply-To: <20220810161713.121711-1-abologna@redhat.com> References: <20220810161713.121711-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1660148246527100001 Content-Type: text/plain; charset="utf-8"; x-default="true" meson already supports $DESTDIR natively, but in this case we're using a custom script and so we have to do some extra work ourselves. Signed-off-by: Andrea Bolognani --- scripts/meson-install-web.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/meson-install-web.py b/scripts/meson-install-web.py index a03f8523cd..086d465ae4 100755 --- a/scripts/meson-install-web.py +++ b/scripts/meson-install-web.py @@ -4,7 +4,11 @@ import os import shutil import sys =20 +destdir =3D os.environ.get('DESTDIR', os.sep) + for desc in sys.argv[1:]: inst =3D desc.split(':') - os.makedirs(inst[1], exist_ok=3DTrue) - shutil.copy(inst[0], inst[1]) + src =3D inst[0] + dst =3D os.path.join(destdir, inst[1].strip(os.sep)) + os.makedirs(dst, exist_ok=3DTrue) + shutil.copy(src, dst) --=20 2.37.1