Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么在安装过程中没有调用我的debian/config脚本?_Debian_Package_Debconf - Fatal编程技术网

为什么在安装过程中没有调用我的debian/config脚本?

为什么在安装过程中没有调用我的debian/config脚本?,debian,package,debconf,Debian,Package,Debconf,我想在debian包中使用debconf来获得一些用户输入。我有一个debian/config文件: #!/bin/sh set -e . /usr/share/debconf/confmodule db_fset dn-native-drivers/choose_port seen false db_clear db_purge db_input critical dn-native-drivers/choose_port || true db_go 和debian/templates文件:

我想在debian包中使用debconf来获得一些用户输入。我有一个debian/config文件:

#!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_fset dn-native-drivers/choose_port seen false
db_clear
db_purge
db_input critical dn-native-drivers/choose_port || true
db_go
和debian/templates文件:

Template: dn-native-drivers/choose_port
Type: string
Default: 50
Description: Which vcom-port should be used?
 The port can be changed later in /etc/dn with the property
 vcom.nativePort

当我自己调用配置脚本时,它只是在做我想做的事情(显示
debconf
question),但是当我使用
dpkg buildpackage-us-uc
构建包,然后使用
dpkg-I packagename
安装包时,不会显示问题。我检查了配置文件和模板文件是否在control.tar.gz中,它们是否在那里。如果有关系的话,我用拉斯比安。为什么在安装过程中没有调用我的控制脚本?

好的,我注意到调用了配置脚本(使用echo语句调用stderr) 使用调试模式:

DEBCONF_DEBUG=developer
export DEBCONF_DEBUG
我可以指出问题是找不到模板。问题在于:

db_clear
db_purge
我这样做的目的是确保黛比没有存钱 已删除配置值,但此语句已删除
前者定义了模板定义。删除它们后,对话框将在安装过程中打开。

如果您想在安装过程中被问到这个问题,那么
db\u fset dn native drivers/choose\u port seen false行似乎是至关重要的

否则,我的问题是,它只在
dpkg重新配置过程中问这个问题