Refactor source code repository activation to support Ubuntu 24.04
In Ubuntu 24.04 (Noble Numbat) the file /etc/apt/sources.list exists,
but has only comments. Thus the sed
invocation always failed. To avoid
this, test first if newer format exists, and if it does, just update it
and don't bother checking or updating old files.