I need to find a more reliable way to do that gpg key import, it seems to work 2 out of 3 times without problem, though sometimes it doesn't work at all.
Here's the relevant command section:
#Setup the medibuntu repo
cp -p /usr/bin/wget $TEMP_DIR/usr/bin/wget
sleep 1
LC_ALL=C chroot $TEMP_DIR /usr/bin/wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | /usr/bin/apt-key add -
VerifyExitCode "medibuntu apt key add"