Uganda and Tanzania agree to build pipeline