package dos not build (('Namespace %s not available' % namespace)

Asked by Kanehekili

A package that has been build successfully in Nov 2021 ,fails to build now with the error:

  File "opt/YtGui.py", line 10, in <module>
    gi.require_version('Gtk', '3.6')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 130, in require_version
    raise ValueError('Namespace %s not available' % namespace)

The build log is at https://launchpad.net/~jentiger-moratai/+archive/ubuntu/mediatools/+build/23099519/+files/buildlog_ubuntu-bionic-amd64.ytdownloader_1.4.1-3-bionic_BUILDING.txt.gz

Worked with required(gtk 3.)0 before. Just change some minor code (icon_names instead of GTK.STOCK). It is incredible difficult to produce code for debian/Ubuntu (vs Arch linux or gentoo)...
I'd appreciate your help

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Colin Watson
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

I assume that you lack gir1.2-gtk-3.0 as build-dependency.

Revision history for this message
Best Colin Watson (cjwatson) said :
#2

It looks like what Manfred said at first glance, but adding gir1.2-gtk-3.0 to Build-Depends would not be the right fix here.

The real problem is that debian/ytdownloader.links is executable, which confuses part of debhelper into trying to execute it as a shell script. Don't make random files executable that shouldn't be executed. Looking at your debian/ directory, the only file there that should be executable is debian/rules, and you should use "chmod -x" to make all the others non-executable. (Perhaps you're building your source packages on a filesystem that doesn't support the distinction between executable and non-executable; don't do that.) If you make debian/ytdownloader.links non-executable then your package builds cleanly.

You are, however, also missing some *run-time* dependencies, which you should add to Depends in debian/control; at least python3-gi and gir1.2-gtk-3.0.

Revision history for this message
Colin Watson (cjwatson) said :
#3

And indeed, when I look at the last version of your package that built successfully, it had a non-executable debian/ytdownloader.links.

Revision history for this message
Kanehekili (jentiger-moratai) said :
#4

Hi,

I had the problem before that somehow my some of my files turned
executable. (VBox problem)
You are also correct that python-gi & gir1.2-gtk-3.0 should be included
in depends

Thank you very much for the answer.

On 27.01.22 12:15, Colin Watson wrote:
> Your question #700409 on Launchpad itself changed:
> https://answers.launchpad.net/launchpad/+question/700409
>
> Colin Watson posted a new comment:
> And indeed, when I look at the last version of your package that built
> successfully, it had a non-executable debian/ytdownloader.links.
>

Revision history for this message
Kanehekili (jentiger-moratai) said :
#5

Thanks Colin Watson, that solved my question.