[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: emsetup bug





Neil Williams wrote:
On Thu, 01 Feb 2007 19:33:02 -0500
Jim Heck <jsurf@heckheck.com> wrote:

I first instrument the code with some prints to show that the
conditional inside the find_latest_gcc never gets entered.  By my
analysis, this is due to the fact that in the regexp, the grouping
([0-9\.\-]*) is followed by $.  The first part will match the gcc
numeric version including a trailing (or inclusive) -.  Next comes the
$, which matches only the end of line, so the pattern never matches any
package name and $choice remains 0.

Jim, I think your problems may come down to this part of the apt-cross
manpage:

-u|--update
          Force the user-specific apt-cross cache to be updated. Note
that all sources for this suite on the specified architecture will be
erased before the package cache is updated. If /etc/apt/sources.list
does not contain a source for this suite, the updated cache for this
suite will be empty. Use -m|--mirror to specify a source to be added to
whatever sources are available for this suite in /etc/apt/sources.list.

Note the bit about "if sources.list does not contain a source for this
suite". Can you confirm if this could be your problem? I can then look
at fixing that in apt-cross 0.0.6.

emdebian-tools doesn't use the --mirror functionality within apt-cross
- if you have been relying on that, this would result in empty cache
files and $choice being set to zero.

--
Neil, I now understand the logic of your regexp. You are matching in the conditional for specifically the gcc-4.1 package name. I now understand why you have the '-' in the grouping (so that the other gcc-4.1-<blah> package names don't match) and the '$' right after the grouping. I understand that your expression will match and have a numeric $1 for a package name like gcc-4.1.

OK.

I'm not sure why my system isn't giving me any such package name for the architecture specific cache. I have switched back to the original Tools.pm file. I tried all your suggestions from the last posting without success. I have one suspicion, I am behind a proxy server, and I notice that my .dpkg-cross/apt.conf-unstable file is being rewritten each time I run ' apt-cross -v -a powerpc -S unstable -u'. This effectively erases the proxy line I have that allows apt to work properly. Could this be the reason my architecture specific apt-cache is empty?

Thanks for all your time looking into this. I'm more than happy to provide you with any debugging information you need, and I don't want to be a tax on your time if this is my own issue (if you think so, just say so, my next step was going to be to try all this on a fresh Ubuntu install, perhaps from a place where I don't need the proxy server).

Thanks,

-Jim

Here are the results of the specific tests

------------------------------------ The contents of my sources.list, which I apt-get update
androcross:/home/jh150702# cat /etc/apt/sources.list
deb http://www.emdebian.org/debian unstable main
deb-src http://www.emdebian.org/debian unstable main

deb http://mirrors.ircam.fr/pub/debian/ unstable main
deb-src http://mirrors.ircam.fr/pub/debian/ unstable main

androcross:/home/jh150702# apt-get update
Get:1 http://mirrors.ircam.fr unstable Release.gpg [378B]
Ign http://www.emdebian.org unstable Release.gpg
Get:2 http://mirrors.ircam.fr unstable Release [79.6kB]
Hit http://www.emdebian.org unstable Release Ign http://www.emdebian.org unstable/main Packages/DiffIndex
Ign http://www.emdebian.org unstable/main Sources/DiffIndex
Ign http://www.emdebian.org unstable/main Packages
Ign http://www.emdebian.org unstable/main Sources
Get:3 http://mirrors.ircam.fr unstable/main Packages/DiffIndex [2038B]
Hit http://www.emdebian.org unstable/main Packages
Hit http://www.emdebian.org unstable/main Sources
Get:4 http://mirrors.ircam.fr unstable/main Sources/DiffIndex [2023B]
Fetched 83.6kB in 3s (26.5kB/s)
Reading package lists... Done


------------------------------------ Clean up .dpkg-cross before trying anything
androcross:/home/jh150702# rm -rf ~/.dpkg-cross/
androcross:/home/jh150702# exit
exit
androcross: /home/jh150702
$ rm -rf ~/.dpkg-cross/
androcross: /home/jh150702


------------------------------------ I run apt-cross, which overwrites my proxy line.
$ apt-cross -v -a powerpc -S unstable -u
Updating unstable on powerpc using /etc/apt/sources.list
recreating /home/jh150702/.dpkg-cross/apt.conf-unstable
recreating /home/jh150702/.dpkg-cross/sources.unstable
androcross: /home/jh150702


------------------------------------ I run apt-get. I also tried this with my proxy line added to the apt.conf-unstable file before running apt-get here, but it didn't help $ apt-get -v -o Apt::Architecture=powerpc -c ~/.dpkg-cross/apt.conf-unstable update
apt 0.6.46.4 for linux i386 compiled on Dec  4 2006 17:48:09
Supported modules:
*Ver: Standard .deb
*Pkg:  Debian dpkg interface (Priority 30)
S.L: 'deb' Standard Debian binary tree
S.L: 'deb-src' Standard Debian source tree
Idx: Debian Source Index
Idx: Debian Package Index
Idx: Debian dpkg status file
androcross: /home/jh150702


------------------------------------ This is my listing of jim.pl
$ cat ./jim.pl
#!/usr/bin/perl -w

       my $arch = "powerpc";
       my $suite = "unstable";
       my $dpkg_cross_dir = "/home/jh150702/.dpkg-cross/";
my $result = `fakeroot apt-cache -o Apt::Architecture=$arch -c $dpkg_cross_dir/apt.conf-$suite pkgnames gcc`;
       my @list = split (/\n/, $result);
       my $choice = 0;
       foreach my $line (@list)
       {
           print "$line\n";
               if ($line =~ /gcc-([0-9\.\-]*)$/)
               {
                       if ($1 > $choice) { $choice = $1; }
                       print "1 = $1\n";
               }
       }
       print "final choice = $choice\n";
androcross: /home/jh150702


------------------------------------ Here I show how jim.pl doesn't find a gcc-4.1
$ ./jim.pl
gcc-4.1-powerpc-linux-gnu
gcc-3.4-base
gcc
gcc-4.1-powerpc-linux-gnu-base
gcc-2.95-powerpc-cross
gcc-4.1-source
final choice = 0
androcross: /home/jh150702


------------------------------------ Here I show my mirror really does have gcc-4.1, at least for x86 (I checked for powerpc too via webbrowser)
$ apt-cache pkgnames gcc |grep 4.1
gcc-4.1-doc
gcc-4.1-powerpc-linux-gnu
gcc-4.1-mips-linux-gnu
gcc-4.1-ia64-linux-gnu-base
gcc-4.1-base
gcc-4.1-mipsel-linux-gnu-base
gcc-4.1-m68k-linux-gnu
gcc-4.1-sparc-linux-gnu-base
gcc-4.1-alpha-linux-gnu
gcc-4.1-sparc-linux-gnu
gcc-4.1
gcc-4.1-mipsel-linux-gnu
gcc-4.1-ia64-linux-gnu
gcc-4.1-mips-linux-gnu-base
gcc-4.1-arm-linux-gnu
gcc-4.1-arm-linux-gnu-base
gcc-4.1-s390-linux-gnu
gcc-4.1-locales
gcc-4.1-powerpc-linux-gnu-base
gcc-4.1-source
gcc-4.1-m68k-linux-gnu-base
androcross: /home/jh150702


------------------------------------ Here I show how my .dpkg-cross/apt.conf-unstable is being overwritten
androcross: /home/jh150702
$ cat ./.dpkg-cross/apt.conf-unstable
Dir "/home/jh150702/.dpkg-cross/"
{
 Etc "/home/jh150702/.dpkg-cross/"
 {
   SourceList "sources.unstable";
 };
 State "unstable/";
 Cache "unstable/";
};
androcross: /home/jh150702
$ echo 'Acquire::http::Proxy "http://129.147.62.25:8080";;' >> .dpkg-cross/apt.conf-unstable
androcross: /home/jh150702
$ cat ./.dpkg-cross/apt.conf-unstableDir "/home/jh150702/.dpkg-cross/"
{
 Etc "/home/jh150702/.dpkg-cross/"
 {
   SourceList "sources.unstable";
 };
 State "unstable/";
 Cache "unstable/";
};
Acquire::http::Proxy "http://129.147.62.25:8080";;
androcross: /home/jh150702
$ apt-cross -v -a powerpc -S unstable -uUpdating unstable on powerpc using /etc/apt/sources.list
recreating /home/jh150702/.dpkg-cross/apt.conf-unstable
recreating /home/jh150702/.dpkg-cross/sources.unstable
androcross: /home/jh150702
$ cat ./.dpkg-cross/apt.conf-unstable
Dir "/home/jh150702/.dpkg-cross/"
{
 Etc "/home/jh150702/.dpkg-cross/"
 {
   SourceList "sources.unstable";
 };
 State "unstable/";
 Cache "unstable/";
};
androcross: /home/jh150702
$




Reply to: