From patchwork Thu Apr 4 22:16:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 161806 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2140372jan; Thu, 4 Apr 2019 15:16:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEWwL8VWZ1//3GvrNqYGNIsJh24HfMvVEE3Konh7iXzrxX69CZgg+D70Y+09aWf3BO9t0b X-Received: by 2002:a63:945:: with SMTP id 66mr7973651pgj.128.1554416213016; Thu, 04 Apr 2019 15:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554416213; cv=none; d=google.com; s=arc-20160816; b=unQojbOdfFyt2t/wyIWih5uCgPHkijppe3H2vhoG9iy8+MuO/PXl0SbBgo9Yt0RVfv qDpUmFCkfrZMKsYfiigyveAKfc1vslVtmA/bMbUnZqsjHEBbcHzP1lAp6yy6K99le3n1 dd7+zVXxnPmPQXuNrFfsQ02ue9FxfcTtTcdrgQNR/m/lAAOHhb5+4e+SGdX8PaA2Z014 5BEu0idSHo43xwiXazXczHWQ1dpopKKvAf78Sf7AF/RNd1ZtYMdtDKtooYe8ODyadNuB vwa8Gb36wmTGwQyfRxXI4Ed1yVddKMA+pKLE5w+GidOn3YFOWQ1G0g4m6dJv7ugvcgr3 c2Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=zX0PcUjXh6qVTsjwrDuY8ri3EKej7OD2KtopzE8N6m8=; b=mka2cXO1b3exgF8bu9j3b12hQVntf/alQfutttrVOGPS/o6MYSQQr39i21JG+ve5pI rDjTgIfFkqmtlZHuKKt0VCWdLX92t6QlHlF++QPa8liSpAseq8YnTQTD5AU45uPWU8Ev edeAUgywhncvagRJ8TwzzrTrJQwk72dFxhi1OIAodw+YYyLpjSD6l4lmFnIxwngj+FlY pu83F+U0fL1EyYXSLrb53jsbYs9yhgJItXGRKIwN6WnKqbGuPDA3BhAI6k3FPqJmj/69 OrFIx0IebnW5+VhV4ds82hkh1Y1hu8TRQXv9xffNJl47jozlPQU5ZlzCOpSo8QRR0L7H 68Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=pwIJQW2J; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id k8si9172326plt.354.2019.04.04.15.16.52; Thu, 04 Apr 2019 15:16:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=pwIJQW2J; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 932297D48E; Thu, 4 Apr 2019 22:16:48 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mail.openembedded.org (Postfix) with ESMTP id B7FB37D48E for ; Thu, 4 Apr 2019 22:16:46 +0000 (UTC) Received: by mail-wr1-f52.google.com with SMTP id k17so5633108wrx.10 for ; Thu, 04 Apr 2019 15:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=aEZhCNHqa6dNeNskT1gxqE9D2qhmhannGPNzbFGD0FY=; b=pwIJQW2J6DkNzTKQFIzgicSJR4emAvrBQoa992mx02dvfiJZUk7nFuhA/VGBDYSh2n ihrMGIO6NIkg3wJRPLFmpZhOpSGdCFMobUwlycy26ewZM/CJ1UENrdSOiPSukAN1iyZO 8IX79MpH4FJOulne+VOL2hAg/CW3kcyw7Hkj9tZq9YrzH89JDdg32BQCf8mqcZQ7AxYp Ok7RI4LFa/iFryloBuaJiuBYpWLRp/KJLRxLeTDc5tjFWwqa8iCd+1HTLPSL7TOfNDzD UckYSvCLjRUfVQEPCSjg2FC8P2l42gaNZwwtubs6lH1tDSE+CeRLs8BSZiV9OteW6N1S S37A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=aEZhCNHqa6dNeNskT1gxqE9D2qhmhannGPNzbFGD0FY=; b=kJcKSDrDnRr9q9n+loaAF4iVxsEBJGNO4VV4f2feteM1Tml3uP6pl1GXYBTy3iSEGf X4jS2cT83NZ+Oct8zc9bm8Lijw5Ne0/FZxZX07mpnuy1T8xk1IhAMpQYK1SpF0G4kfue ayFe2dhWh22ABAl+kOewAzQDsRwPiMCdKoX3LbuBiY/t+2RPz1P91oMjfQrU9lBYrl0T mVQv0k+Y9SP3vKRv4AByf54gqYezzm0P8OvJQoLk6ujn/Vbbk3EPIoTPdtqhacUOGr3k n3OXy+YIao1YF2TMiCwr062YGtSy7vXc3sEK2b6nnib65mpN+oPYrAmB845tYtXW2lb2 r9pA== X-Gm-Message-State: APjAAAWj9hx5D6OAAKmgJQfjA+znysHReCqNdPtV35szPmD8n0lIdXAS plMV9i4r6D7PLMN1v7WvPWObR3X8cQ8= X-Received: by 2002:adf:fd46:: with SMTP id h6mr5962870wrs.139.1554416207033; Thu, 04 Apr 2019 15:16:47 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id d3sm305565wmf.46.2019.04.04.15.16.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2019 15:16:46 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Thu, 4 Apr 2019 23:16:36 +0100 Message-Id: <20190404221644.20496-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH v2 1/9] xmlcatalog: new class to update the XML catalogue X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This is a new class to handle recipes that need to add/remove entries in the XML Catalog(ue)[1]. In the future it will handle updating the catalogue on the target, but the immediate requirement is during the build so currently this only works with native recipes. Note that as this is a new class and target use hasn't been implemented yet, it is possible that the behaviour of this class will change. [1] https://en.wikipedia.org/wiki/XML_catalog Signed-off-by: Ross Burton --- meta/classes/xmlcatalog.bbclass | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 meta/classes/xmlcatalog.bbclass -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/xmlcatalog.bbclass b/meta/classes/xmlcatalog.bbclass new file mode 100644 index 00000000000..075aef8c0c4 --- /dev/null +++ b/meta/classes/xmlcatalog.bbclass @@ -0,0 +1,24 @@ +# A whitespace-separated list of XML catalogs to be registered, for example +# "${sysconfdir}/xml/docbook-xml.xml". +XMLCATALOGS ?= "" + +SYSROOT_PREPROCESS_FUNCS_append = " xmlcatalog_sstate_postinst" + +xmlcatalog_complete() { + ROOTCATALOG="${STAGING_ETCDIR_NATIVE}/xml/catalog" + if [ ! -f $ROOTCATALOG ]; then + mkdir --parents $(dirname $ROOTCATALOG) + xmlcatalog --noout --create $ROOTCATALOG + fi + for CATALOG in ${XMLCATALOGS}; do + xmlcatalog --noout --add nextCatalog unused file://$CATALOG $ROOTCATALOG + done +} + +xmlcatalog_sstate_postinst() { + mkdir -p ${SYSROOT_DESTDIR}${bindir} + dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}-xmlcatalog + echo '#!/bin/sh' > $dest + echo '${xmlcatalog_complete}' >> $dest + chmod 0755 $dest +}