On 02/25/10 08:12 PM, Danek Duvall wrote:
Shawn Walker wrote:

http://cr.opensolaris.org/~swalker/pkg-14832/

So now if the package is marked renamed, it'll show up as "State: ...
(Renamed)", but there won't be a "Renamed to:" line.  Should we have that
line, but have it be empty?  If so, then I think all you have to do is
change pi.dependencies[0] to pi.dependencies[0:1] (assuming that we get
back an empty iterable instead of None, if there aren't any dependencies).

I thought there could be multiple dependencies for a rename?

There can be ... but if we have zero (a broken package) I think we should
alert the user.  If you change pi.dependencies[0] to pi.dependencies[0:1],
then you get an empty list rather than an IndexError.  Not the prettiest
output, but expedient.  And the remainder of the iteration (over the slice
[1:]) is empty, so you don't see the other lines.  I don't care too much
how you code it, though.

Okay, empty string it is then.

I'm a bit sketched out by the fact that you're groping through the raw
action strings, rather than converting to actions, so it's good to see
this change for the renamed case.  Care to fix the obsolete case, too?

There's a massive performance difference between using the raw string
vs. parsing the action string minimally.

I figured.  I just have visions of things like

     set pkg.obsoletedddd=something yomamma=true

So many bad jokes I could respond with; I'll resist.

and finding that the package gets marked obsolete.  Perhaps if you find
"pkg.obsolete=", then you can fully parse the action to be sure?

Sure.

I didn't mean for you to go change how obsolete interacts with variants,
just this parsing thing.

Ah, my bad.  I'll change that.

--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to