Bug 481375 - package has not been updated since the standard that it implements was changed
Summary: package has not been updated since the standard that it implements was changed
Alias: None
Product: Fedora
Classification: Fedora
Component: TVAnytimeAPI
Version: 11
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Sandro Mathys
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-01-23 20:05 UTC by Tim Coote
Modified: 2010-06-28 11:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-06-28 11:08:46 UTC

Attachments (Terms of Use)
diff from 1.3 build to java/bbc/rd/tvanytime/Genre.java (1.35 KB, text/plain)
2009-03-10 21:50 UTC, Tim Coote
no flags Details

Description Tim Coote 2009-01-23 20:05:44 UTC
Description of problem:
This project hasn't moved for a while, and doesn't seem to be supported any more, so I'm logging this bug here.  Also, I've not got this bug thro' the complete package install on fedora, so it's just possible that I've got this wrong.

The class bbc.rd.tvanytime.xml.Genre has hardcoded valid hrefs of the form:
"urn:tva:metadata:cs:.*:2002:", see lines 26, et seq

However, the standard looks like it's been updated and example data from: http://backstage.bbc.co.uk/feeds/tvradio/ 

between 2006-05-04 and 2006-05-07, changes the format to:

which does not parse with this version of Genre.java

Version-Release number of selected component (if applicable):
1.0 of Genre.java, 1.3, July 2005

How reproducible:
Parser barfs every time I try it.

Steps to Reproduce:
1.set up classpath etc so that jython can find the tvanytime code (example below does that within jython
2.download example tvanytime data from above location/dates
3.untar the data directories
4. run the jython program below - all it does is try to parse the files
Actual results:
code barfs on newer data and does not fill in the parser object contents

Expected results:
parser should succeed

Additional info:
The code's not pretty, with much cut/paste. It was only built as an example.

Here's a couple of snippets to show how the data's changed. From working data:
-- cut here --
[tim@mercury 20060504]$ grep Genre 20060504BBCOne_pi.xml| grep -v "</Genre>"| head
          <Genre href='urn:tva:metadata:cs:ContentCS:2002:3.3.1'>
          <Genre href='urn:tva:metadata:cs:ContentCS:2002:3.3.20'>
          <Genre href='urn:tva:metadata:cs:ContentCS:2002:3.1'>
-- cut here --
here's data from the broken example:
-- cut here --
[tim@mercury 20060507]$ grep Genre 20060507BBCOne_pi.xml| grep -v "</Genre>"| head
          <Genre href='urn:tva:metadata:cs:IntentionCS:2005:1.1'>
          <Genre href='urn:tva:metadata:cs:FormatCS:2005:2.2'>
          <Genre href='urn:tva:metadata:cs:ContentCS:2005:3.4.1'>
--cut here --

Here's a minimalist jython program to drive the parser:
--- code starts here ---
import sys
sys.path.append ("/path to TVAnytimeAPI root directory/lib/TVAnytimeAPI.jar")

from bbc.rd.tvanytime import *
from bbc.rd.tvanytime.xml import *

p = SAXXMLParser ()
p.setParseProfile (SAXXMLParser.STANDARD)

f  = open ("/path to data root/20060504/20060504BBCOne_pi.xml")  # works
p.parse (f)
f  = open ("/path to data root/20060507/20060507BBCOne_pi.xml")  # broken
p.parse (f)

Comment 1 Sandro Mathys 2009-01-26 15:09:59 UTC
With what version of TVAnytime did this happen? I only just imported TVAnytime into Fedora today but you reported this several days ago. Maybe you used the one from the review request - if so, please make sure you try this again with the latest version (either from the review request or from rawhide where it should be pushed to already - but it's not yet on all mirrors).

Comment 2 Tim Coote 2009-03-10 14:55:33 UTC
Sorry, missed the info request.
I'm using the latest version from the project on sourceforge (the source rpm on rawhide won't install as the md5 doesn't match). (1.3 as per original posting).

I don't believe that there's been any work on this since 2005.

I cannot extract the source to confirm that it's the same, neither can I install the binary rpm as I've only got an F8 box to hand.

The bug is visible in that the constants used for matching in:

    44          private static final String hrefTags[] = {
    45      "urn:tva:metadata:cs:IntentionCS:2002:",
    46      "urn:tva:metadata:cs:FormatCS:2002:",
    47      "urn:tva:metadata:cs:ContentCS:2002:",
    48      "urn:tva:metadata:cs:OriginationCS:2002:",
    49      "urn:tva:metadata:cs:IntendedAudienceCS:2002:",
    50      "urn:tva:metadata:cs:ContentAlertCS:2002:",
    51      "urn:tva:metadata:cs:MediaTypeCS:2002:",
    52      "urn:tva:metadata:cs:AtmosphereCS:2002:"

Note the 2002 constant. This is matched by the code and so won't work with data that uses the newer (unsure which) standard, which as 2005 (see original posting).

I don't know what a review request is. I spotted the error when looking at the sourceforge project and identified that the BBC had stopped work on it. I didn't want Fedora to put in obsolete code that doesn't even work with the current data from the code originator.

Sorry I cannot get better information for you

Comment 3 Tim Coote 2009-03-10 21:50:03 UTC
Created attachment 334721 [details]
diff from 1.3 build to java/bbc/rd/tvanytime/Genre.java

this may be a viable patch - I've never prepared one before. Created with:
svn diff java/bbc/rd/tvanytime/Genre.java

Simple fix to sort out the bug described. I have no idea on whether the fix will break anything else as this is not the cleanest code that I've ever seen.  All that I did was to add 2005 versions of the Genre descriptors to the array that's used to parse the Genre and then set the size to be calculated based on the size of the array, rather than be separately declared. Absent tests, this could be very broken.  When applied, the test that i described in the original bug report works (or at least doesn't fall over).

Comment 4 Sandro Mathys 2009-03-13 09:07:04 UTC
Thanks for the patch/diff, makes life easier :)

I'm looking into this and will try to build tvbrowser against this, too. The patch looks easy and doesn't brake TVAnytimeAPI's build, so this shouldn't be a problem I guess.

Sorry if I'm not so quick these days, my real life is keeping me busy.

Comment 5 Tim Coote 2009-03-13 10:02:45 UTC
fwiw, I found a similar bug in the use of hrefCS attribute (only 2002 version). I have a patch, but it's mixed up with some mods that I put in to improve type checking (generics). Happy to forward these on. I've not bumped any version numbers or put in any very good documentation in the change.

I reckon that the project's been dropped by the bbc and superseded by the work that they've done on providing a web service: (http://www0.rdthdo.bbc.co.uk/services/api/). I don't understand how you're supposed to make sense of any returned tvanytime xml.

Comment 6 Fedora Update System 2009-03-13 14:27:20 UTC
TVAnytimeAPI-1.3-5.fc10 has been submitted as an update for Fedora 10.

Comment 7 Fedora Update System 2009-03-13 14:28:40 UTC
TVAnytimeAPI-1.3-5.fc9 has been submitted as an update for Fedora 9.

Comment 8 Sandro Mathys 2009-03-13 21:32:10 UTC
The updates above include your first patch that you attached to this bug. If you can provide your further patches (non-2002 version and enhancements separately), I'd look into them as well and maybe include them. Normally, we only include patches that we also sent upstream for inclusion, but bbc really seems to have this project cancelled so I figure at least the update-patches are fine - not sure about the other changes.

Comment 9 Fedora Update System 2009-04-02 17:18:45 UTC
TVAnytimeAPI-1.3-5.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2009-04-02 17:21:54 UTC
TVAnytimeAPI-1.3-5.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Bug Zapper 2009-06-09 10:52:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:

Comment 12 Bug Zapper 2010-04-27 12:47:31 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 13 Bug Zapper 2010-06-28 11:08:46 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.