From nobody Sun Feb 8 17:22:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1667478849; cv=none; d=zohomail.com; s=zohoarc; b=YhAR65E2baHa6yTmU9xlvyqGCrdBHgLV0vXaftvavkgxVf7UhVrPh9caDTCHuC6Xz+U90shP40I03guUJ4VBQ6LWeyDUjf8m36vQZ4VPya6AzFxHhO750UzNCRMsGv1TsMPXayE2jBCBljbuqqVOFdqslkEgjbGvXePV+orpqkc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667478849; 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=rB/uFIKm1YHZvpt67Pzl9acxLC1iViqecVtKIolC+Yo=; b=BUVsMG0BM0DL0diRN6sWGMpS8jjsojzydxQcYjmft9/PJ0RNCoj/ZD4TNt8xpxhwDRKNDkrB+0KW4Xh8jfxuFul4LOzuP6c3fPtX9fFbDv3nSB0eXkWYU4O3jba6TMkc9TmfXl0PoMNy18ZsPTaT6B+vZDaKz9ijq9yoS5vl5j8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1667478849300398.9576812493692; Thu, 3 Nov 2022 05:34:09 -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-475-8bGq4XQiPPa8rr2xxmH9FA-1; Thu, 03 Nov 2022 08:33:24 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A0F592823824; Thu, 3 Nov 2022 12:33:21 +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 8787840C83F1; Thu, 3 Nov 2022 12:33:21 +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 752B01946A62; Thu, 3 Nov 2022 12:33:21 +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 62D131946594 for ; Thu, 3 Nov 2022 12:33:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 59DE44EA55; Thu, 3 Nov 2022 12:33:20 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-3.brq.redhat.com [10.40.208.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id C80E439D7C for ; Thu, 3 Nov 2022 12:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667478848; 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=rB/uFIKm1YHZvpt67Pzl9acxLC1iViqecVtKIolC+Yo=; b=TK/sn7dkELFBwxFWULwZcF/eSVWMw0kHDAYNk3V8pHI9nTKqQcIPu1hWR2RF4BYlHjqiee AS2YmhTbgf4nl8GB59eKUJZHsO3JVx7AueH4epDXsy2jf2pouvaJsjLEBKZrHXVaoTj++H OB3SrONiKtdFTgNmXJqOVw7xl70uQs8= X-MC-Unique: 8bGq4XQiPPa8rr2xxmH9FA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/5] apibuild: Don't include the Copyright in the of a module Date: Thu, 3 Nov 2022 13:33:13 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 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 3.1 on 10.11.54.1 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: 1667478850492100001 Content-Type: text/plain; charset="utf-8" When building the top level description from a header file the 'parseTopComment' method of the 'CParser' would include all trailing lines into the field. This was designed to concatenate multi-line descriptions, but unfortunately in all cases also included the Copyright statement which followed. Explicitly end the scanning of the header on a line which starts with 'Copyright (C)' and truncate the spaces from the end of the last item. Signed-off-by: Peter Krempa --- scripts/apibuild.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/apibuild.py b/scripts/apibuild.py index c232b4e2c8..4ded66bc02 100755 --- a/scripts/apibuild.py +++ b/scripts/apibuild.py @@ -721,6 +721,14 @@ class CParser: item =3D m.group(1) line =3D m.group(2).lstrip() + # don't include the Copyright in the last 'item' + if line.startswith("Copyright (C)"): + # truncate any whitespace originating from newlines + # before the Copyright + if item: + res[item] =3D res[item].rstrip() + break + if item: if item in res: res[item] =3D res[item] + " " + line --=20 2.37.3