Bug 481375 - package has not been updated since the standard that it implements was changed
package has not been updated since the standard that it implements was changed
Product: Fedora
Classification: Fedora
Component: TVAnytimeAPI (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Sandro Mathys
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-01-23 15:05 EST by Tim Coote
Modified: 2010-06-28 07:08 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-28 07:08:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Tim Coote 2009-01-23 15:05:44 EST
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 10:09:59 EST
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 10:55:33 EDT
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 17:50:03 EDT
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 05:07:04 EDT
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 06:02:45 EDT
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 10:27:20 EDT
TVAnytimeAPI-1.3-5.fc10 has been submitted as an update for Fedora 10.
Comment 7 Fedora Update System 2009-03-13 10:28:40 EDT
TVAnytimeAPI-1.3-5.fc9 has been submitted as an update for Fedora 9.
Comment 8 Sandro Mathys 2009-03-13 17:32:10 EDT
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 13:18:45 EDT
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 13:21:54 EDT
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 06:52:16 EDT
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 08:47:31 EDT
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 07:08:46 EDT
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.