Padraig O'Briain wrote:
On 03/03/09 01:31, Brock Pytlik wrote:
I think I'd rather see the code on lines 266-311 of installupdate.py
(or at least some of it) living in bootenv.py. is_bename_valid is
essentially the same as bootenv.check_be_name and the functionality
like is_be_name_in_use, and even possibly validate_be_name would be
useful for all clients. Please consider relocating it and reusing the
code available in bootenv.py.
I have logged bug 7062 for this.
I really think it makes more sense to put this in the proper place now,
but I've said my piece on that. This encourages us to have duplicate or
nearly duplicate code, which has burned us, repeatedly.
Brock
I have reworked the webrev to fix some issues pointed out to me about
remembering BE name when SUNWipkg and SUNWipkg-gui are installed
before image update.
New webrev is at http://cr.opensolaris.org/~padraig/ips-4503-v3/.
Padraig
Brock
Padraig O'Briain wrote:
I have reworked the webrev to address these issues.
The webrev validates the user input of the BE name in the same way
as the repository name is validated in Manage Repositories dialog.
The webrev does not attempt to set a default BE name.
The new webrev is at http://cr.opensolaris.org/~padraig/ips-6986-v1/
Padraig
On 02/27/09 21:05, Brock Pytlik wrote:
installupdate.py:
373-386: there are other api exceptions that can bubble up from
this code. Not being able to mount the BE for example or being
unable to copy the BE in the first place. It probably makes sense
to catch those at this same spot unless there's a reason not to.
api_errors has a full list of the api_exceptions which can bubble
out, just look for the ones that subclass BEException
From what I remember, being unable to rename the BE means that the
operation has failed before any of the bits got updated. It looks
to me like the code as is tells the user that "everything worked
except the BE doesn't have the right name, but the bits have been
updated so go ahead and reboot." I'm fairly certain this is wrong.
Same comment applies to update manager.
Brock
Padraig O'Briain wrote:
The webrev, http://cr.opensolaris.org/~padraig/ips-4503-v1/ , fixes
4503 Modify New Boot Environment dialog to allow BE name to be
specified..
This change makes the BE Name text field visible in the dialog
that appears when doing Update All.
The specified BE name is passed to Image.plan_update_all which
throws an exception if the name is not a valid BE name.
Perhaps, we should validate the name ourselves and display an
error message before calling plan_update_all.
If the name is already in use the text
"A problem occured while attempting to rename the boot environment
currently named opensolaris-12 to opensolaris"
is added to the dialog which is displayed after the update all has
fixined.
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss