I edited the /etc/lsb-release
and /usr/lib/os-release
files, then created the /etc/upstream-release/lsb-release
path with the original lsb-release
file.
the add-apt-repository
command no longer works NoDistroTemplateException
after this change but the change IS REQUIRED because I want to release my distro.
How do I make it work the same?
/etc/upstream-release/lsb-release:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.4 LTS"
/etc/lsb-release:
DISTRIB_ID=MYDISTRO
DISTRIB_RELEASE=1.0
DISTRIB_CODENAME=mycodename
DISTRIB_DESCRIPTION="MYDISTRO 1.0.0"
/usr/lib/os-release:
NAME="MYDISTRO"
VERSION="1.0.0 (MyCodeName)"
ID=mydistro
ID_LIKE=ubuntu
PRETTY_NAME="MYDISTRO 1.0.0"
VERSION_ID="1.0"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=mycodename
UBUNTU_CODENAME=focal
For privacy reasons I cannot write the real name of the distro and I changed it with MYDISTRO
and with MyCodeName
/etc/apt/preferences.d/base-files
add the contentsPackage: base-files Pin: release o=MYDISTRO Pin-Priority: 1001
. That will force your default version, be carefull about typographical errors. – abu-ahmed al-khatiri Apr 12 '22 at 10:10add-apt-repository
command on your distro ? – abu-ahmed al-khatiri Apr 12 '22 at 10:46aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Mydistro/mycodename
The problem is caused from line 3 and line 11 of
– Mario Palumbo Apr 12 '22 at 10:59os-release
file.