Kurt Roeckx <[EMAIL PROTECTED]> writes: > On Thu, Jan 18, 2007 at 03:12:12PM +0100, Goswin von Brederlow wrote: >> >> In the initial report you mentioned that sbuild has a problem with >> confusing names like this. Afaik sbuild solely works on source package >> name and version and that is always unique. Where do you get a >> conflict? > > It uses apt-cache to check for available versions, which as you show > gives both results. And sbuild's behaviour depends on the order > apt-cache returns those. > > > Kurt
Reading the source sbuild is prepared to parse multiple returns from apt-cache just fine. But it ignores the package name and only uses the version to keep them apart. So a case that would screw up sbuild would have to look something like this: Package: foo Binary: bar, foo Version: 1.2-3 Package: bar Binary: bar Version: 1.2-3 Too bad apt-cache doesn't have a --only-source option. Sbuild has to use package name and version. Something like this (untested): Line 424... while( <PIPE> ) { + $package = $1 if /^Package:\s+(\S+)\s*$/mi; $ver = $1 if /^Version:\s+(\S+)\s*$/mi; $tfile = $1 if /^Files:\s*\n((\s+.*\s*\n)+)/mi; } - if (defined $ver && defined $tfile) { + if (defined $package && defined $ver && defined $tfile) { - @{$entries{$ver}} = map { (split( /\s+/, $_ ))[3] } + @{$entries{"$package $ver"}} = map { (split( /\s+/, $_ ))[3] } split( "\n", $tfile ); } else { print PLOG "apt-cache returned no information about $pkg source\n"; print PLOG "Are there any deb-src lines in your /etc/apt/sources.list?\n"; return ("ERROR"); } } close( PIPE ); if ($?) { print PLOG "$conf::apt_cache failed\n"; return ("ERROR"); } - if (!defined($entries{$version})) { + if (!defined($entries{"$pkg $version"})) { But I don't yet see a problem here. The apt-cache check is purely informational. As long as it finds an entry with the right version it is happy and the "apt-get --only-source source" below that will always do the right thing. So the worst you get is that the "Can't find source" message is skipped and apt-get fails. Or not? MfG Goswin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]