From 42e2f41f854e6d526defcb2316b8cb5de205119e Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Thu, 4 Apr 2019 13:31:00 +0200 Subject: [PATCH] Better XML linting --- Tupfile | 8 ++++---- Tuprules.tup | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Tupfile b/Tupfile index ef55468c6..20e582340 100644 --- a/Tupfile +++ b/Tupfile @@ -48,10 +48,10 @@ SHORT_SUM = b2sum -l24 # Generate the makefile for creating signed package tarballs : index.xml | $(PKG_SED_FILE) |> ^ generate public index^ \ - sed \ - -e 's|_/pkg/\(\w*\)|local/pkg/\1/current|' \ - -f $(PKG_SED_FILE) %f \ - | xz > %o \ + xmllint %f | sed \ + -e 's|_/pkg/\([^"]*\)|local/pkg/\1/current|' \ + -f $(PKG_SED_FILE) \ + | xz > %o; \ |> public/@(PUBLIC_USER)/index/@(SCULPT_VERSION).xz AWK_RUNTIME_PATH = awk -v RS=' ' -F '/' \ diff --git a/Tuprules.tup b/Tuprules.tup index eee22681b..41a73e2f4 100644 --- a/Tuprules.tup +++ b/Tuprules.tup @@ -33,9 +33,9 @@ AWK_LOCAL_ARCHIVES = awk -F '/' \ strip -o %o %f \ |> $(DEPOT_BIN_DIR)/$(BIN_NAME)/current/%b -!collect_pkg_runtime = | $(VERSIONS_SED_FILE) |> ^ packag $(PKG_NAME)^ \ - xmllint -schema $(ERRATA_DIR)/runtime.xsd %f \ - > $(DEPOT_PKG_DIR)/$(PKG_NAME)/current/runtime; \ +!collect_pkg_runtime = | $(VERSIONS_SED_FILE) |> ^ package %f^ \ + xmllint --noout -schema $(ERRATA_DIR)/runtime.xsd %f; \ + cp %f $(DEPOT_PKG_DIR)/$(PKG_NAME)/current/runtime; \ echo $(PKG_DEPENDS) | tr ' ' '\n' | sed \ -e 's|_/\(.*\)/\(.*\)$|local/\1/\2/current|' \ > $(DEPOT_PKG_DIR)/$(PKG_NAME)/current/archives; \