Re: debhelper for python-central, problems with prerm/postinst

2008-01-07 Thread Ben Finney
Vincent Bernat [EMAIL PROTECTED] writes:

 On Mon, 07 Jan 2008 18:17:34 +1100, Ben Finney
 [EMAIL PROTECTED] wrote:
  So, how do Python-language packagers work around this bug
  currently?
 
 I don't use dh_installinit and I put the correct snippet in
 postinst/prerm by hand, waiting for the bug to be fixed.

When you say by hand, exactly when do you insert the postinst/prerm
snippet? When making the 'debian/foo.{prerm,postinst}' files the first
time? Immediately after building a binary package? Something else?

-- 
 \I was in Las Vegas, at the roulette table, having a furious |
  `\ argument over what I considered to be an odd number.  -- |
_o__)Steven Wright |
Ben Finney


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Python modules not installed correctly with pycentral

2008-01-07 Thread Josselin Mouette
Le lundi 07 janvier 2008 à 07:56 +0100, Vincent Bernat a écrit :
 Well, if you can change the order for postinst, you will get wrong order
 in prerm.

debhelper (5.0.44) unstable; urgency=low

  * prerm and postrm scripts are now generated in a reverse order than
preinst and postinst scripts. For example, if a package uses
dh_pysupport before dh_installinit, the prerm will first stop the init
script and then remove the python files.

-- 
 .''`.
: :' :  We are debian.org. Lower your prices, surrender your code.
`. `'   We will add your hardware and software distinctiveness to
  `-our own. Resistance is futile.


signature.asc
Description: Ceci est une partie de message	numériquement signée


Re: Python modules not installed correctly with pycentral

2008-01-07 Thread Vincent Bernat
OoO  Pendant le  temps de  midi du  lundi 07  janvier 2008,  vers 12:50,
Pierre Habouzit [EMAIL PROTECTED] disait:

  Le lundi 07 janvier 2008 à 07:56 +0100, Vincent Bernat a écrit :
  Well, if you can change the order for postinst, you will get wrong order
  in prerm.
  
  debhelper (5.0.44) unstable; urgency=low
  
* prerm and postrm scripts are now generated in a reverse order than
  preinst and postinst scripts. For example, if a package uses
  dh_pysupport before dh_installinit, the prerm will first stop the
 init
  script and then remove the python files.
 
 Good news. I will check that it works and propose to close the bug I cited
 in another message.

   It does work.

I  have just  tested and  #386970 is  still present  with  py_support at
least. In postinst, I have  first the snippet by dh_installinit and then
the snippet by dh_pysupport. In prerm, I have exactly the same thing.

I have tested on a dummy package with just debhelper and I have the same
bug.

You can check the attached tar.gz. Here is the postinst I get:

8--
#!/bin/sh 
set -e
# Automatically added by dh_installinit
if [ -x /etc/init.d/test-debhelper ]; then
update-rc.d test-debhelper defaults /dev/null
if [ -x `which invoke-rc.d 2/dev/null` ]; then
invoke-rc.d test-debhelper start || exit $?
else
/etc/init.d/test-debhelper start || exit $?
fi
fi
# End automatically added section
# Automatically added by dh_pysupport
if which update-python-modules /dev/null 21; then
update-python-modules  test-debhelper.dirs
fi
# End automatically added section
8--

And the prerm:

8--
#!/bin/sh
set -e
# Automatically added by dh_installinit
if [ -x /etc/init.d/test-debhelper ]; then
if [ -x `which invoke-rc.d 2/dev/null` ]; then
invoke-rc.d test-debhelper stop || exit $?
else
/etc/init.d/test-debhelper stop || exit $?
fi
fi
# End automatically added section
# Automatically added by dh_pysupport
if which update-python-modules /dev/null 21; then
update-python-modules -c  test-debhelper.dirs
fi
# End automatically added section
8--

+++-==-==-
ii  debhelper  5.0.63 helper programs for debian/rules



pgptL7VcpILb8.pgp
Description: PGP signature


debhelper-python.tar.gz
Description: Binary data
-- 
I WILL NOT PLEDGE ALLEGIANCE TO BART
I WILL NOT PLEDGE ALLEGIANCE TO BART
I WILL NOT PLEDGE ALLEGIANCE TO BART
-+- Bart Simpson on chalkboard in episode 7F09


Re: Python modules not installed correctly with pycentral

2008-01-07 Thread Vincent Bernat
OoO Lors de la soirée naissante du lundi 07 janvier 2008, vers 18:52, je
disais:

 I  have just  tested and  #386970 is  still present  with  py_support at
 least. In postinst, I have  first the snippet by dh_installinit and then
 the snippet by dh_pysupport. In prerm, I have exactly the same thing.

 I have tested on a dummy package with just debhelper and I have the same
 bug.

From the source  of debhelper, I see that the inversion  is done only at
compat level 6  or more. Putting 6 in debian/compat  makes the trick. Is
it the correct way of handling this since debhelper 0.6 does not exist?

Joey, for your reference, the thread starts here:
 http://lists.debian.org/debian-python/2008/01/msg00022.html

We discuss of this changelog entry:
 http://lists.debian.org/debian-python/2008/01/msg00029.html

If you can sched some light on me about this issue... ;-)
-- 
Don't compare floating point numbers just for equality.
- The Elements of Programming Style (Kernighan  Plauger)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Python modules not installed correctly with pycentral

2008-01-07 Thread Pierre Habouzit
On Mon, Jan 07, 2008 at 05:52:52PM +, Vincent Bernat wrote:
 OoO  Pendant le  temps de  midi du  lundi 07  janvier 2008,  vers 12:50,
 Pierre Habouzit [EMAIL PROTECTED] disait:
 
   Le lundi 07 janvier 2008 à 07:56 +0100, Vincent Bernat a écrit :
   Well, if you can change the order for postinst, you will get wrong order
   in prerm.
   
   debhelper (5.0.44) unstable; urgency=low
   
 * prerm and postrm scripts are now generated in a reverse order than
   preinst and postinst scripts. For example, if a package uses
   dh_pysupport before dh_installinit, the prerm will first stop the
  init
   script and then remove the python files.
  
  Good news. I will check that it works and propose to close the bug I cited
  in another message.
 
It does work.
 
 I  have just  tested and  #386970 is  still present  with  py_support at
 least. In postinst, I have  first the snippet by dh_installinit and then
 the snippet by dh_pysupport. In prerm, I have exactly the same thing.

  you need to use compat level 6 for that.

-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org


pgpL7wFn8jyko.pgp
Description: PGP signature


Re: Python modules not installed correctly with pycentral

2008-01-07 Thread Vincent Bernat
OoO En cette  soirée bien amorcée du lundi 07  janvier 2008, vers 22:12,
Pierre Habouzit [EMAIL PROTECTED] disait:

   debhelper (5.0.44) unstable; urgency=low
   
 * prerm  and postrm  scripts are  now generated  in  a reverse
   order than  preinst and postinst scripts. For  example, if a
   package uses  dh_pysupport before dh_installinit,  the prerm
   will first stop  the init script and then  remove the python
   files.
  
  Good news. I will check that it works and propose to close the bug I cited
  in another message.
 
It does work.
 
 I  have just  tested and  #386970 is  still present  with  py_support at
 least. In postinst, I have  first the snippet by dh_installinit and then
 the snippet by dh_pysupport. In prerm, I have exactly the same thing.

   you need to use compat level 6 for that.

OK. Therefore, if we use pure debhelper :
 - depends on debhelper (= 5.0.44)
 - set debian/compat to 6
 - add a lintian override for this
 - call first dh_pysupport (or dh_pycentral) then dh_installinit

And we use cdbs :
 - depends on debhelper (= 5.0.44)
 - set debian/compat to 6
 - add a lintian override for this
 - add this  in debian/rules to disallow first  run of dh_installinit to
   modify postinst/prerm/postrm scripts:
  DEB_DH_INSTALLINIT_ARGS := -n
 - add or modify binary-install/package target:
  binary-install/yourbinarypackage::
dh_installinit -p$(cdbs_curpkg)
   or (not tested):
  $(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
dh_installinit -p$(cdbs_curpkg)

I don't know if make would allow to append something at the beginning of
an existing target to avoid such a silly work-around.

Thanks for your help.
-- 
BOFH excuse #238:
You did wha... oh _dear_


pgpbSESwSNm20.pgp
Description: PGP signature


Re: Python modules not installed correctly with pycentral

2008-01-07 Thread Vincent Bernat
OoO En cette  soirée bien amorcée du lundi 07  janvier 2008, vers 22:38,
je disais:

 And we use cdbs :
  - depends on debhelper (= 5.0.44)
  - set debian/compat to 6
  - add a lintian override for this
  - add this  in debian/rules to disallow first  run of dh_installinit to
modify postinst/prerm/postrm scripts:
   DEB_DH_INSTALLINIT_ARGS := -n
  - add or modify binary-install/package target:
   binary-install/yourbinarypackage::
   dh_installinit -p$(cdbs_curpkg)
or (not tested):
   $(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
   dh_installinit -p$(cdbs_curpkg)

 I don't know if make would allow to append something at the beginning of
 an existing target to avoid such a silly work-around.

Or another  way to fix  this into cdbs  could be to  have a way  to tell
debhelper   that  we  want   postinst  built   in  reverse   order,  not
postrm/prerm. Some kind of  REVERSE environment variable that would tell
which  files  should  be  built  in  reverse  order  and  defaulting  to
prerm,postrm.
-- 
panic(floppy: Port bolixed.);
2.2.16 /usr/src/linux/include/asm-sparc/floppy.h


pgpnSPkdtseu1.pgp
Description: PGP signature


Voce recebeu uma recomendacao

2008-01-07 Thread Carlos
Você foi recomendado por um Amigo!
Um amigo seu visitou nosso site e recomendou seu e-mail:
Seu amigo acessou nosso site e recomendou que você conhecesse nossos cursos. 
Acesse http://www.cursos24horas.vai.la e confira suas opções.

Quem Somos?
O Cursos 24 Horas é um site que busca o aprendizado dos seus alunos através de 
cursos pela internet. Você recebe as apostilas do curso, faz as provas pela 
internet e recebe seu certificado pelos correios na sua casa. Veja mais 
http://www.cursos24horas.vai.la

Quanto Custa?
O preço dos cursos varia de R$ 20 a R$ 40, sendo que o valor é uma taxa única, 
você tem o curso inteiro disponível ao pagá-la.
É uma forma simples e barata de aprender e incrementar seu currículo. Se você 
pretende subir na sua carreira, fazer cursos é um ótimo começo. Veja mais 
http://www.cursos24horas.vai.la

Como Funciona?
Você se cadastra no site, inscreve-se no curso desejado, efetua o pagamento por 
depósito bancário e logo em seguida o curso já é liberado para você. Você pode 
acessar as apostilas do seu curso, pode tirar as dúvidas on-line com um 
professor especializado, faz as provas pela internet e recebe seu certificado 
em casa. 
http://www.cursos24horas.vai.la

Para mais detalhes, acesse http://www.cursos24horas.vai.la e veja as vantagens 
de fazer um curso conosco.

Seu e-mail foi recomendado por um amigo que visitou nosso site. Por questões de 
privacidade, não guardamos dados sobre a pessoa que recomendou, nem sobre quem 
ela recomenda. Seu e-mail não foi armazenado, e você não receberá um novo 
e-mail (a menos que essa pessoa recomende-a novamente). Se o caso se repetir, e 
você achar que alguém está abusando do nosso serviço, envie um e-mail para 
[EMAIL PROTECTED] e comunique-nos para tomarmos as devidas providências.