Package: duplicity
Version: 0.7.18.2-1
Severity: normal
Tags: patch upstream

Dear Maintainer,

When using mega backend for the first time, the initial directory
creation fails:

> --- Start running command BKP at 18:08:19.874 ---
> 1577988500 ERROR torsocks[13151]: Unable to resolve. Status reply: 4 (in 
> socks5_recv_resolve_reply() at socks5.c:677)
> mkdir: hostname
> Reading globbing filelist /root/.duply/hostname/exclude
> megals: /Root/hostname
> Local and Remote metadata are synchronized, no sync needed.
> megals: /Root/hostname
> Last full backup date: none
> Last full backup is too old, forcing full backup
> Reuse configured PASSPHRASE as SIGN_PASSPHRASE
> megarm: duplicity-full.20200102T180820Z.vol1.difftar.gpg
> megaput: duplicity-full.20200102T180820Z.vol1.difftar.gpg
> Attempt 1 failed. BackendException: Error running 'megaput -u 
> em...@example.net -p mypassword --no-progress --path 
> /Root/hostname/duplicity-full.20200102T180820Z.vol1.difftar.gpg 
> /tmp/duplicity-yolDd8-tempdir/mktemp-idQtpH-2': returned 1, with output:
> 
> ERROR: Upload failed for '/tmp/duplicity-yolDd8-tempdir/mktemp-idQtpH-2': 
> Parent directory doesn't exist: /Root/hostname
> ^C18:08:27.223 Task 'BKP' failed with exit code '4'.

Running megamkdir manually fixes the issue.

This is actually easy to fix, it's just a typo calling _make_dir while
the class function, just above, is named _makedir.

Attached is a patch.

I did check the problem is still present in the development tree.

Thank you

-- System Information:
Debian Release: 10.2
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-6-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8), 
LANGUAGE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages duplicity depends on:
ii  gnupg             2.2.12-1+deb10u1
ii  libc6             2.28-10
ii  librsync1         0.9.7-10+b1
ii  python            2.7.16-1
ii  python-fasteners  0.12.0-3
ii  python-lockfile   1:0.12.2-2

Versions of packages duplicity recommends:
ii  python-oauthlib  2.1.0-1
ii  python-paramiko  2.4.2-0.1
ii  python-pexpect   4.6.0-1
ii  python-urllib3   1.24.1-1
ii  rsync            3.1.3-6

Versions of packages duplicity suggests:
pn  lftp                <none>
pn  ncftp               <none>
pn  python-boto         <none>
pn  python-cloudfiles   <none>
pn  python-gdata        <none>
pn  python-pip          <none>
pn  python-swiftclient  <none>
pn  tahoe-lafs          <none>

-- no debconf information
--- duplicity/backends/megabackend.py	2020-01-02 18:33:17.129411886 +0100
+++ duplicity/backends/megabackend.py	2020-01-02 19:12:47.004365142 +0100
@@ -94,7 +94,7 @@
         for folder in path:
             p = p + u'/' + folder
             try:
-                self._make_dir(p)
+                self._makedir(p)
             except:
                 pass
 

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to