Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 153181

Summary: Corrupt binary packge triggers AttributeError: 'NoneType' object has no attribute 'strip'
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Binary packages supportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS, REGRESSION
Priority: High    
Version: 2.1   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 147007    
Attachments: fix AttributeError for invalid binpkgs that have no CATEGORY data
fix AttributeError for invalid binpkgs that have no CATEGORY data

Description Zac Medico gentoo-dev 2006-10-28 14:13:55 UTC
The following traceback is from bug 147010, comment #27:

Performing Global Updates: /usr/portage/profiles/updates/4Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
......
Traceback (most recent call last):
  File "/usr/bin/emerge", line 4503, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 4214, in emerge_main
    portage.global_updates(settings, trees, mtimedb["updates"])
  File "/usr/lib/portage/pym/portage.py", line 7128, in global_updates
    trees["/"]["bintree"].move_ent(update_cmd)
  File "/usr/lib/portage/pym/portage.py", line 5510, in move_ent
    self.populate()
  File "/usr/lib/portage/pym/portage.py", line 5755, in populate
    mycat = mytbz2.getfile("CATEGORY").strip()
AttributeError: 'NoneType' object has no attribute 'strip'
Comment 1 Zac Medico gentoo-dev 2006-10-28 15:01:41 UTC
Created attachment 100666 [details, diff]
fix AttributeError for invalid binpkgs that have no CATEGORY data

This is fixed in trunk r4867 and the 2.1.2 branch r4868.
Comment 2 Zac Medico gentoo-dev 2006-10-28 16:07:48 UTC
Created attachment 100670 [details, diff]
fix AttributeError for invalid binpkgs that have no CATEGORY data

updated patch, adds a missing continue statement (svn r4869).
Comment 3 Zac Medico gentoo-dev 2006-10-28 16:36:24 UTC
This has been released in 2.1.2_rc1-r1.