Merge lp:~bjornt/landscape-client/apt-facade-changer-fixes into lp:~landscape/landscape-client/trunk

Proposed by Björn Tillenius
Status: Merged
Approved by: Thomas Herve
Approved revision: 432
Merged at revision: 401
Proposed branch: lp:~bjornt/landscape-client/apt-facade-changer-fixes
Merge into: lp:~landscape/landscape-client/trunk
Diff against target: 0 lines
To merge this branch: bzr merge lp:~bjornt/landscape-client/apt-facade-changer-fixes
Reviewer Review Type Date Requested Status
Thomas Herve (community) Approve
Alberto Donato (community) Approve
Review via email: mp+81979@code.launchpad.net

Description of the change

Fixes to AptFacade that is needed for the package changer to work:

    1) Fix mark_upgrade() to upgrade the package to the latest version,
       instead of upgrading to the version that is passed in.

    2) Don't do anything if you try to upgrade a package that is already
       at the latest version.

    3) Raise a TransactionError if something goes wrong committing the
       changes to the Apt cache.

    4) Take the Package object into account, when comparing Version
       objects to find out which dependencies are needed for
       DependencyError in perform_changes().

I was expecting these fixes to be smaller, but the branch is still quite
small, so I didn't bother splitting it up, since they changes are
related.

To post a comment you must log in.
Revision history for this message
Alberto Donato (ack) wrote :

Looks good! +1

#1:
+ def test_mark_upgrade_no_upgrade(self):
+ """
+ If the candidate version of a package already is installed,

typo, should be "is already installed".

review: Approve
Revision history for this message
Thomas Herve (therve) wrote :

[1] Pep8
landscape/package/tests/test_facade.py:999:1: E303 too many blank lines (3)

[2]
+ [version for package, version in dependencies])

There is an extra space before "in".

+1!

review: Approve
433. By Björn Tillenius

Don't include package upgrades in all_packages.

434. By Björn Tillenius

Lint.

Revision history for this message
Björn Tillenius (bjornt) wrote :

On Fri, Nov 11, 2011 at 03:28:08PM -0000, Alberto Donato wrote:
> Review: Approve
>
> Looks good! +1
>
> #1:
> + def test_mark_upgrade_no_upgrade(self):
> + """
> + If the candidate version of a package already is installed,
>
> typo, should be "is already installed".

Fixed.

--
Björn Tillenius | https://launchpad.net/~bjornt

Revision history for this message
Björn Tillenius (bjornt) wrote :

On Mon, Nov 14, 2011 at 08:49:23AM -0000, Thomas Herve wrote:
> Review: Approve
>
> [1] Pep8
> landscape/package/tests/test_facade.py:999:1: E303 too many blank lines (3)
>
> [2]
> + [version for package, version in dependencies])
>
> There is an extra space before "in".

Oops, forgot to run ls-lint. Fixed both!

--
Björn Tillenius | https://launchpad.net/~bjornt

435. By Björn Tillenius

Typo.

436. By Björn Tillenius

Merge trunk, resolve conflicts.

Preview Diff

Empty

Subscribers

People subscribed via source and target branches

to all changes: