--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: libdebian-installer: problems on Hurd with poll()
- From: Jérémie Koenig <jk@jk.fr.eu.org>
- Date: Fri, 4 Jun 2010 14:41:34 +0200
- Message-id: <AANLkTiniEJPq7_9xAgpB5dVExX9fTwR3MTbUqKnAb0oz@mail.gmail.com>
Package: libdebian-installer4
Version: 0.72
Tags: patch
User: jk@jk.fr.eu.org
Usertags: gsoc2010
Hello,
On Hurd, libdebian-installer gets stuck inside the internal_di_exec()
function. This is caused by the way poll() reports end-of-file, which
cannot be portably relied on.
The attach patch uses feof() instead of POLLHUP to detect it.
Though it's somewhat unrelated, it also disables short-circuiting
doxygen on Hurd, which does not apply any more and makes the package
fail to build because of missing files in debian/tmp/usr/share/doc.
--
Jérémie Koenig <jk@jk.fr.eu.org>
http://jk.fr.eu.org/
Index: packages/libdebian-installer/debian/control
===================================================================
--- packages/libdebian-installer/debian/control (revision 63370)
+++ packages/libdebian-installer/debian/control (working copy)
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Uploaders: Bastian Blank <waldi@debian.org>, Colin Watson <cjwatson@debian.org>
-Build-Depends: dpkg-dev (>= 1.13.5), debhelper (>= 7.3.0~), autotools-dev, doxygen [!hurd-i386]
+Build-Depends: dpkg-dev (>= 1.13.5), debhelper (>= 7.3.0~), autotools-dev, doxygen
Standards-Version: 3.8.1
Vcs-Svn: svn://svn.debian.org/d-i/trunk/packages/libdebian-installer
Index: packages/libdebian-installer/debian/rules
===================================================================
--- packages/libdebian-installer/debian/rules (revision 63370)
+++ packages/libdebian-installer/debian/rules (working copy)
@@ -21,9 +21,7 @@
override_dh_auto_build:
dh_auto_build
-ifneq ($(DEB_HOST_ARCH_OS),hurd)
$(MAKE) -C build/doc doc
-endif
override_dh_clean:
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
Index: packages/libdebian-installer/src/exec.c
===================================================================
--- packages/libdebian-installer/src/exec.c (revision 63370)
+++ packages/libdebian-installer/src/exec.c (working copy)
@@ -162,14 +162,12 @@
{
bool exit = false;
+ /* Implementations of poll() deliver various combinations of POLLIN and
+ POLLHUP on EOF. fgets() detects it and we check with feof() below.
+ References: http://www.greenend.org.uk/rjk/2001/06/poll.html */
for (i = 0; i < pipes; i++)
{
-/* References: http://www.greenend.org.uk/rjk/2001/06/poll.html */
-#if defined(__FreeBSD_kernel__)
- if ((pollfds[i].revents & POLLIN) && (! (pollfds[i].revents & POLLHUP)))
-#else
- if (pollfds[i].revents & POLLIN)
-#endif
+ if (pollfds[i].revents & (POLLIN | POLLHUP))
{
while (fgets (line, sizeof (line), files[i].file) != NULL)
{
@@ -180,8 +178,8 @@
len--;
}
files[i].handler (line, len, io_user_data);
+ exit = true;
}
- exit = true;
}
}
@@ -189,7 +187,7 @@
continue;
for (i = 0; i < pipes; i++)
- if (pollfds[i].revents & POLLHUP)
+ if (feof(files[i].file))
exit = true;
if (exit)
--- End Message ---
--- Begin Message ---
Source: libdebian-installer
Source-Version: 0.78
We believe that the bug you reported is fixed in the latest version of
libdebian-installer, which is due to be installed in the Debian FTP archive:
libdebian-installer-extra4-udeb_0.78_amd64.udeb
to main/libd/libdebian-installer/libdebian-installer-extra4-udeb_0.78_amd64.udeb
libdebian-installer-extra4_0.78_amd64.deb
to main/libd/libdebian-installer/libdebian-installer-extra4_0.78_amd64.deb
libdebian-installer4-dev_0.78_amd64.deb
to main/libd/libdebian-installer/libdebian-installer4-dev_0.78_amd64.deb
libdebian-installer4-udeb_0.78_amd64.udeb
to main/libd/libdebian-installer/libdebian-installer4-udeb_0.78_amd64.udeb
libdebian-installer4_0.78_amd64.deb
to main/libd/libdebian-installer/libdebian-installer4_0.78_amd64.deb
libdebian-installer_0.78.dsc
to main/libd/libdebian-installer/libdebian-installer_0.78.dsc
libdebian-installer_0.78.tar.gz
to main/libd/libdebian-installer/libdebian-installer_0.78.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 584538@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
<zumbi@debian.org> (supplier of updated libdebian-installer package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Tue, 22 Mar 2011 12:04:06 +0000
Source: libdebian-installer
Binary: libdebian-installer4 libdebian-installer4-dev libdebian-installer4-udeb libdebian-installer-extra4 libdebian-installer-extra4-udeb
Architecture: source amd64
Version: 0.78
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: <zumbi@debian.org>
Description:
libdebian-installer-extra4 - Library of some extra debian-installer functions
libdebian-installer-extra4-udeb - Library of some extra debian-installer functions (udeb)
libdebian-installer4 - Library of common debian-installer functions
libdebian-installer4-dev - Library of common debian-installer functions
libdebian-installer4-udeb - Library of common debian-installer functions (udeb)
Closes: 584538 612168
Changes:
libdebian-installer (0.78) unstable; urgency=low
.
[ Jeremie Koenig ]
* internal_di_exec(): use feof() instead of preprocessor conditionals
to handle the os-dependant status returned by poll() on end-of-file
(closes: #584538).
.
[ Martin Michlmayr ]
* Add support for Buffalo Linkstation LiveV3 (LS-CHL). Closes: #612168
* Add support for Buffalo Linkstation Mini (LS-WSGL).
.
[ Konstantinos Margaritis ]
* Add support for the new armhf port and the Genesi EfikaMX Smartbook/
Smarttop platforms.
.
[ Bastian Blank ]
* Add minimal support for SHA1 checksums in Release file parser.
* Adopt copyright file to reality.
.
[ Colin Watson ]
* Add a proper copyright/licence statement to subarch-x86-linux.c.
Checksums-Sha1:
82b1261fd39adfec632eaa162afdd1cb8cea2eca 1786 libdebian-installer_0.78.dsc
fc31854d7587d8cf4859861e33d801bcd941d10e 375307 libdebian-installer_0.78.tar.gz
4ba8483927a4bc9e1aff361fae3445a4c1475516 32260 libdebian-installer4_0.78_amd64.deb
c6cc01ea8171b01e4bd5fdef1e462294b60db6bc 169518 libdebian-installer4-dev_0.78_amd64.deb
ee6b30d91c8ef74ef6bc8e9a845e8516dca584f1 22504 libdebian-installer4-udeb_0.78_amd64.udeb
f3963751dc886847bd136f59e6bf51d287c1b151 13928 libdebian-installer-extra4_0.78_amd64.deb
e3a634882739a61e7fe84ca7bb01dd7873ec3313 4062 libdebian-installer-extra4-udeb_0.78_amd64.udeb
Checksums-Sha256:
037c637a4fa67e0a6adb15c1081753c531024a28a166fa7a796c2fd0e064a2a1 1786 libdebian-installer_0.78.dsc
87b65c5ee48de339892aa81b9ce51b6893f76c9a92c50c7026c8eea2f7d2f14a 375307 libdebian-installer_0.78.tar.gz
301e03dae17dc4ea7b57864f308af3e2f0cd8b9805f61b78fac5b2686b8452f4 32260 libdebian-installer4_0.78_amd64.deb
a68286ad21a0a9df3b784e11cdacc3604eb56935c025e93935469a7d97664533 169518 libdebian-installer4-dev_0.78_amd64.deb
9ea77697644574d38bd7cfe17ab488d77688e7132761a3530e9a3f3c6036e4ff 22504 libdebian-installer4-udeb_0.78_amd64.udeb
d4821fc6ebd4ddf4d8b0f2bb54c4813f668d4cd7d0198609a756a38abdeece84 13928 libdebian-installer-extra4_0.78_amd64.deb
dd0542f22c9a36f8df94fa4aeabe507e5fdb325f21bc6caa9b842dc9311fb908 4062 libdebian-installer-extra4-udeb_0.78_amd64.udeb
Files:
d1237d8020998ed717451f7a8510a368 1786 libs optional libdebian-installer_0.78.dsc
b8fb63c2ad9a68696a15de6fdc4ff741 375307 libs optional libdebian-installer_0.78.tar.gz
78f61989cfd26e9d4cdae6bfcdda959a 32260 libs optional libdebian-installer4_0.78_amd64.deb
86bdea872054b8dc40e9e05ccc50b16a 169518 libdevel optional libdebian-installer4-dev_0.78_amd64.deb
77fdf3926a0ff5acada2516eb8b0aa9f 22504 debian-installer optional libdebian-installer4-udeb_0.78_amd64.udeb
9640918503430bc2759a937c30a7f947 13928 libs optional libdebian-installer-extra4_0.78_amd64.deb
661ba055fa2c3495e3b51c6498966db4 4062 debian-installer optional libdebian-installer-extra4-udeb_0.78_amd64.udeb
Package-Type: udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAEBCAAGBQJNiJBtAAoJEK8ig6p24qx7QWoQAJ4UqSAO3OY0VBPhGzhv3eVL
+4lP/LOrRKH8vF0bSC3aXztvnJ9niwod57VCFd38aHO0dhcKJyUC6d8gCWW/10RP
kaxICpzMTIfAgWIckNt7hVA7CAA8oo31l4X4piPCQHfqnNAqLknA18OKSUl7TITu
AEZKU0SAhtrov/gEi7BhXRRg40hIv142xGaamc+hOEZLrZkeRx0WtMBZeyVmJ2gv
NauCZUacIvSc59wWF7xk7ZEpHRoIVnBeE2SZyjwsxHY5QoqjZCihVT8PHJBeUKvp
V5WSnkpFnhqIXXEutSm3gEYQDj6QbhQ1wZdu5nwjxl/1WY05JQb99lPh6YGyWre+
XBlURlD0felOifYjiwM2HmYmiR99/Ra/lyTbIURU3wM2R2NdliVS/s8NjhjSV8BB
zgsuWSDCX+nI6QFPHyT8PERHDZi5fvfnl8GoQ+Ykd93MEPSkeqHWgtd8UGiERt/N
ekb4dJxyslIAfdY4GIsqyUHJ3pnEcikJwAAW8J42SHLIllLRPmwQnOs03bwo/voL
BIC73D3Ol3j+zs41BpOA3zLhu9Xtnr9AYeFO+dyiboSTCqbRIs5dbn/gDbPFLtsM
cb90LP6tVe/M14y2TuOIam/lxUjotWpgXhiZcOTlfv01QDjicY+pfCj8Q7tuQUte
KFCyskdbVlZ9pktlkPPV
=+zU7
-----END PGP SIGNATURE-----
--- End Message ---