[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

debconf brokeness on the Hurd



Package: debconf
Version: 0.3.53
Severity: important

[Note to release maintainers: The Hurd is not a released architecture, thus
 this bug is not release critical. ]

Hi Joey,

debconf is utterly broken on the Hurd. The installation of debconf and any
debconf related package dies with exit code 10. I can send you the debug
output, but I think I have identified the problem.

When debconf is invoked through a package script like the postinst file,
it calls

exec /usr/share/debconf/frontend $0 $*

frontend expects to be able to deduce the package name from the initial
argument ($0 above):

# Set the default title.
my $package;
if ($ARGV[0]=~m!^.*/(.*?)\.(?:postinst|postrm|prerm)$!) {
        $package=$1;
}
elsif (-e "/var/lib/dpkg/tmp.ci/control") {
...
else {
        # Being run some other way, not via a dpkg script.
        $package='';

	unless (trytemplate("$ARGV[0].templates")) {
	...
	}
}

But the Hurd has some clever mechanism to invoke scripts run without full
path name that makes it so that the script does not see its real file name,
but the somewhat bogus, but otherwise perfectly fine, '/dev/fd/6' (or some
other number).

This means, $ARGV[0] above is /dev/fd/6, and the script above fails
horribly, not being able to do anything correctly, and bails out

db_get 'debconf/preconfig'

because it is not properly initialized (the *.config script is not run, for
example). Running "/var/lib/dpkg/info/debconf.postinst configure" works
perfectly fine, because the /dev/fd/6 trick isn't applied for scripts
invoked by their full path.

You write:
	 frontend confmodule [params]

	=head1 DESCRIPTION

	This is a helper program for confmodules. It expects to be passed
	the name of the confmodule script to run, and any parameters for it.

	This whole thing is really a hack; in an ideal world, dpkg would handle
	all this.

But it is worse than that: It is a hack that doesn't work :(

I don't know debconf well enough to do anything about it.
I will try to make dpkg invoke the script with its full path, this will make
the Hurd to use it instead the /dev/fd/xxx trick. But this really needs to
be solved properly. I hope you can suggest something. Currently, neither
debconf nor any package that uses debconf is easily installable on the Hurd :(

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server 
Marcus Brinkmann              GNU    http://www.gnu.org    for public PGP Key 
Marcus.Brinkmann@ruhr-uni-bochum.de,     marcus@gnu.org    PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       brinkmd@debian.org



Reply to: