我正在 Debian Squeeze 盒子上安装 gitolite,并进行以下预置:
gitolite gitolite/gituser string git
gitolite gitolite/adminkey string ssh-rsa AAAAB3ECT
gitolite gitolite/gitdir string /var/lib/git
安装时:
# debconf-set-selections /var/cache/debconf/gitolite.preseed
# apt-get install gitolite
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
git-daemon-run gitweb
The following NEW packages will be installed:
gitolite
0 upgraded, 1 newly installed, 0 to remove and 26 not upgraded.
Need to get 0 B/114 kB of archives.
After this operation, 348 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package gitolite.
(Reading database ... 24715 files and directories currently installed.)
Unpacking gitolite (from .../gitolite_1.5.4-2+squeeze1_all.deb) ...
Setting up gitolite (1.5.4-2+squeeze1) ...
adduser: The home dir must be an absolute path.
dpkg: error processing gitolite (--configure):
subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
Errors were encountered while processing:
gitolite
E: Sub-process /usr/bin/dpkg returned an error code (1)
为什么?预种子是从手动配置的安装中提取的,这里并且在另一台机器上没有问题。
答案1
格式debconf-set-selections
应为:
gitolite gitolite/gituser string git
请注意,我只使用一个空格作为分隔符。
来自 debconf-set-selections 的帮助:
所有其他行设置一个问题的值,并且应包含四个值,每个值由一个空格字符。