WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH] fix source manifest generation in xen-api-libs.hg

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] fix source manifest generation in xen-api-libs.hg
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Mon, 12 Jul 2010 08:33:36 +0100
Delivery-date: Mon, 12 Jul 2010 00:43:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1278920008 -3600
# Node ID ad151dc6eb4578f098df793e92498a9ba1a9ec3a
# Parent  7762ee00b89dfc4dbbd561453db5e75be36f5812
Fix the source manifest generation by using a simple shell script to scan the 
SRPMS, rather than a hideous make/shell fragment.

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r 7762ee00b89d -r ad151dc6eb45 mk/Makefile
--- a/mk/Makefile       Thu Jul 08 16:49:16 2010 +0100
+++ b/mk/Makefile       Mon Jul 12 08:33:28 2010 +0100
@@ -26,10 +26,7 @@
 
 $(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP)
        rm -f $@
-       @for srpm in "$(/bin/ls -1 ${MY_OUTPUT_DIR}/SRPMS)"; do \
-               path=$(MY_OUTPUT_DIR)/SRPMS/${srpm}; \
-               echo "$(${RPM} --qf "%{name}" -qp ${path}) $(${RPM} --qf 
"%{License}" -qp ${path}) ${path}" >>$@; \
-       done
+       /bin/sh ./srpms-to-manifest api-libs $(MY_OUTPUT_DIR)/SRPMS > $@
 
 .PHONY: clean
        rm -f *.rpm
diff -r 7762ee00b89d -r ad151dc6eb45 mk/srpms-to-manifest
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/srpms-to-manifest      Mon Jul 12 08:33:28 2010 +0100
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# take a component and a directory as arguments, write to stdout a 
+# MANIFEST file fragment
+if [ -z "${RPM}" ]; then
+  RPM=/bin/rpm
+fi
+
+component=$1
+dir=$2
+for path in $(/bin/ls -1 $2/*.src.rpm); do
+  name=$(${RPM} --qf "%{name}" -qp ${path})
+  license=$(${RPM} --qf "%{License}" -qp ${path})
+  license=$(echo ${license} | /bin/sed -e 's/\s/_/g')
+  echo "${component} ${license} file ${path}"
+done
 mk/Makefile          |   5 +----
 mk/srpms-to-manifest |  16 ++++++++++++++++
 2 files changed, 17 insertions(+), 4 deletions(-)


Attachment: xen-api-libs.hg.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] fix source manifest generation in xen-api-libs.hg, David Scott <=