os-patches
os-patches copied to clipboard
Package `python-apt` not found in os-patches PPA
python-apt found in the import list, but not in the PPA. Not deployed yet or removed by accident?
https://code.launchpad.net/~elementary-os/+recipe/python-apt-noble
Is this why adding PPAs fails with this error?
tallest@Gaudia:~/Downloads$ sudo add-apt-repository ppa:graphics-drivers/ppa
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 451, in <module>
addaptrepo = AddAptRepository()
^^^^^^^^^^^^^^^^^^
File "/usr/bin/add-apt-repository", line 38, in __init__
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
raise NoDistroTemplateException(
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Elementary/next
@danirabbit I guess the version notation of python-apt ({debversion}+elementary{revno:elementary-patch}) causes the build on LP failing:
https://launchpadlibrarian.net/732772228/buildlog_ubuntu-noble-amd64.python-apt_2.7.7ubuntu1+elementary7~ubuntu8.1_BUILDING.txt.gz
setuptools.extern.packaging.version.InvalidVersion: Invalid version: '2.7.7-ubuntu1-elementary7-ubuntu8.1'
E: pybuild pybuild:389: install: plugin distutils failed with: exit code=1: /usr/bin/python3 setup.py install --root '/<<PKGBUILDDIR>>/debian/python3-apt'
dh_auto_install: error: pybuild --install -i python{version} -p 3.12 --dest-dir /<<BUILDDIR>>/python-apt-2.7.7ubuntu1\+elementary7\~ubuntu8.1/debian/tmp returned exit code 13
make[1]: *** [debian/rules:28: override_dh_auto_install] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:17: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
I confirmed running debuild -us -uc locally generates .deb files successfully.
@ryonakano I confirmed it built locally too. It looks like the package version in the repo is 2.7.7ubuntu1 which is causing the issue. I tried downloading both with apt source and directly from https://packages.ubuntu.com/noble/python3-apt and it seems to be the same. So maybe we need to patch the changelog file as well?
It looks like the package version in the repo is
2.7.7ubuntu1which is causing the issue.
Hmm, I don't think that cause the build failure.
Building the python-apt-noble-patched branch when:
- the latest changelog version is
2.7.7ubuntu1: Build succeeded - editing the latest changelog version to
2.7.7: Build succeeded - editing the latest changelog version to
2.7.7ubuntu1+elementary7~ubuntu8.1: Build failed - editing the latest changelog version to
2.7.7elementary7~ubuntu8.1: Build failed
So I guess this is rather a problem in our recipe.
@ryonakano I think launchpad adds the ~ubuntu{version} part automatically. I don't know if we can remove that. Maybe @tintou knows
I'll look a it in a bit