EU countries agree on climate packages