Re: Proposal patch for bug #780986 (Unmount server after backup)



I finally finished with some other pressing deja-dup work and got a chance to review this.

I ended up committing a patch, but it had the following differences with yours:
- Calls cleanup() at the end of any Operation, not just OperationVerify (i.e. also unmounts at end of a restore)
- The unmount logic is in BackendFile, not BackendRemote - with support in each subclass for reporting back if we mounted the location

In testing, I couldn't get the unmount working for a plugged-in drive. (A) nautilus is the one mounting that, not us and (B) even when I called unmount, it didn't seem to unmount in nautilus.

But it works for remote locations at least!

Thanks for the patch! And for kicking me into action on this :)


On Fri, Mar 8, 2019, at 17:10, Michael Terry wrote:
That’s not a bad approach, and thank you for the patch!

I might not get to it immediately, but I will look at it.


On Fri, Mar 8, 2019, at 16:37, Jordi Chulia via deja-dup-list wrote:
Hi everyone,

I have attached a patch that could deal with this bug: 
https://bugs.launchpad.net/deja-dup/+bug/780986

Regarding the bug itself, I understand that Deja-Dup should not unmount 
a share if a user is browsing it or even just if a user expects the 
remote share to be mounted, so the changes I propose deal with this 
making Deja-Dup trying to unmount the share only if it has been 
explicitly mounted by Deja-Dup in order to perform the backup (or any 
other operation).

The patch introduces a new backend method 'clean_up()' that gets called 
at the end of the Verify operation. This method would take care of any 
kind of backend tear down, that in the case of remote backends means to 
try unmounting the remote if it has been explicitly mounted.

Given that I have no experience with Deja-Dup's codebase or Vala (just 
a tiny one-line bugfix for elementary Os' Calendar :P ) I don't expect 
this patch to be accepted. Maybe even the strategy I propose is not 
good enough. Anyway, I am open to ideas and suggestions.


Regards,
Jordi Chulia



_______________________________________________
deja-dup-list mailing list
deja-dup-list gnome org
https://mail.gnome.org/mailman/listinfo/deja-dup-list


Attachments:
  • unmount_after_backup.patch

_______________________________________________
deja-dup-list mailing list
deja-dup-list gnome org
https://mail.gnome.org/mailman/listinfo/deja-dup-list




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