Bug#783024: www.debian.org: Adding USB media as support for Vendors List
21/04/2015, 14:15, Paul Wise :
> On Tue, Apr 21, 2015 at 3:22 AM, Alexandre Delanoë wrote:
>
> > @@ -56,11 +58,12 @@
> > # Vendor allows donations - "Yes" or "No"
> > <td><contribution <get-var contribution />></td>
> > ####################
> > - # Vendor offers "CD", "DVD" or "CD+DVD"
> > + # Vendor offers "CD", "DVD", "CD+DVD" or "USB"
> > <td>\
> > <ifeq <get-var cd /> "yes" "CD">\
> > <ifeq <get-var cd /> "yes" <ifeq <get-var dvd /> "yes" "+">>\
> > <ifeq <get-var dvd /> "yes" "DVD">\
> > + <ifeq <get-var usb /> "yes" "USB">\
> > </td>
> > <td><get-var architectures /></td>
> > <td><ship <get-var ship />></td>
>
> I think this part of the patch is going to produce incorrect results
> for combinations of USB with CD/DVD, for example:
>
> CDUSB
> CD+DVDUSB
> DVDUSB
You are right. The correct patch is this one:
--- CD/vendors/vendors.CD.def 2011-07-10 19:51:52.000000000 +0200
+++ CD/vendors/vendors.CD.def.withUSB 2015-04-22 12:34:47.843338708 +0200
@@ -11,6 +11,7 @@
<gettext domain="vendors">email:</gettext>
<gettext domain="vendors">CD Type:</gettext>
<gettext domain="vendors">DVD Type:</gettext>
+<gettext domain="vendors">USB Type:</gettext>
<gettext domain="vendors">Architectures:</gettext>
-->
@@ -25,7 +26,7 @@
<tr>
<th><gettext domain="vendors">Vendor</gettext></th>
<th><gettext domain="vendors">Allows Contributions</gettext></th>
- <th><gettext domain="vendors">CD/DVD</gettext></th>
+ <th><gettext domain="vendors">CD/DVD/USB</gettext></th>
<th><gettext domain="vendors">Architectures</gettext></th>
<th><gettext domain="vendors">Ship International</gettext></th>
<th><gettext domain="vendors">Contact</gettext></th>
@@ -46,6 +47,7 @@
<preserve contacturl />
<preserve cd />
<preserve dvd />
+ <preserve usb />
<set-var %attributes />
<tr class="<get-var trclass />">
<ifeq <get-var trclass /> "a" <set-var trclass="b" /> <set-var trclass="a" /> />
@@ -56,11 +58,14 @@
# Vendor allows donations - "Yes" or "No"
<td><contribution <get-var contribution />></td>
####################
- # Vendor offers "CD", "DVD" or "CD+DVD"
+ # Vendor can offers "CD", "DVD", "CD+DVD", "DVD+USB", "CD+DVD+USB", "CD+USB"
<td>\
<ifeq <get-var cd /> "yes" "CD">\
<ifeq <get-var cd /> "yes" <ifeq <get-var dvd /> "yes" "+">>\
+ <ifeq <get-var cd /> "yes" <ifeq <get-var dvd /> "no" <ifeq <get-var usb /> "yes" "+">>>\
<ifeq <get-var dvd /> "yes" "DVD">\
+ <ifeq <get-var dvd /> "yes" <ifeq <get-var usb /> "yes" "+">>\
+ <ifeq <get-var usb /> "yes" "USB">\
</td>
<td><get-var architectures /></td>
<td><ship <get-var ship />></td>
@@ -80,16 +85,17 @@
# Ensure that the list is sorted:
<ifeq <string-compare "<get-var name />" "<get-var prevname />" caseless="true" />
"less"
- <exit status="1" message="CD/DVD Vendor entries not sorted - '<get-var name />' should appear before '<get-var prevname />' in the list!" />
+ <exit status="1" message="CD/DVD/USB Vendor entries not sorted - '<get-var name />' should appear before '<get-var prevname />' in the list!" />
/>
####################
# Ensure that the entry is in the right country section
<ifneq <get-var country /> <get-var code />
- <exit status="1" message="CD/DVD Vendor '<get-var name />' should appear inside the country tag for country '<get-var country />', but it is inside that for '<get-var code />'!" />
+ <exit status="1" message="CD/DVD/USB Vendor '<get-var name />' should appear inside the country tag for country '<get-var country />', but it is inside that for '<get-var code />'!" />
/>\
<set-var prevname="<get-var name />" />
<restore dvd />
<restore cd />
+ <restore usb />
<restore contacturl />
<restore ship />
<restore contribution />
--
Alexandre Delanoë
Reply to: