Front page

[BUG] verify fails for relative root paths

8b02a339d62345ee9a0847fa0015d406
OBTUSE AFTERMATH REFORM

From: Maximilian Gaukler <development@maxgaukler.de>
Date: Sun, 28 Aug 2016 12:11:13 +0200

   Hi,
   
   verification fails when using a relative root path, as it can be seen 
   from the following simple testcase:
   
   
   Commands to reproduce: (I still have to learn how to write these yarn 
   files...)
   
   # setup test data
   mkdir -p src dest
   obnam backup --root=src --repository=dest
   
   # relative dir -- fails
   obnam verify --root=src --repository=dest
   
   # absolute dir -- works
   obnam verify --root=`pwd`/src --repository=dest
   
   
   
   Output:
   
   Backed up 1 files (of 1 found), uploaded 0.0 B in 0s at 0.0 B/s average 
   speed
   
   # relative dir:
   ERROR: R3E151X: Client my-hostname, generation 2 does not have file src
   
   # absolute dir:
   00h00m00s verifying file 2/1 0 B/0 B 0 %: /tmp/obnam-test/src
   Verify did not find problems.
   
   
   
   
   
   Thanks,
   
   Max
   
   _______________________________________________
   obnam-dev mailing list
   obnam-dev@obnam.org
   http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org
From: Lars Wirzenius <liw@liw.fi>
Date: Sat, 29 Oct 2016 10:54:20 +0300

   I'm afraid I can't make up my mind about whether this is a bug. On the
   one hand there is the convenience of not having to give the full path
   to a file when restoring; on the other hand there is the simplicity of
   always unambiguously requiring the full path.
   
   I generally favour simplicity over convenience, however, and so I'm
   going to treat this as a non-bug. Sorry.
   
   On Sun, Aug 28, 2016 at 12:11:13PM +0200, Maximilian Gaukler wrote:
   > Hi,
   > 
   > verification fails when using a relative root path, as it can be seen from
   > the following simple testcase:
   > 
   > 
   > Commands to reproduce: (I still have to learn how to write these yarn
   > files...)
   > 
   > # setup test data
   > mkdir -p src dest
   > obnam backup --root=src --repository=dest
   > 
   > # relative dir -- fails
   > obnam verify --root=src --repository=dest
   > 
   > # absolute dir -- works
   > obnam verify --root=`pwd`/src --repository=dest
   > 
   > 
   > 
   > Output:
   > 
   > Backed up 1 files (of 1 found), uploaded 0.0 B in 0s at 0.0 B/s average
   > speed
   > 
   > # relative dir:
   > ERROR: R3E151X: Client my-hostname, generation 2 does not have file src
   > 
   > # absolute dir:
   > 00h00m00s verifying file 2/1 0 B/0 B 0 %: /tmp/obnam-test/src
   > Verify did not find problems.
   > 
   > 
   > 
   > 
   > 
   > Thanks,
   > 
   > Max
   > 
   > _______________________________________________
   > obnam-dev mailing list
   > obnam-dev@obnam.org
   > http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org
   >
From: Rémi Rampin <remirampin@gmail.com>
Date: Sun, 30 Oct 2016 21:01:59 -0400

   2016-10-29 03:54 EDT, Lars Wirzenius <liw@liw.fi>:
   
   > [...] there is the simplicity of always unambiguously requiring the full
   > path.
   >
   > I generally favour simplicity over convenience, however, and so I'm going
   > to treat this as a non-bug. Sorry.
   >
   
   If relative paths don't work and can't be expected to work, it seems to me
   that they should be loudly refused by the client rather than perform
   something that will always fail with a seemingly unrelated message like
   "does not have that file".
   
   How about just refusing to run with relative paths? It looks like a bug.
From: Lars Wirzenius <liw@liw.fi>
Date: Wed, 2 Nov 2016 09:39:38 +0200

   On Sun, Oct 30, 2016 at 09:01:59PM -0400, Rémi Rampin wrote:
   > How about just refusing to run with relative paths? It looks like a bug.
   
   That is a good suggestion. Would someone like to make a patch?