Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [Patch] 4/5: solvedeps

Project highlights: Stable Version: 1.6.1, Development Version: 1.7.6

current
Discussion topic

Back to topic list

Re: [Patch] 4/5: solvedeps

Reply

Author Jack Neely <jjneely at pams dot ncsu dot edu>
Full name Jack Neely <jjneely at pams dot ncsu dot edu>
Date 2005-01-17 15:36:44 PST
Message Pauline,

This looks to work much better. Patch accepted.

Jack

On Mon, Jan 10, 2005 at 09:28:26PM +0100, Pauline Middelink wrote:
> LS,
>
> When running the new current I got a few messages from the up2date client,
> implying the expected resulttype was incorrect. Running it from some other
> servers, i got the distinct feelnig a list was added too much.
>
> Met vriendelijke groet,
> Pauline Middelink
> --
> GPG Key fingerprint = 2D5B 87A7 DDA6 0378 5DEA BD3B 9A50 B416 E2D0 C3C2
> For more details look at my website http://www.polyware.​nl/~middelink

> diff -ur current-1.5.9.orig/a​pi/up2date.py /usr/share/current/a​pi/up2date.py
> --- current-1.5.9.orig/a​pi/up2date.py 2005-01-05 15:04:55.000000000 +0100
> +++ /usr/share/current/a​pi/up2date.py 2005-01-05 17:13:01.000000000 +0100
> @@ -132,22 +132,31 @@
> return xmlrpclib.Fault(1000,
> "No compatible channels found for client")
>
> + # This is mostly here as a marker - we'd pass in a list of all possible
> + # (compatible) channels, and get back a list (pos. empty) of the ones
> + # this client was authorized to to touch.
> + channels = auth.authorize.getAu​thorizedChannels(si,​ channels)
> + if len(channels) == 0:
> + return xmlrpclib.Fault(1000,
> + "Client is not authorized for any channels")
> +
> provides = {}
> for unk in unknowns:
> - # according to up2date 2.7.11, pkg could be _plural_, and right now
> - # it sucks off the first one returned.
> - pkgs = db.db.solveDependanc​y(channels[0]['label​'],
> - si.getattr('architecture'),
> - unk)
>
> # packagedb.solveDep will return None if our db can't solve that
> # in which case, we return an empty list for that unk, which is what
> # the client expects.
> provides[unk] = []
>
> - if pkgs:
> - for pkg in pkgs:
> - provides[unk].append(pkg)
> + # iterate over all channels available to the client
> + for chan in channels:
> + pkgs = db.db.solveDependanc​y(chan['label'],
> + si.getattr('architecture'),
> + unk)
> +
> + if pkgs:
> + for pkg in pkgs:
> + provides[unk].append(pkg)
>
> return provides
>
> diff -ur current-1.5.9.orig/d​b/currentdb.py /usr/share/current/d​b/currentdb.py
> --- current-1.5.9.orig/d​b/currentdb.py 2005-01-05 15:04:55.000000000 +0100
> +++ /usr/share/current/d​b/currentdb.py 2005-01-05 15:39:50.000000000 +0100
> @@ -763,8 +780,8 @@
> result = fixedResult
>
> log("up2date.solveDependency is returning %s" % result, DEBUG)
> - if (type(result[0]) != type([])):
> - result = [result]
> +# if (type(result[0]) != type([])):
> +# result = [result]
> return result
>
>
>

> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe@curr​ent.tigris.org
> For additional commands, e-mail: dev-help at current dot tigris dot org

--
Jack Neely <slack at quackmaster dot net>
Realm Linux Administration and Development
PAMS Computer Operations at NC State University
GPG Fingerprint: 1917 5AC1 E828 9337 7AA4 EA6B 213B 765F 3B6A 5B89

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe@curr​ent.tigris.org
For additional commands, e-mail: dev-help at current dot tigris dot org

« Previous message in topic | 2 of 2 | Next message in topic »

Messages

Show all messages in topic

[Patch] 4/5: solvedeps Pauline Middelink <middelink at polyware dot nl> Pauline Middelink <middelink at polyware dot nl> 2005-01-10 12:28:26 PST
     Re: [Patch] 4/5: solvedeps Jack Neely <jjneely at pams dot ncsu dot edu> Jack Neely <jjneely at pams dot ncsu dot edu> 2005-01-17 15:36:44 PST
Messages per page: