-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: microcode.ctl
Version: 1.17-12
Severity: important

Hello,
update-intel-microcode gets the last mentioned microcode instead of the
lastest one, as the RSS feed currently mentions two firmware files and
sed failing to use non-greedy patterns.
The attached patch uses perl to parse the wget output, there's no need
to add perl-base to microcode.ctl's dependencies, as it depends on
debconf which depends on perl.

- -- System Information:
Debian Release: 5.0.3
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-bpo.1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQEcBAEBAgAGBQJKyiudAAoJEO31pc4mOIL2VpsH/3ZwJ8D0aAY4ucdwXSuHI46q
W+JN1HU+HXmiDt8iKJ1ZgGbkRN8lTSM1BIE8VbBmBzCCpVoV6JPHRYhpbcFfOsQY
LntqBzpFVPYtQUAV9dOMkEaqpuHQEla7nnqZ5quT0ygnFevAJhCt3UcerchFDbPl
YBnKm1M1wdZ9WlaJ1j+rz6EzcvlxdNL0h/BLqec06UJl+BWnv4A6OZoKqrCnGNqi
pGCE3kfKFYcd/X3WJ0HlXnnmVLOtEXItIVyM3J0X+zH9JVgzdP9UBrGOafYTnvfN
De4ASJHzQIRd2rEqd5dQeRGlZgU6iJ36lLJgpVjwgcOeQrDGAirF6qFgp+evGTw=
=Q6tZ
-----END PGP SIGNATURE-----
--- update-intel-microcode	2009-10-05 19:58:28.000000000 +0300
+++ update-intel-microcode-perl	2009-10-05 20:02:39.000000000 +0300
@@ -14,7 +14,7 @@ if ! which wget > /dev/null 2> /dev/null
 fi
 
 REMOTE_RSS='http://feeds.downloadcenter.intel.com/rss/?p=483&lang=eng'
-REMOTE_DATA="$(wget -t 2 -T 20 -nv -q -O - "$REMOTE_RSS" | sed  -nre 's#^.*<IntelDC:Type>Firmware</IntelDC:Type><IntelDC:Version>(200[0-9]*)</IntelDC:Version><IntelDC:Status>latest</IntelDC:Status>.*?<IntelDC:FileURL>([^<]*\1[^<]*)</IntelDC:FileURL>.*$#\1 \2#p' - || echo 'ERROR')"
+REMOTE_DATA="$(wget -t 2 -T 20 -nv -q -O - "$REMOTE_RSS" | perl -pe 's|^.+?<IntelDC:Type>Firmware</IntelDC:Type><IntelDC:Version>(20[0-9]*)</IntelDC:Version><IntelDC:Status>latest</IntelDC:Status>.+?<IntelDC:FileURL>([^<]*\1[^<]*)</IntelDC:FileURL>.*$|\1 \2\n|' - || echo 'ERROR')"
 if [ "0$REMOTE_DATA" = "0"  -o  "0$REMOTE_DATA" = "0ERROR" ] ; then
     echo "Error: could not find remote data in $REMOTE_RSS" 1>&2
     echo "...exiting" 1>&2

Reply via email to