os-patches icon indicating copy to clipboard operation
os-patches copied to clipboard

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

Open github-actions[bot] opened this issue 1 year ago • 4 comments
trafficstars

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

github-actions[bot] avatar May 03 '24 00:05 github-actions[bot]

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

danirabbit avatar May 03 '24 14:05 danirabbit

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

UncleTallest avatar Aug 27 '24 14:08 UncleTallest

@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 avatar Sep 15 '24 11:09 ryonakano

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

danirabbit avatar Sep 16 '24 15:09 danirabbit

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:

  • 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 avatar Sep 25 '24 15:09 ryonakano

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

danirabbit avatar Sep 25 '24 18:09 danirabbit

I'll look a it in a bit

tintou avatar Sep 26 '24 08:09 tintou