Changeset 154 for trunk


Ignore:
Timestamp:
06/16/10 14:41:29 (15 years ago)
Author:
kdeugau
Message:

/trunk

Improve build-dep detection error handling so it complains about the
missing package instead of spitting Perl errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r153 r154  
    14161416    my @pkglist = qx { dpkg-query --showformat '\${status}\t\${version}\n' -W $pkg };
    14171417# need to check if no lines returned - means a bad buildreq
    1418     my ($reqstat,undef,undef,$reqver) = split /\s+/, $pkglist[0];
    1419     if ($reqstat !~ /install/) {
     1418    if (!$pkglist[0]) {
    14201419      print " * Missing build-dependency $pkg!\n";
    14211420      $reqflag = 0;
    14221421    } else {
    1423       my ($resp) = qx { dpkg --compare-versions $reqver '$rel' $ver && echo "ok" };
    1424       if ($resp !~ /^ok/) {
     1422      my ($reqstat,undef,undef,$reqver) = split /\s+/, $pkglist[0];
     1423      if ($reqstat !~ /install/) {
     1424        print " * Missing build-dependency $pkg!\n";
    14251425        $reqflag = 0;
    1426         print " * Buildreq $pkg is installed, but wrong version ($reqver):  Need $ver\n"
    1427       }
    1428     } # end not installed/installed check
     1426      } else {
     1427        my ($resp) = qx { dpkg --compare-versions $reqver '$rel' $ver && echo "ok" };
     1428        if ($resp !~ /^ok/) {
     1429          $reqflag = 0;
     1430          print " * Buildreq $pkg is installed, but wrong version ($reqver):  Need $ver\n"
     1431        }
     1432      } # end not installed/installed check
     1433    }
    14291434  } # end req loop
    14301435
Note: See TracChangeset for help on using the changeset viewer.