我正在尝试构建一个 Debian 软件包,但我遇到了这个奇怪的伪目录问题。我跑:
$ fakeroot debian/rules binary
我之前已经构建了二进制文件,但是我的系统上肯定发生了一些变化。现在 dh_md5sums 出错并返回:
md5sum: include: Is a directory
dh_md5sums: command returned error code
make: *** [binary-arch] Error 1
的确,include
是一个目录。因此,我在 dh_md5sums 中添加了一些调试语句,以找出为什么include
会被散列,尽管应该过滤掉目录的行。添加:
doit("ls", "-l", "$tmp");
表明,include
当 dh_md5sums 运行时,它确实不是一个目录:
total 28
drwxr-xr-x 2 root root 4096 2009-06-18 13:36 bin
-rwxr-xr-x 3 root root 4096 2009-06-18 13:36 include
drwxr-xr-x 3 root root 4096 2009-06-18 13:36 var
# some directories removed for brevity's sake
那么,我可以删除它吗?我补充说:
doit("rm", "$tmp/include");
并得到:
rm: cannot remove `debian/myproject/include': Is a directory
也许它......变成了一个目录?我ls -l
在下面添加了另一个rm
并得到:
total 28
drwxr-xr-x 2 root root 4096 2009-06-18 13:36 bin
-rwxr-xr-x 3 root root 4096 2009-06-18 13:36 include
drwxr-xr-x 3 root root 4096 2009-06-18 13:36 var
当脚本运行完毕后,我可以这样做:
$ ls -l
drwxr-xr-x 2 x x 4096 2009-06-18 13:48 bin
drwxr-xr-x 3 x x 4096 2009-06-18 13:48 include
drwxr-xr-x 3 x x 4096 2009-06-18 13:48 var
...这很奇怪,因为它include
变成了一个目录并且所有权发生了变化(x
是我的用户名)。 include
甚至包含它应该包含的所有头文件。
有谁知道发生了什么?