Merge lp:~mvo/aptdaemon/fix-702217 into lp:aptdaemon

Proposed by Michael Vogt
Status: Merged
Approved by: Michael Vogt
Approved revision: 595
Merge reported by: Michael Vogt
Merged at revision: not available
Proposed branch: lp:~mvo/aptdaemon/fix-702217
Merge into: lp:aptdaemon
Diff against target: 48 lines (+14/-3)
2 files modified
aptdaemon/core.py (+2/-3)
tests/test_worker.py (+12/-0)
To merge this branch: bzr merge lp:~mvo/aptdaemon/fix-702217
Reviewer Review Type Date Requested Status
Sebastian Heinlein Disapprove
Review via email: mp+52435@code.launchpad.net

Description of the change

This is a fix for bug #702217. It also adds a testcase (that fails with the old code).

The fix by ckorn is probably fine as well (haven't tested it).

To post a comment you must log in.
Revision history for this message
Sebastian Heinlein (glatzor) wrote :

Instead of changing the types I prefer removing the item assignment. Fixed in rev. 595. Thanks a lot!

Revision history for this message
Sebastian Heinlein (glatzor) :
review: Disapprove
Revision history for this message
Michael Vogt (mvo) wrote :

I mark it as merged to get it off the code.launchpad.net list, its not merged as such, but the test is in and the bug is fixed (in a different way though).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'aptdaemon/core.py'
--- aptdaemon/core.py 2011-02-19 13:40:03 +0000
+++ aptdaemon/core.py 2011-03-07 17:16:01 +0000
@@ -340,9 +340,8 @@
340 self._depends = dbus.Struct([dbus.Array([], signature='s') \340 self._depends = dbus.Struct([dbus.Array([], signature='s') \
341 for i in range(7)],341 for i in range(7)],
342 signature="asasasasasasas")342 signature="asasasasasasas")
343 self._packages = dbus.Struct([dbus.Array(pkgs, signature="s")343 self._packages = dbus.Array([dbus.Array(pkgs, signature="s")
344 for pkgs in packages],344 for pkgs in packages])
345 signature="asasasasasas")
346 self._unauthenticated = dbus.Array([], signature=dbus.Signature('s'))345 self._unauthenticated = dbus.Array([], signature=dbus.Signature('s'))
347 # Add a timeout which removes the transaction from the bus if it346 # Add a timeout which removes the transaction from the bus if it
348 # hasn't been setup and run for the TRANSACTION_IDLE_TIMEOUT period347 # hasn't been setup and run for the TRANSACTION_IDLE_TIMEOUT period
349348
=== added directory 'tests/debs'
=== added file 'tests/debs/utf8-package_1.0-1_all.deb'
350Binary files tests/debs/utf8-package_1.0-1_all.deb 1970-01-01 00:00:00 +0000 and tests/debs/utf8-package_1.0-1_all.deb 2011-03-07 17:16:01 +0000 differ349Binary files tests/debs/utf8-package_1.0-1_all.deb 1970-01-01 00:00:00 +0000 and tests/debs/utf8-package_1.0-1_all.deb 2011-03-07 17:16:01 +0000 differ
=== modified file 'tests/test_worker.py'
--- tests/test_worker.py 2011-02-07 08:11:22 +0000
+++ tests/test_worker.py 2011-03-07 17:16:01 +0000
@@ -35,6 +35,7 @@
35from aptdaemon import enums, errors35from aptdaemon import enums, errors
3636
37REPO_PATH = os.path.join(aptdaemon.test.get_tests_dir(), "repo")37REPO_PATH = os.path.join(aptdaemon.test.get_tests_dir(), "repo")
38DEBS_PATH = os.path.join(aptdaemon.test.get_tests_dir(), "debs")
3839
3940
40class MockQueue(object):41class MockQueue(object):
@@ -256,6 +257,17 @@
256 self.worker._cache.open()257 self.worker._cache.open()
257 self.assertTrue(self.worker._cache["silly-depend-base"].is_installed)258 self.assertTrue(self.worker._cache["silly-depend-base"].is_installed)
258259
260 def test_install_file_not_known_to_cache(self):
261 """ this tests that a local deb file (that is not known to the cache)
262 can be installed
263 """
264 pkg = os.path.join(DEBS_PATH, "utf8-package_1.0-1_all.deb")
265 trans = Transaction(enums.ROLE_INSTALL_FILE, self.queue, os.getuid(),
266 "org.debian.apt.test", bus=self.dbus,
267 kwargs={"path": os.path.join(REPO_PATH, pkg),
268 "force": True})
269 self.worker.simulate(trans)
270
259 def test_fix_broken_depends(self):271 def test_fix_broken_depends(self):
260 """Test the fixing of broken dependencies."""272 """Test the fixing of broken dependencies."""
261 for pkg in ["silly-base_0.1-0_all.deb", "silly-broken_0.1-0_all.deb"]:273 for pkg in ["silly-base_0.1-0_all.deb", "silly-broken_0.1-0_all.deb"]:

Subscribers

People subscribed via source and target branches

to status/vote changes: