Error "E: required field Package not found in (Debian::FieldError) " on some rare packages

Bug #1462764 reported by Mohammad Anwar Shah
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ruby-debian (Ubuntu)
New
Undecided
Unassigned

Bug Description

While using Debian::DpkgDeb module, sometimes "E: required field Package not found in (Debian::FieldError)" exception is thrown.

The package involved here is "libegl1-mesa_10.3.0-0ubuntu2intel1_i386.deb" which is from Intel driver.

Here is the error log

/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/learner/Programming/older-debs-cleaner/test.rb
/var/lib/gems/1.9.1/gems/ruby-debian-0.3.8/lib/debian.rb:201:in `block in parseFields': E: required field Package not found in (Debian::FieldError)
 from /var/lib/gems/1.9.1/gems/ruby-debian-0.3.8/lib/debian.rb:199:in `each'
 from /var/lib/gems/1.9.1/gems/ruby-debian-0.3.8/lib/debian.rb:199:in `parseFields'
 from /var/lib/gems/1.9.1/gems/ruby-debian-0.3.8/lib/debian.rb:442:in `initialize'
 from /var/lib/gems/1.9.1/gems/ruby-debian-0.3.8/lib/debian.rb:153:in `new'
 from /var/lib/gems/1.9.1/gems/ruby-debian-0.3.8/lib/debian.rb:153:in `load'
 from /home/learner/Programming/older-debs-cleaner/test.rb:59:in `block in read_package_info2'
 from /home/learner/Programming/older-debs-cleaner/test.rb:56:in `collect'
 from /home/learner/Programming/older-debs-cleaner/test.rb:56:in `read_package_info2'
 from /home/learner/Programming/older-debs-cleaner/test.rb:84:in `<top (required)>'
 from -e:1:in `load'
 from -e:1:in `<main>'

After inspecting several hours, I found the cause. It it the method `load` in DpkgDeb module. in Line 143 of debian.rb source file. The comparison made won't match with that package's string, which is "control.tar.gz/". I have patched the file and it worked.

Tags: patch
Revision history for this message
Mohammad Anwar Shah (mohammadanwarshah) wrote :

I am uploading a patch which helped me resolve the issue

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ruby-debian.fix.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.