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.hg

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] fix source manifest generation in xen-api.hg
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Mon, 12 Jul 2010 08:33:19 +0100
Delivery-date: Mon, 12 Jul 2010 00:42:46 -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 1278919978 -3600
# Node ID a9d00d9121a37d036aacc0defa09d490d0fc6191
# Parent  e1f63a25739e717c5fb85dff354022aba22db068
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 e1f63a25739e -r a9d00d9121a3 mk/Makefile
--- a/mk/Makefile       Thu Jul 08 16:28:43 2010 +0100
+++ b/mk/Makefile       Mon Jul 12 08:32:58 2010 +0100
@@ -38,10 +38,7 @@
 
 $(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP) $(OUTPUT_XAPI_SRC)
        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 $(MY_OUTPUT_DIR)/SRPMS > $@
        echo api gpl file $(JQUERY_PACK_DIST) >> $@
        echo api gpl file $(JQUERY_TV_DIST) >> $@
 
diff -r e1f63a25739e -r a9d00d9121a3 mk/srpms-to-manifest
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/srpms-to-manifest      Mon Jul 12 08:32:58 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.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.hg, David Scott <=