[Bug 1780099] Re: Cache remapping breaks hashing of Package objects

Julian Andres Klode 1780099 at bugs.launchpad.net
Wed Jul 4 15:22:18 UTC 2018


** Description changed:

  [Impact]
  The apt.Package objects use the id as the hash, but the hash can change after reopening, meaning that code will fail to work, for example:
  
  c=apt.Cache()
  p=c["a"]
  set_of_p={p}
  c.open()
  assert p in set_of_p
  
  will fail.
  
  [Test case]
- The above test case is run as part of autopkgtest (syntax is slightly different)
+ The above test case is run as part of autopkgtest (syntax is slightly different), so passing autopkgtests means verification is done.
  
  [Regression potential]
  Hashing packages objects will be slower as it hashes the name and architecture now.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1780099

Title:
  Cache remapping breaks hashing of Package objects

Status in python-apt package in Ubuntu:
  In Progress
Status in python-apt source package in Bionic:
  New

Bug description:
  [Impact]
  The apt.Package objects use the id as the hash, but the hash can change after reopening, meaning that code will fail to work, for example:

  c=apt.Cache()
  p=c["a"]
  set_of_p={p}
  c.open()
  assert p in set_of_p

  will fail.

  [Test case]
  The above test case is run as part of autopkgtest (syntax is slightly different), so passing autopkgtests means verification is done.

  [Regression potential]
  Hashing packages objects will be slower as it hashes the name and architecture now.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1780099/+subscriptions



More information about the foundations-bugs mailing list