Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Debhelper sequencing: Service program can't start until Py..

 
   Soft32 Home -> Linux -> Python RSS
Next:  Accepted haskell-zip-archive 0.1.1.3-1 (source al..  
Author Message
Ben Finney

External


Since: May 12, 2005
Posts: 55



(Msg. 1) Posted: Sat Sep 12, 2009 5:20 am
Post subject: Debhelper sequencing: Service program can't start until Python packages are configured
Archived from groups: linux>debian>maint>python (more info?)

Howdy all,

I'm packaging a service program implemented in Python. To run, the
program needs to import some modules from Python packages, and the
service provided by the Debian package uses an init script.

The default sequencing for Debhelper 7 means that code generated by
'dh_installinit' appears before code generated by either of
'dh_pycentral' or 'dh_pysupport' in the 'postinst' script.

The resulting postinst script is generated by debhelper with no explicit
mention of either 'dh_installinit' nor 'dh_pysupport':

=====
#!/bin/sh
set -e
# Automatically added by dh_installinit
if [ -x "/etc/init.d/gracie" ]; then
update-rc.d gracie defaults >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d gracie start || exit $?
else
/etc/init.d/gracie start || exit $?
fi
fi
# End automatically added section
# Automatically added by dh_pysupport
if which update-python-modules >/dev/null 2>&1; then
update-python-modules gracie.public
fi
# End automatically added section
=====

The problem comes when the 'dh_installinit' code not only installs the
package init script, it tries to execute it to start the service. That
fails, of course, because the 'dh_pysupport' code has not yet been
executed and the Python packages are not yet available for import. (In
this case, this has been reported as Bug#519623.)

Should the default sequence for 'dh_installinit' not appear after
'dh_pycentral' or 'dh_pysupport'? Should I report this as a bug in
Debhelper's default sequencing?

--
\ "Absurdity, n. A statement or belief manifestly inconsistent |
`\ with one's own opinion." —Ambrose Bierce, _The Devil's |
_o__) Dictionary_, 1906 |
Ben Finney


--
To UNSUBSCRIBE, email to debian-python-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[gentoo-user] Bandwidth monitor on per service/program basis - Hi I am looking to find a tool that will allow me to monitor which applications or services are utilising my network..

How to use start telnet service - I've installed RedLinux 8.0. Accoding to some website, they said we need to configure "telnet" file which is ...

Howto start a service with xinetd on RedHat 9.0? - Hello: So far I start a user "daemon" manually from the command line, or at boot time by adding a line in rc....

[gentoo-user] How to add the program that auto excuted whe.. - Hi all, I wonder how to add the program that auto excuted when xfce start. I know it is easy for gnome, just add....

[PATCH RT] Use raw spinlocks in NMI print sequencing. - Currently NMI uses spinlocks to serialize the prints. We need these to be raw spinlocks for PREEMPT_RT Signed-off-by:....

[gentoo-user] Firewall service dependencies: service alrea.. - Hi all, I always get this message at the end of an emerge or when running rc-update: >>> Regenerating..
       Soft32 Home -> Linux -> Python All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]