Re: [PATCH 12/14] Remove calls to sanityCheckRequest()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On second thought, go with your original version. I apologize for
wasting your time, but there are some intricacies having to do with the
action queue that make the mountpoint check less than useful.

On Mon, 2009-03-02 at 10:27 -1000, David Cantrell wrote:
> David Lehman wrote:
> > On Sun, 2009-03-01 at 20:32 -1000, David Cantrell wrote:
> >> We don't have this function anymore, but I don't know if we need
> >> to be calling anything else.
> > 
> > We might want to add something, I'm not sure to be honest. Mostly,
> > device settings are checked at set-time via properties. There are
> > probably a few things that are not controlled in this way that should
> > be.
> 
> That's fine with me.  If we need to add it in the future, we can bring 
> it back.
> 
> > 
> > We might want to at least leave the isMountPointInUse check in place.
> > 
> 
> Added back in to the patch.
> 
> New patch attached.
> 
> >> ---
> >>  iw/lvm_dialog_gui.py       |   11 -----------
> >>  iw/partition_dialog_gui.py |   15 ---------------
> >>  iw/raid_dialog_gui.py      |    6 ------
> >>  3 files changed, 0 insertions(+), 32 deletions(-)
> >>
> >> diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
> >> index 6e093fe..3aebb20 100644
> >> --- a/iw/lvm_dialog_gui.py
> >> +++ b/iw/lvm_dialog_gui.py
> >> @@ -675,17 +675,6 @@ class VolumeGroupEditor:
> >>                      if luksdev:
> >>                          actions.append(ActionCreateDevice(luksdev))
> >>  
> >> -            err = self.storage.sanityCheckRequest(lv,
> >> -                                                  skipMntPtExistCheck=1,
> >> -                                                  pesize=pesize)
> >> -	    if not err:
> >> -		err = self.storage.isMountPointInUse(lv)
> >> -
> >> - 	    if err:
> >> - 		self.intf.messageWindow(_("Error With Request"),
> >> - 					"%s" % (err), custom_icon="error")
> >> - 		continue
> >> -
> >>  	    if usedev.format.exists and format.mountable and \
> >>                 self.storage.formatByDefault(usedev) and \
> >>  	       not queryNoFormatPreExisting(self.intf):
> >> diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
> >> index 2fdf856..b64d3bf 100644
> >> --- a/iw/partition_dialog_gui.py
> >> +++ b/iw/partition_dialog_gui.py
> >> @@ -175,15 +175,6 @@ class PartitionEditor:
> >>                                            primary=primary,
> >>                                            parents=disks)
> >>  
> >> -		err = storage.sanityCheckRequest(request)
> >> -		if not err:
> >> -		    err = doUIRAIDLVMChecks(request, self.storage)
> >> -		    
> >> -                if err:
> >> -                    self.intf.messageWindow(_("Error With Request"),
> >> -                                            "%s" % (err), custom_icon="error")
> >> -                    continue
> >> -
> >>                  # we're all set, so create the actions
> >>                  if luksdev:
> >>                      actions.append(ActionCreateDevice(luksdev))
> >> @@ -221,12 +212,6 @@ class PartitionEditor:
> >>                      if request.format.type != "none":
> >>                          actions.append(ActionResizeFormat(request, size))
> >>  
> >> -                err = self.storage.sanityCheckRequest(request)
> >> -                if err:
> >> -                    self.intf.messageWindow(_("Error With Request"),
> >> -                                            "%s" % (err), custom_icon="error")
> >> -                    continue
> >> -
> >>                  if request.format.exists and \
> >>                     getattr(request, "mountpoint", None) and \
> >>                     self.storage.formatByDefault(request):
> >> diff --git a/iw/raid_dialog_gui.py b/iw/raid_dialog_gui.py
> >> index 8757bbc..900e450 100644
> >> --- a/iw/raid_dialog_gui.py
> >> +++ b/iw/raid_dialog_gui.py
> >> @@ -201,12 +201,6 @@ class RaidEditor:
> >>  		   self.fsoptionsDict["migratecb"].get_active():
> >>                      fstype = self.fsoptionsDict["migfstypeCombo"].get_active_value()
> >>  
> >> -	    err = self.storage.sanityCheckRequest(request)
> >> -	    if err:
> >> -		self.intf.messageWindow(_("Error With Request"),
> >> -					"%s" % (err), custom_icon="error")
> >> -		continue
> >> -
> >>  	    if request.format.exists and \
> >>                 self.storage.formatByDefault(request):
> >>  		if not queryNoFormatPreExisting(self.intf):
> > 
> > _______________________________________________
> > Anaconda-devel-list mailing list
> > Anaconda-devel-list@xxxxxxxxxx
> > https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> 
> 
> plain text document attachment
> (0009-Remove-references-to-sanityCheckRequest.patch)
> >From 784897f762f876da788825c0c23946e65c0ff093 Mon Sep 17 00:00:00 2001
> From: David Cantrell <dcantrell@xxxxxxxxxx>
> Date: Mon, 2 Mar 2009 10:24:16 -1000
> Subject: [PATCH 9/9] Remove references to sanityCheckRequest()
> 
> Properties are checked at set-time.  Might have to bring back a
> main sanity check function in the future, but for now we're not
> using it.
> 
> Leave the isMountPointInUse() call.
> ---
>  iw/lvm_dialog_gui.py       |   16 ++++++----------
>  iw/partition_dialog_gui.py |   15 ---------------
>  iw/raid_dialog_gui.py      |    6 ------
>  3 files changed, 6 insertions(+), 31 deletions(-)
> 
> diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
> index 6e093fe..be16745 100644
> --- a/iw/lvm_dialog_gui.py
> +++ b/iw/lvm_dialog_gui.py
> @@ -675,16 +675,12 @@ class VolumeGroupEditor:
>                      if luksdev:
>                          actions.append(ActionCreateDevice(luksdev))
>  
> -            err = self.storage.sanityCheckRequest(lv,
> -                                                  skipMntPtExistCheck=1,
> -                                                  pesize=pesize)
> -	    if not err:
> -		err = self.storage.isMountPointInUse(lv)
> -
> - 	    if err:
> - 		self.intf.messageWindow(_("Error With Request"),
> - 					"%s" % (err), custom_icon="error")
> - 		continue
> +            err = self.storage.isMountPointInUse(lv)
> +
> +            if err:
> +                self.intf.messageWindow(_("Error With Request"),
> +                                        "%s" % (err), custom_icon="error")
> +                continue
>  
>  	    if usedev.format.exists and format.mountable and \
>                 self.storage.formatByDefault(usedev) and \
> diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
> index d1af32d..bdaaacd 100644
> --- a/iw/partition_dialog_gui.py
> +++ b/iw/partition_dialog_gui.py
> @@ -176,15 +176,6 @@ class PartitionEditor:
>                                            primary=primary,
>                                            parents=disks)
>  
> -		err = storage.sanityCheckRequest(request)
> -		if not err:
> -		    err = doUIRAIDLVMChecks(request, self.storage)
> -		    
> -                if err:
> -                    self.intf.messageWindow(_("Error With Request"),
> -                                            "%s" % (err), custom_icon="error")
> -                    continue
> -
>                  # we're all set, so create the actions
>                  if luksdev:
>                      actions.append(ActionCreateDevice(luksdev))
> @@ -222,12 +213,6 @@ class PartitionEditor:
>                      if request.format.type != "none":
>                          actions.append(ActionResizeFormat(request, size))
>  
> -                err = self.storage.sanityCheckRequest(request)
> -                if err:
> -                    self.intf.messageWindow(_("Error With Request"),
> -                                            "%s" % (err), custom_icon="error")
> -                    continue
> -
>                  if request.format.exists and \
>                     getattr(request, "mountpoint", None) and \
>                     self.storage.formatByDefault(request):
> diff --git a/iw/raid_dialog_gui.py b/iw/raid_dialog_gui.py
> index 8757bbc..900e450 100644
> --- a/iw/raid_dialog_gui.py
> +++ b/iw/raid_dialog_gui.py
> @@ -201,12 +201,6 @@ class RaidEditor:
>  		   self.fsoptionsDict["migratecb"].get_active():
>                      fstype = self.fsoptionsDict["migfstypeCombo"].get_active_value()
>  
> -	    err = self.storage.sanityCheckRequest(request)
> -	    if err:
> -		self.intf.messageWindow(_("Error With Request"),
> -					"%s" % (err), custom_icon="error")
> -		continue
> -
>  	    if request.format.exists and \
>                 self.storage.formatByDefault(request):
>  		if not queryNoFormatPreExisting(self.intf):
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux