The following `diff --unified` fixed the rsync error, however I don't speak Python.
``` --- tar.py 2016-12-04 00:05:35.000000000 +0800 +++ tar.py.patched 2017-07-10 10:23:37.318949713 +0800 @@ -55,7 +55,7 @@ if os.path.isdir(srcdir): debmake.yn.yn('remove "{}" directory in tar'.format(srcdir), 'rm -rf ' + srcdir, yes) # copy from parent to srcdir using hardlinks (with debian/* data) - command = 'rsync -av --link-dest=' + os.getcwd() + '/' + parent + ' ' + parent + '/. ' + srcdir + command = 'rsync -av --link-dest="' + os.getcwd() + '/' + parent + '" "' + parent + '/." ' + srcdir print('I: $ {}'.format(command), file=sys.stderr) if subprocess.call(command, shell=True) != 0: print('E: rsync -aCv failed.', file=sys.stderr) ``` 2017-07-10 10:19 GMT+08:00 林博仁 <buo.ren....@gmail.com>: > Whoops, the console output is not complete for some reason (`debmake > --package directory-with-space --upstreamversion 1.0 --tar 2>&1 | > xclip -in -selection clipboard), here's a manually pasted one > > ``` > I: sanity check of parameters > W: -p "directory-with-space" != auto set value "" > W: -u "1.0" != auto set value "0~1707100213" > I: pkg="directory-with-space", ver="1.0", rev="1" > I: make the upstream tarball with "tar --exclude=debian" > I: pwd = "/tmp/directory with space" > I: pwd = "/tmp" > I: $ rsync -av --link-dest=/tmp/directory with space directory with > space/. directory-with-space-1.0 > sending incremental file list > rsync: link_stat "/tmp/with" failed: No such file or directory (2) > rsync: link_stat "/tmp/space" failed: No such file or directory (2) > rsync: link_stat "/tmp/directory" failed: No such file or directory (2) > rsync: link_stat "/tmp/with" failed: No such file or directory (2) > rsync: change_dir "/tmp//space" failed: No such file or directory (2) > --link-dest arg does not exist: /tmp/directory > > sent 20 bytes received 63 bytes 166.00 bytes/sec > total size is 0 speedup is 0.00 > rsync error: some files/attrs were not transferred (see previous > errors) (code 23) at main.c(1183) [sender=3.1.1] > E: rsync -aCv failed. > ```