Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40983 - Force autom4te version when using autoconf wrapper
Summary: Force autom4te version when using autoconf wrapper
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 39553
  Show dependency tree
 
Reported: 2004-02-09 09:45 UTC by Caleb Tennis (RETIRED)
Modified: 2004-02-15 13:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caleb Tennis (RETIRED) gentoo-dev 2004-02-09 09:45:21 UTC
Some users will emerge multiple versions of autoconf without cleaning up previous versions (for example, have 2.57a and 2.58 installed simultaneously).

The problem with this is that /usr/bin/autoconf-2.xx calls /usr/bin/autom4te, which should call the appropriate version, but this scenario could happen:

/usr/bin/autoconf-2.57a gets called, which in turn called /usr/bin/autom4te (from the AUTOM4TE variable), which determines that /usr/bin/autom4te-2.58 needs to be called.  This causes a versioning conflict.

Instead, we should add a line in /usr/bin/autoconf which sets the AUTOM4TE environment variable to set the appropriate autom4te version when using autoconf. That is, in /usr/bin/autoconf-2.58, set AUTOM4TE='/usr/bin/autom4te-2.58'

That way, the proper autom4te gets called from autoconf.

Reproducible: Always
Steps to Reproduce:
emerge two simultaneous versions of autoconf without cleaning the older one out.  This is reasonable, so that software designers can test their auto scripts on multiple versions.

Actual Results:  
programs calling autoconf specific versions fail because autom4te may run a 
different conflicting version.
Comment 1 Caleb Tennis (RETIRED) gentoo-dev 2004-02-09 10:09:55 UTC
Proposed patch:

Index: ac-wrapper-2.pl
===================================================================
RCS file: /home/cvsroot/gentoo-x86/sys-devel/autoconf/files/ac-wrapper-2.pl,v
retrieving revision 1.1
diff -u -3 -p -r1.1 ac-wrapper-2.pl
--- ac-wrapper-2.pl     7 Nov 2003 23:47:20 -0000       1.1
+++ ac-wrapper-2.pl     9 Feb 2004 18:08:30 -0000
@@ -67,6 +67,11 @@ if ($ENV{WANT_AUTOCONF} ne '2.1') {

 $ENV{WANT_ACWRAPPER_DEBUG} and print STDERR "ac-wrapper: will execute <$binary>\n";

+if($ENV{AUTOM4TE} eq "") {
+  $ENV{AUTOM4TE} = $binary;
+  $ENV{AUTOM4TE} =~ s/autoconf/autom4te/;
+}
+
 exec $binary, @ARGV;

 die "ac-wrapper: ouch, couldn't call binary ($binary).\n";
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-15 13:15:46 UTC
Done.  Small tweak though:

--
Index: files/ac-wrapper-2.pl
===================================================================
RCS file: /home/cvsroot/gentoo-x86/sys-devel/autoconf/files/ac-wrapper-2.pl,v
retrieving revision 1.2
diff -u -r1.2 ac-wrapper-2.pl
--- files/ac-wrapper-2.pl       15 Feb 2004 09:07:07 -0000      1.2
+++ files/ac-wrapper-2.pl       15 Feb 2004 21:12:36 -0000
@@ -65,6 +65,11 @@
     }
 }
  
+if(($ENV{AUTOM4TE} eq "") && ($binary ne "$0-2.13")) {
+       $ENV{AUTOM4TE} = $binary;
+       $ENV{AUTOM4TE} =~ s/autoconf/autom4te/;
+}
+
 $ENV{WANT_ACWRAPPER_DEBUG} and print STDERR "ac-wrapper: will execute <$binary>\n";
  
 exec $binary, @ARGV;