3 # Gnucomo package parameter report.
5 # Create a list of packages and patches on a Solaris system
6 # that can be read by the Gnucomo input program, gcm_input.
12 FILTER=/usr/local/bin/pkg-solaris.awk
14 echo "<?xml version='1.0'?>"
15 echo "<gcmt:message xmlns:gcmt='http://gnucomo.org/transport/'>"
17 echo " <gcmt:messagetype>package list</gcmt:messagetype>"
18 echo " <gcmt:hostname>$HOST</gcmt:hostname>"
19 echo " <gcmt:time>$TIME</gcmt:time>"
20 echo " </gcmt:header>"
23 echo " <gcmt:parameters gcmt:class='package'>"
25 pkginfo -l|awk -f $FILTER |sed -e 's/&/&/'
27 showrev -p | cut -f2 "-d " |sort| tr '-' ' ' > /tmp/patchlist.$$
28 read PREV_PATCH PREV_VERSION < /tmp/patchlist.$$
30 while read PATCH VERSION
32 if [ $PREV_PATCH = $PATCH ]
36 echo "<gcmt:parameter name='$PREV_PATCH'>"
37 echo " <gcmt:description>Solaris patch $PREV_PATCH</gcmt:description>"
38 echo " <gcmt:property name='version'>$PREV_VERSION</gcmt:property>"
39 echo "</gcmt:parameter>"
43 done < /tmp/patchlist.$$
45 tail -1 /tmp/patchlist.$$ >/tmp/patchtail.$$
46 read PATCH VERSION </tmp/patchtail.$$
47 echo "<gcmt:parameter name='$PATCH'>"
48 echo " <gcmt:description>Solaris patch $PATCH</gcmt:description>"
49 echo " <gcmt:property name='version'>$VERSION</gcmt:property>"
50 echo "</gcmt:parameter>"
52 echo " </gcmt:parameters>"
54 echo "</gcmt:message>"