From patchwork Wed Apr 3 17:04:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 161698 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp567750jan; Wed, 3 Apr 2019 10:04:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqymspYFCy2bRUzEMc9UWedDAKhbAidaqNcGw26yS04VcLipkqUacP3R7jZjN63vWay7uFYV X-Received: by 2002:a63:78ce:: with SMTP id t197mr761898pgc.314.1554311059727; Wed, 03 Apr 2019 10:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554311059; cv=none; d=google.com; s=arc-20160816; b=uXTGh5Nt/N8zCI/SB8j1wx5tS4HOIwHC9OmP4i7eXCrIPmJ9LGuO5ppQg5RYrx7ZRP h8X2g4qOWtHUIJPcg5ZVi44Lux7GSluXCXDMUHMA82lN/S+lMgZxL8fud/g8zyl6Lnw8 7o1kbbdKFRDkGhCrDkR2ru+V2gn4Jn8UV4vKJWgliDwKyFW+hJqLPJG5IR3Wbz2s5rdk BP5PJYOqB5F8da9eL9N7VgDwNPF2tBtUwHwSdx62sWGJ2bGJNKlVMi8xi8gwuCaGQN6M 4o4DuGMLRmCnKOtLQr7UwsC0w0msKPOcE+j19jeb6M8xogpT98mLyi+Z3gjhCO7QFE9r xNFg== 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=N2htFL0SP6yP2qi0GqXI6ht0iCUFDUbrwg4e1MrUha4=; b=k9roaasocDMMPfk3bijUL51XGlMUxKVXx6tbXLcz13zhW4c/9S7pRYL4z9E+aJD3Qm jRQHg7wifAO/ce44jtGUsWri4hM2tK2bn2NH95CgXWa2mKO0uOuMkOjYhSiBXlFRvQEx GSpNV6CRNv/PIS2z0CuBP4oAVEppZpN/E9XlCkZ3cUjcsf+sV6+2ygNiWOvy+oPA9FU+ TRSzQGOS9cMh6dhO0Z384JyTu/+1kxSzVtnu4AppE0tpzPkq5RL0onc69IhnnXwApn9m 7PHw5d2VNHn8nPVOa+kEDAu8+li6MXjs8MYvpL2BhaMCXlTiYWZJNF+ysZTxp+G098nG sSUg== 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=zO187T94; 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 12si14394219plb.335.2019.04.03.10.04.19; Wed, 03 Apr 2019 10:04:19 -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=zO187T94; 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 6DB187D3B2; Wed, 3 Apr 2019 17:04:17 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mail.openembedded.org (Postfix) with ESMTP id C2B617D38D for ; Wed, 3 Apr 2019 17:04:15 +0000 (UTC) Received: by mail-wm1-f53.google.com with SMTP id z11so8335211wmi.0 for ; Wed, 03 Apr 2019 10:04:17 -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=WxaVUJcN59sQf3Mr01WMCI1sLkmpUwi2QFcPyHTKyHg=; b=zO187T94c/oGFCZuJIx37M9PVreEpfnC5vm+nUHeOLJa48dTnNoVaUJJSF1DTp+hew Ky8DRBc3i9NTRjQcUq1sMZczcN7N4GrT+GXDEjvAV+47U+lM0aoX/qYfjfvMnAXlXDC/ /vRRDvY7xhHy5AQqRVrLR4h2nwqRyLIYfyCE05RoW9vFohMGoRqzRZ7+owXHcP315LsK zz3StjHUwvrneScXP5QCtXS+9EF0LGt2PejX8nL36x9AhKMYHBjI0CYDUpSi60Qz3Cno BrLHdfNQj5vJnMH+hWPTv3qSb+wrg++yjjCcY0mgucyuGc/ZlC2KtA0GOl7SjxvP4XOu S9jQ== 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=WxaVUJcN59sQf3Mr01WMCI1sLkmpUwi2QFcPyHTKyHg=; b=lej5DO6TrzIVIIUA1RLKa5DGmZFbmpgwSe5BS+Uwabsomns6DxdjTXcf8g/nDUvSkV 86Q0xfQacN1ciao8ZiH9q5mzb/mCoAya+0mDzRE5bW4jLK/Ls7VPQHDk5Dh7Bxt57kD2 Hljl3BX+xy0KxR/9lJ30hotJTg/S0jRQ7KfpEJwoqkopkd5jTzZLWMuScaIYDkSF2pYg cMhIIuHZfxe5AD5nT0UB8atLo4GwysC45vR95oyLmSxONwp7ix0ycF3oW/+AWOrd8CiD YUCcdaJ7Xnn8SrmoGkm6A/a39+9CkWlBSz6O1d8Ynv/fy3e2qtlSfTqg5owoZ33JM3HA YEAA== X-Gm-Message-State: APjAAAWT4JYVcNMGxAuaUSlkn2QjmjoM8ZCV+TkOTtu9GKxvGytJJmNd wvxCQ1CQC3vNvOxtAaGeIo4XKaVUwkc= X-Received: by 2002:a1c:6783:: with SMTP id b125mr781652wmc.41.1554311056297; Wed, 03 Apr 2019 10:04:16 -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 o17sm17362170wrw.73.2019.04.03.10.04.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Apr 2019 10:04:15 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Wed, 3 Apr 2019 18:04:04 +0100 Message-Id: <20190403170412.23568-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH 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 | 22 ++++++++++++++++++++++ 1 file changed, 22 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..dc63a0beb4d --- /dev/null +++ b/meta/classes/xmlcatalog.bbclass @@ -0,0 +1,22 @@ +XMLCATALOGS ?= "" + +DEPENDS_append_class-native = " libxml2-native" +SYSROOT_PREPROCESS_FUNCS_append = " xmlcatalog_sstate_postinst" + +xmlcatalog_complete() { + ROOTCATALOG="${STAGING_ETCDIR_NATIVE}/xml/catalog" + if [ ! -f \$ROOTCATALOG ]; then + 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 +}