#630794 sbuild: Could not create '~/build/logs': No such file or directory

#630794#5
Date:
2011-06-17 12:31:18 UTC
From:
To:
Hi,

It looks like one can't use ~ in ~/.sbuildrc?

$ grep log_dir ~/.sbuildrc
$log_dir = '~/build/logs';

$ sbuild $something
Could not create '~/build/logs': No such file or directory
Could not create '~/build/logs': No such file or directory
Could not create '~/build/logs': No such file or directory
sbuild (Debian sbuild) 0.62.3 (11 Jun 2011) on […]

$ ls -ld ~/build/logs
drwxr-xr-x 2 kibi kibi 4096 Jun 17 14:24 /home/kibi/build/logs

Mraw,
KiBi.

#630794#10
Date:
2011-06-17 14:34:58 UTC
From:
To:
We don't do any expansions on the paths, which are plain perl
strings/scalars.  If perl has a means of doing shell-like
expansions on strings like this, we can add it simply enough.
But there may be annoying quoting issues (since in the shell
you can do the appropriate escaping, whereas here it's
treated as verbatim).


Regards,
Roger

#630794#15
Date:
2015-12-24 00:06:39 UTC
From:
To:
Hi,

as Roger already explained adding support for ~ is simple enough but would mean
that the string now needs to be escaped for special characters. This might also
break existing configs which do expect that the string is taken verbatim.

What is your use-case for this feature?

Thanks!

cheers, josch

#630794#24
Date:
2024-07-26 05:41:56 UTC
From:
To:
Hello,

I stumbled upon this issue recently while trying to use the following
command:

$ sbuild -d unstable --extra-package=~/dev/debian/wip -v -A
...
W: ~/dev/debian/wip is neither a regular file nor a directory. Skipping...

But running the same command with a space instead of a = makes the shell
expand the ~ before passing the string to the program:

$ sbuild -d unstable --extra-package ~/dev/debian/wip -v -A

However, the man page of sbuild is using the = sign instead of spaces
to pass arguments. So other users will likely be tricked by trying
to follow the man page to pass extra packages from somewhere in their
home directory.

I think this bug should be fixed for new sbuild users to not waste
time trying to figure out why ~ is not expanded.

Thanks.