Package: apt-listbugs
Version: 0.1.12
Severity: normal
Tags: help

I am filing this bug report against my own package, since I noticed
something awkward that I am unable to understand.
Hence this is intended as both a reminder of the issue and a call for
help.

The issue is that the send-hook-info.rb auxiliary script seems to
break with Ruby 2.0.

Please take a look at the following transcript (the input file is
attached):

$ ruby1.9.1 /usr/share/doc/apt-listbugs/examples/send-hook-info.rb 
v3-hookinfo_install_1lib_upgrade_1lib.txt 'ruby1.9.1 /usr/sbin/apt-listbugs apt'
APT_HOOK_INFO_FD set to 5
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
serious bugs of libnss-ldap (264-2.2 → 264-2.5) <Resolved in some Version>
 #706182 - libnss-ldap: purging deletes shared config file 
/etc/libnss-ldap.conf still in use by other architectures (Fixed: 
libnss-ldap/265-3)
serious bugs of libnss-ldap:i386 (→ 264-2.5) <Resolved in some Version>
 #706182 - libnss-ldap: purging deletes shared config file 
/etc/libnss-ldap.conf still in use by other architectures (Fixed: 
libnss-ldap/265-3)
 #661628 - libnss-ldap: fails to configure: tries to run /etc/init.d/nscd but 
/etc/init.d/unscd is the one that actually exists (Fixed: libnss-ldap/265-1)
Summary:
 libnss-ldap(1 bug), libnss-ldap:i386(2 bugs)
Are you sure you want to install/upgrade the above packages? [Y/n/?/...] Y

$ ruby1.9.1 /usr/share/doc/apt-listbugs/examples/send-hook-info.rb 
v3-hookinfo_install_1lib_upgrade_1lib.txt 'ruby2.0 /usr/sbin/apt-listbugs apt'
APT_HOOK_INFO_FD set to 5
Retrieving bug reports... Done
Parsing Found/Fixed information... Done
serious bugs of libnss-ldap (264-2.2 → 264-2.5) <Resolved in some Version>
 #706182 - libnss-ldap: purging deletes shared config file 
/etc/libnss-ldap.conf still in use by other architectures (Fixed: 
libnss-ldap/265-3)
serious bugs of libnss-ldap:i386 (→ 264-2.5) <Resolved in some Version>
 #706182 - libnss-ldap: purging deletes shared config file 
/etc/libnss-ldap.conf still in use by other architectures (Fixed: 
libnss-ldap/265-3)
 #661628 - libnss-ldap: fails to configure: tries to run /etc/init.d/nscd but 
/etc/init.d/unscd is the one that actually exists (Fixed: libnss-ldap/265-1)
Summary:
 libnss-ldap(1 bug), libnss-ldap:i386(2 bugs)
Are you sure you want to install/upgrade the above packages? [Y/n/?/...] Y

$ ruby2.0 /usr/share/doc/apt-listbugs/examples/send-hook-info.rb 
v3-hookinfo_install_1lib_upgrade_1lib.txt 'ruby2.0 /usr/sbin/apt-listbugs apt'
APT_HOOK_INFO_FD set to 7

$ ruby2.0 /usr/share/doc/apt-listbugs/examples/send-hook-info.rb 
v3-hookinfo_install_1lib_upgrade_1lib.txt 'ruby1.9.1 /usr/sbin/apt-listbugs apt'
APT_HOOK_INFO_FD set to 7
/usr/sbin/apt-listbugs:344:in `initialize': Bad file descriptor (Errno::EBADF)
        from /usr/sbin/apt-listbugs:344:in `open'
        from /usr/sbin/apt-listbugs:344:in `<main>'


In summary, apt-listbugs works with both Ruby 1.9 and Ruby 2.0, but
send-hook-info.rb seems to fail to work correctly with Ruby 2.0 !

I cannot understand where the problem lies.

http://www.ruby-doc.org/core-2.0.0/IO.html#method-c-pipe
http://www.ruby-doc.org/core-2.0.0/Process.html#method-c-fork
http://www.ruby-doc.org/core-2.0.0/Kernel.html#method-i-exec
seem to confirm that the code is correct...

Do anyone have any idea of what's wrong and how it may be fixed?
VERSION 3
APT::Architecture=amd64

libnss-ldap 264-2.2 amd64 same < 264-2.5 amd64 same 
/var/cache/apt/archives/libnss-ldap_264-2.5_amd64.deb
libnss-ldap - - none < 264-2.5 i386 same 
/var/cache/apt/archives/libnss-ldap_264-2.5_i386.deb
libnss-ldap 264-2.2 amd64 same < 264-2.5 amd64 same **CONFIGURE**
libnss-ldap - - none < 264-2.5 i386 same **CONFIGURE**

Reply via email to