Package: apt-build

----- Forwarded message from Yann Rouillard <[EMAIL PROTECTED]> -----

> From: Yann Rouillard <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Bug apt-build
> Date: Mon, 23 May 2005 00:33:36 +0200
> User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404)
> X-Spam-Status: No, score=-2.6 required=3.8 tests=BAYES_00 autolearn=ham 
>       version=3.0.2
> 
> Bonjour,
> 
> Je suis en train d'essayer apt-build qui est un vraiment un super outil 
> (bravo !).
> 
> Je suis cependant tombé sur quelques bugs dans la version du dépot 
> expérimental en faisant:
> apt-build build-source apache
> 
> J'ai joins les patchs correctifs:
> 
> - get_pkg_version.patch
> corrige quelques bugs dans la fonction get_pkg_version,
> un $_ au lieu d'un shift pour récupérer le premier argument
> et la recherche du mot clé Candidate ne marche à tous les coups qu'en 
> locale anglaise. J'ai rajouté un LANG=C
> Il y a peut etre d'autres endroits où cela est nécessaire.
> 
> - parse_config_fix.patch
> pour le cas de cc, si l'option "options" n'était pas défini, le pointeur 
> null à la fin du tableau argv n'était pas mis d'où plantage.
> 
> Yann

> --- /usr/bin/apt-build        2005-05-13 21:06:11.000000000 +0200
> +++ /usr/bin/apt-build.new    2005-05-22 21:16:45.000000000 +0200
> @@ -401,11 +401,11 @@
>  
>  sub get_pkg_version
>  {
> -    my $pkg_name = $_;
> +    my $pkg_name = shift;
>      my $pkg_version;
>  
>      # Look for candidate version
> -    open APTCIN, "apt-cache policy $pkg_name |";
> +    open APTCIN, "LANG=C apt-cache policy $pkg_name |";
>      while(<APTCIN>)
>      { $pkg_version = $1 if(/^\s+Candidate: (.*)$/); }
>      close(APTCIN);

> --- config.c  2005-05-13 21:04:28.000000000 +0200
> +++ config.c.new      2005-05-22 23:58:09.000000000 +0200
> @@ -137,11 +137,12 @@
>        cmd_line_args =
>       (char **) malloc (sizeof (char *) * (argc + GCC_ARGC + 1));
>  
> +      i = argc + GCC_ARGC;
> +
>        if (args.options &&
>         strlen (args.options) &&
>         (str = strtok (args.options, " ")))
>       {
> -       i = argc + GCC_ARGC;
>         do
>           {
>             cmd_line_args[i++] = strdup(str);
> @@ -149,9 +150,10 @@
>               realloc(cmd_line_args, sizeof(char *) * (i + 1));
>           }
>         while ((str = strtok (NULL, " ")));
> -       cmd_line_args[i] = NULL;
>       }
>  
> +      cmd_line_args[i] = NULL;
> +
>        /* Build the command line */
>        cmd_line_args[0] = argv[0];
>  


----- End forwarded message -----

-- 
Julien Danjou
.''`.  Debian Developer
: :' : http://julien.danjou.info
`. `'  http://people.debian.org/~acid
  `-   9A0D 5FD9 EB42 22F6 8974  C95C A462 B51E C2FE E5CD

Attachment: signature.asc
Description: Digital signature

Reply via email to