elementary / os-patches

Patched packages for elementary OS and the tools that keep them up-to-date
GNU General Public License v3.0
18 stars 11 forks source link

Package `python-apt` not found in os-patches PPA #294

Closed github-actions[bot] closed 2 months ago

github-actions[bot] commented 7 months ago

python-apt found in the import list, but not in the PPA. Not deployed yet or removed by accident?

danirabbit commented 7 months ago

https://code.launchpad.net/~elementary-os/+recipe/python-apt-noble

UncleTallest commented 3 months ago

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
ryonakano commented 2 months ago

@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.

danirabbit commented 2 months ago

@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?

ryonakano commented 2 months ago

It looks like the package version in the repo is 2.7.7ubuntu1 which is causing the issue.

Hmm, I don't think that cause the build failure.

Building the python-apt-noble-patched branch when:

So I guess this is rather a problem in our recipe.

danirabbit commented 2 months ago

@ryonakano I think launchpad adds the ~ubuntu{version} part automatically. I don't know if we can remove that. Maybe @tintou knows

tintou commented 2 months ago

I'll look a it in a bit