Package: apt-build
Version: 0.12.13
Severity: important
Tags: patch
Hi,
Sorry for bother you again. I just noticed that during the building
process, PATH will became NULL thus ld can't be found, failing the
compilation.
In addition, I've changed "/usr/lib/apt-build/" to "/usr/lib/apt-build".
It seems to be more friendly to me :P
The patch is attached.
Thanks,
Victor
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11.10
Locale: LANG=zh_TW.UTF-8, LC_CTYPE=zh_TW.UTF-8 (charmap=UTF-8)
Versions of packages apt-build depends on:
ii apt 0.6.41 Advanced front-end for dpkg
ii apt-utils 0.6.41 APT utility programs
ii debconf [debconf-2.0] 1.4.58 Debian configuration management sy
ii devscripts 2.9.7 Scripts to make the life of a Debi
ii dpkg-dev 1.13.11 package building tools for Debian
ii g++ 4:4.0.1-3 The GNU C++ compiler
ii gcc 4:4.0.1-3 The GNU C compiler
ii libappconfig-perl 1.56-2 Perl module for configuration file
ii libapt-pkg-perl 0.1.17 Perl interface to libapt-pkg
ii perl 5.8.7-5 Larry Wall's Practical Extraction
Versions of packages apt-build recommends:
ii build-essential 11.1 informational list of build-essent
ii fakeroot 1.5.4 Gives a fake root environment
-- debconf information:
* apt-build/arch_amd: athlon-xp
apt-build/arch_alpha: ev4
* apt-build/options:
apt-build/arch_intel: pentium
apt-build/arch_arm: armv2
* apt-build/make_options:
* apt-build/olevel: Strong
* apt-build/build_dir: /var/cache/apt-build/build
* apt-build/repository_dir: /var/cache/apt-build/repository
apt-build/arch_sparc: sparc
apt-build/arch_amd64: x86-64
* apt-build/add_to_sourceslist: true
diff -ru apt-build-0.12.13.orig/apt-build apt-build-0.12.13/apt-build
--- apt-build-0.12.13.orig/apt-build 2005-10-05 21:29:17.000000000 +0800
+++ apt-build-0.12.13/apt-build 2005-10-06 15:59:37.388819944 +0800
@@ -810,7 +810,7 @@
$conf->file($conf->get("config"));
$APT_BUILD_WRAPPER++ if $conf->wrapper; # define ENV var
- unshift @PATH, "/usr/lib/apt-build/" if $conf->wrapper;
+ unshift @PATH, "/usr/lib/apt-build" if $conf->wrapper;
return 1;
}
diff -ru apt-build-0.12.13.orig/apt-build.h apt-build-0.12.13/apt-build.h
--- apt-build-0.12.13.orig/apt-build.h 2005-09-17 22:34:11.000000000 +0800
+++ apt-build-0.12.13/apt-build.h 2005-10-06 15:59:23.799885776 +0800
@@ -1,7 +1,7 @@
#define APT_BUILD_CONF_PATH "/etc/apt/apt-build.conf"
#define APT_BUILD_STRING_ENV "APT_BUILD_WRAPPER"
-#define LIBDIR "/usr/lib/apt-build/"
+#define LIBDIR "/usr/lib/apt-build"
#define MAKE_ARGC 0
#define GCC_ARGC 2
diff -ru apt-build-0.12.13.orig/config.c apt-build-0.12.13/config.c
--- apt-build-0.12.13.orig/config.c 2005-10-05 21:29:17.000000000 +0800
+++ apt-build-0.12.13/config.c 2005-10-06 14:26:26.004839512 +0800
@@ -144,8 +144,8 @@
cmd_line_args[nb_apt_build_options++] = NULL;
#if 0
- for(i = 0; i < nb_apt_build_options; i++) */
- printf("argv[%d] -> %s\n", i, cmd_line_args[i]); */
+ for(i = 0; i < nb_apt_build_options; i++)
+ printf("argv[%d] -> %s\n", i, cmd_line_args[i]);
#endif
return cmd_line_args;
@@ -155,7 +155,6 @@
filterout_libdir_path (void)
{
char *path;
- char *newpath;
char *libdir;
int len;
@@ -167,10 +166,7 @@
if (libdir)
{
len = strlen (LIBDIR);
- memmove (libdir, libdir + len + 1, strlen (path) - len - (libdir - path) + 1);
- asprintf (&newpath, "PATH=%s", path);
- putenv (newpath);
- free (newpath);
+ setenv ("PATH", libdir + len + 1, 1);
}
}
}