[From nobody Thu Jul 16 14:21:08 2026
Received: (at submit) by bugs.debian.org; 15 Jun 2026 09:35:37 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-118.6 required=4.0 tests=ALL_TRUSTED,BAYES_00,
 BODY_INCLUDES_PACKAGE,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,
 DKIM_VALID_AU,DKIM_VALID_EF,FROMDEVELOPER,HAS_PACKAGE,SPF_HELO_NONE,
 SPF_PASS,USER_IN_DKIM_WELCOMELIST autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 14; hammy, 150; neutral, 106; spammy,
 0. spammytokens:
 hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
 0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
 0.000-+--H*RT:311, 0.000-+--H*RT:108
Return-path: &lt;smcv@debian.org&gt;
Received: from stravinsky.debian.org ([2001:41b8:202:deb::311:108]:53754)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;smcv@debian.org&gt;) id 1wZ3jF-00BxY1-1R
 for submit@bugs.debian.org; Mon, 15 Jun 2026 09:35:37 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; 
 s=smtpauto.stravinsky;
 h=X-Debian-User:Content-Type:MIME-Version:Message-ID:
 Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:
 Content-Description:In-Reply-To:References;
 bh=n1G1abTAsLVO6zkic19qsgpG0Pe/QUDDSHn1z9FXAVM=; b=EFS0JuYq99N/VYMVGG1/jfovxF
 3Dfq0whIJjvrryztdki32iZ8oAf7v8wVV+N9Kogk2bhIXoQtLyO2YCj4dqZY4eP+eOC0S8mJSGFbq
 1xXvxv/QV4jU1z1R1vs9yfrM7Tu0kxWlStW4l6dMOrBaszSD/lOUgUxeFN1E8SzZm+fwgkFCNDgIi
 SVK5Ftic8Ap635IPAeJhOkkYc72p43abTCz/FmdoqAf1tVHvKnZy/vhEoC6gRKPUo80HHH+FmwFVi
 fMDc4lTv8AGa3GX0ehf54OIrgtEraaV9QbbjoG3CxwGy3w3KQztUiEuHqoNmzMglbGnBLi+KOEWup
 ZbcsS2mw==;
Received: from authenticated-user by stravinsky.debian.org with esmtpsa
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;smcv@debian.org&gt;) id 1wZ3jD-00Cya8-2M
 for submit@bugs.debian.org; Mon, 15 Jun 2026 09:35:36 +0000
Date: Mon, 15 Jun 2026 10:35:34 +0100
From: Simon McVittie &lt;smcv@debian.org&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: gir1.2-ayatanacommon-0.1: typelibs installed in incorrect directory
Message-ID: &lt;ai_HZm737aRi3ql3@definition.pseudorandom.co.uk&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Mutt-Fcc: =.lists.debian/
X-Reportbug-Version: 13.2.0
X-Debian-User: smcv
Delivered-To: submit@bugs.debian.org

Package: gir1.2-ayatanacommon-0.1
Version: 0.9.12-1
Severity: grave
Tags: upstream
Justification: renders package unusable

A smoke-test similar to this one should work for every package 
containing &quot;public&quot; typelibs:

$ podman run --rm -it debian:sid-slim
# apt update
# apt upgrade
# apt install python3-gi gir1.2-ayatanacommon-0.1
# python3
&gt;&gt;&gt; import gi
&gt;&gt;&gt; gi.require_version('ayatanacommon', '0.1')
&gt;&gt;&gt; from gi.repository import ayatanacommon
&gt;&gt;&gt; assert ayatanacommon.utils_is_gnome() in (True, False)

But for gir1.2-ayatanacommon-0.1, it currently fails:

&gt;&gt;&gt; gi.require_version('ayatanacommon', '0.1')
Traceback (most recent call last):
  File &quot;&lt;python-input-2&gt;&quot;, line 1, in &lt;module&gt;
    gi.require_version('ayatanacommon', '0.1')
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File &quot;/usr/lib/python3/dist-packages/gi/__init__.py&quot;, line 150, in require_version
    raise ValueError(f&quot;Namespace {namespace} not available&quot;)
ValueError: Namespace ayatanacommon not available

because the typelib is installed to a directory that is not searched by 
GObject-Introspection: /usr/lib/x86_64-linux-gnu/girepository-1.2/ 
instead of the correct /usr/lib/x86_64-linux-gnu/girepository-1.0/.

Similarly the -dev package installs the GIR XML into /usr/share/gir-1.2/ 
instead of the correct /usr/share/gir-1.0/. I know the XML says 
&quot;&lt;repository version=&quot;1.2&quot;...&quot; but the correct directory names still 
have 1.0 in them, as documented in 
file:///usr/share/doc/gobject-introspection/policy.txt.gz:

&gt; Note that the format is specified in the .gir file
&gt; itself and may not match the /usr/lib/*/girepository-1.0 and
&gt; /usr/share/gir-1.0 paths.

This appears to have been an intentional upstream change:

&gt;   * debian/:
&gt;     + Upstream installs gir1.2 files now to gir-1.2 directory.

which surprises me, because I don't see how this change can have worked 
successfully. How was it tested?

It is often a good idea for packages with GObject-Introspection to have 
a superficial autopkgtest similar to 
&lt;https://salsa.debian.org/gnome-team/libadwaita/-/blob/debian/latest/debian/tests/python-gi-test?ref_type=heads&gt;
to confirm that the intended typelib API can be loaded successfully.

Thanks,
    smcv
]