Merge lp:~mvo/aptdaemon/fix-high-trust-repo-pkcompat into lp:aptdaemon

Proposed by Michael Vogt
Status: Rejected
Rejected by: Sebastian Heinlein
Proposed branch: lp:~mvo/aptdaemon/fix-high-trust-repo-pkcompat
Merge into: lp:aptdaemon
Diff against target: 27 lines (+4/-1)
2 files modified
aptdaemon/pkcompat.py (+1/-0)
aptdaemon/worker.py (+3/-1)
To merge this branch: bzr merge lp:~mvo/aptdaemon/fix-high-trust-repo-pkcompat
Reviewer Review Type Date Requested Status
Aptdaemon Developers Pending
Review via email: mp+127483@code.launchpad.net

Description of the change

This makes the high-trust repo code work for the pkcompat layer. I would appreciate the review from Sebastian to ensure that the _simulate() does not have any unwanted side-effects.

To post a comment you must log in.
Revision history for this message
Robert Carr (robertcarr) wrote :

Is this going to land?

Revision history for this message
Michael Vogt (mvo) wrote :

This is in as distro patch now. But we are waiting for the distro review.

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

I don't expect any side effects by the solution that mvo suggested. But the root of the problem is deeper in the code and should be addressed after release.

Unmerged revisions

863. By Michael Vogt

fix high-trust support for pkcompat

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'aptdaemon/pkcompat.py'
2--- aptdaemon/pkcompat.py 2012-08-23 12:41:59 +0000
3+++ aptdaemon/pkcompat.py 2012-10-02 13:14:22 +0000
4@@ -1218,6 +1218,7 @@
5 yield self.trans._set_property(APTDAEMON_TRANSACTION_DBUS_INTERFACE,
6 "AllowUnauthenticated", not only_trusted,
7 sender)
8+ yield self.trans._simulate(sender)
9 yield self.trans._run(sender)
10
11 # pylint: disable-msg=C0103,C0322
12
13=== modified file 'aptdaemon/worker.py'
14--- aptdaemon/worker.py 2012-09-13 07:12:41 +0000
15+++ aptdaemon/worker.py 2012-10-02 13:14:22 +0000
16@@ -100,8 +100,10 @@
17 # paranoia(2): we must want to install something
18 if not trans.packages[PKGS_INSTALL]:
19 return False
20+ # we only care about the name, not the version
21+ pkgs = [pkg.split("=")[0] for pkg in trans.packages[PKGS_INSTALL]]
22 # if the install packages matches the whitelisted set we are good
23- return set(trans.packages[PKGS_INSTALL]) == set(trans.high_trust_packages)
24+ return set(pkgs) == set(trans.high_trust_packages)
25
26
27 def read_high_trust_repository_dir(whitelist_cfg_d):

Subscribers

People subscribed via source and target branches

to status/vote changes: