Brock Pytlik wrote: > Bart Smaalders wrote: >> Brock Pytlik wrote: >>> t_pkg_api_install.py: >>> 476:I don't understand the changes made here. This should still fail >>> during plan creation unless I've misunderstood something. >>> >> The problem was we were calling api_obj.execute_plan() >> even though there was nothing to do; this meant we set the result code >> twice and blew up in the history modules. Failing in plan_creation is >> fine, we just need to handle the case when there's nothing to do correctly. >> >> > I think what I'm confused about is that before, I thought we blew up > during the planning stage. If that's no longer the case, I'd like to > understand why. In the gate tip, a PlanCreationException is raised > inside image.make_install_plan because ba* didn't match any packages in > the current catalog. If that exception's no longer being raised, I'd > like to have a better understanding of why. Also, were installing ba* to > work, then foo would be installed as a dependency of bar, so the exit > code on line 476 really should be 0, not 1. > > I think this might be being caused by error not being set to 1 in the > except block starting line 2085.
Look at lines 157-164 of client/api.py. plan_install() can return True or False about nothingtodo() without throwing an exception. This can happen for a noexecute case especially. If you then turn around and call plan_execute(); there will be a failure. -- Shawn Walker _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
