yada generated deb not calling update-menus

2007-04-17 Thread Tim Day
I (novice deb builder) am building a deb with yada (and pbuilder) on
Etch.  I don't have any problems getting a sensible /usr/share/menu
entry put in place, but it doesn't actually seem to appear in any menus
until I do a manual sudo update-menus (or install some other package
which triggers a menu update itself).

When I look at the postinst file in my yada-generate deb then the only
thing of note is:

if [ "" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ];
then update-menus; fi

...which clearly isn't ever going to do anything!
But I can't figure out what's needed to get yada to (presumably) put
whatever's needed into those empty quotes so that the configure step
will call update-menus.

You can see my whole deb-building script at 
http://fracplanet.cvs.sourceforge.net/fracplanet/fracplanet/mkdeb?revision=1.15&view=markup
the yada input is setup in the cat<

Re: yada generated deb not calling update-menus

2007-04-18 Thread Thijs Kinkhorst
Hoi Tim,

On Wed, 2007-04-18 at 00:32 +0100, Tim Day wrote:
> I (novice deb builder) am building a deb with yada (and pbuilder) on
> Etch.  I don't have any problems getting a sensible /usr/share/menu
> entry put in place, but it doesn't actually seem to appear in any menus
> until I do a manual sudo update-menus (or install some other package
> which triggers a menu update itself).

I'm wondering why you, as a 'novice deb builder', chose yada as a
packaging helper. I wouldn't recommend it to new packagers (or at all),
because it hides large parts of the build process.

You can see that right here: there's code generated that doesn't work,
but it's very opaque what does this, why, and how to change it.

debhelper might lead to a longer debian/rules file, but it has the
advatages that you actually see which steps are taken in what order, and
that you can easily control what happens.


Thijs


signature.asc
Description: This is a digitally signed message part


Re: yada generated deb not calling update-menus

2007-04-18 Thread Steve Langasek
On Wed, Apr 18, 2007 at 12:32:25AM +0100, Tim Day wrote:
> I (novice deb builder) am building a deb with yada

Yuck.

> I don't have any problems getting a sensible /usr/share/menu
> entry put in place, but it doesn't actually seem to appear in any menus
> until I do a manual sudo update-menus (or install some other package
> which triggers a menu update itself).

> When I look at the postinst file in my yada-generate deb then the only
> thing of note is:

> if [ "" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ];
> then update-menus; fi

> ...which clearly isn't ever going to do anything!
> But I can't figure out what's needed to get yada to (presumably) put
> whatever's needed into those empty quotes so that the configure step
> will call update-menus.

Replacing yada with something non-bletcherous.  TTBOMK, the only person
willfully using yada for official Debian packages is the yada author.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


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



Re: yada generated deb not calling update-menus

2007-04-18 Thread Tim Day
On Wed, 2007-04-18 at 10:59 +0200, Thijs Kinkhorst wrote:
> I'm wondering why you, as a 'novice deb builder', chose yada as a
> packaging helper. I wouldn't recommend it to new packagers (or at all),
> because it hides large parts of the build process.

Ah, but that's exactly why I chose it.  I did start off trying dh
scripts but thought it seemed like a lot of work for a simple install.
I didn't discover yada until I got hold of the Martin Krafft Debian
book, liked the look of the apparently cleaner approach and got
something which seemed to work well very quickly.

> You can see that right here: there's code generated that doesn't work,
> but it's very opaque what does this, why, and how to change it.

A look at an old .deb built with yada on sarge (where it worked fine wrt
menus) shows it just contains
  if test -x /usr/bin/update-menus; then update-menus; fi
Searching etch's /usr/bin/yada (perl) for update-menus finds
  "\nif [ \"$1\" = \"configure\" ] && ...
the $1 is presumably being prematurely substituted when it should go
into the postinst script intact.
Aha... in fact a few lines later I can see some presumably correctly
escaped
  "\nif [ \"\$1\" = \"configure\" ];

I've just put in a reportbug.

My only options for fixing my debs immediately seems to be patching yada
or unpacking the debs and patching the affected line.  I'm not sure
which is more horrible.

> debhelper might lead to a longer debian/rules file, but it has the
> advatages that you actually see which steps are taken in what order, and
> that you can easily control what happens.

Hmmm maybe I should give dh another go.
Regards
Tim



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



Re: yada generated deb not calling update-menus

2007-04-18 Thread James Westby
On (18/04/07 00:32), Tim Day wrote:
> I (novice deb builder) am building a deb with yada (and pbuilder) on
> Etch.  I don't have any problems getting a sensible /usr/share/menu
> entry put in place, but it doesn't actually seem to appear in any menus
> until I do a manual sudo update-menus (or install some other package
> which triggers a menu update itself).
> 
> When I look at the postinst file in my yada-generate deb then the only
> thing of note is:
> 
> if [ "" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ];
> then update-menus; fi

That should be $1 (or is it $2?) in the first set of quotes. Whatever is
writing this out is probably a shell or perl script that isn't escaping
it. I don't have internet access to check your script now though.

Thanks,

James

-- 
  James Westby   --GPG Key ID: B577FE13-- http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256


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



Re: yada generated deb not calling update-menus

2007-04-18 Thread Tim Day
On Wed, 2007-04-18 at 17:13 +0100, James Westby wrote:
> On (18/04/07 00:32), Tim Day wrote:
> > When I look at the postinst file in my yada-generate deb then the only
> > thing of note is:
> > 
> > if [ "" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ];
> > then update-menus; fi
> 
> That should be $1 (or is it $2?) in the first set of quotes. Whatever is
> writing this out is probably a shell or perl script that isn't escaping
> it. I don't have internet access to check your script now though.

That does seem to be the problem; there's bug #419878 in for it now.

Tim



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