Re: menu item for bterm-unifont
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Matt,
At 25 Feb 04 07:41:18 GMT,
Matt Kraai wrote:
> > bterm-unifont is called after configure network. And 'configure
> > network' step needs some additional glyph.
>
> The CVS version of anna should run the postinst. Would you please
> test it? This avoids the useless menu item.
As I've sent to Bug#232397 follow-up, I tried current CVS, but it goes
fail.
I found this is because configure_package function in anna/util.c uses
package *filename* instead of package *name*.
I'm almost novice about C language, so here is very nasty patch...
More smart patch is welcome :-)
- --- util.c 25 Feb 2004 07:28:35 -0000 1.30
+++ util.c 26 Feb 2004 14:56:09 -0000
@@ -234,7 +234,13 @@
char *command;
int ret;
- - if (asprintf(&command, "%s %s", DPKG_CONFIGURE_COMMAND, pkgfile) == -1)
+ char *truncated = strrchr(pkgfile, '/');
+ char *postfix = strchr(truncated, '_');
+ char pkgname[postfix - truncated + 1];
+ strncpy(pkgname, ++truncated, postfix - truncated);
+ pkgname[postfix - truncated] = '\0';
+
+ if (asprintf(&command, "%s %s", DPKG_CONFIGURE_COMMAND, pkgname) == -1)
return 0;
ret = !di_exec_shell_log(command);
free(command);
And unfortunately, I encountered another bug after this patch
applied. When bterm-unifont.postinst is executed, bogl-bterm
goes crash (Segmentation fault). Argh.
Thanks,
- --
Kenshi Muto
kmuto@debian.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkA+Cl4ACgkQQKW+7XLQPLEwagCfU42rMXNtyNC69SUp4pC3KUeF
BzsAn1aFPvTMr4Euw0ZvGpo3zpBesoiG
=/VdU
-----END PGP SIGNATURE-----
Reply to: