gir1.2-caja is someway broken - unable to import Caja from gi.repository

Bug #1380313 reported by Norbert
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu MATE
Fix Released
High
Martin Wimpress 
caja (Debian)
Fix Released
Unknown
caja (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I was trying to port TortoiseHG to Caja (see https://bitbucket.org/nrbrtx/caja-thg) and got a problem in Ubuntu 14.10 MATE, Ubuntu 14.04 (with MATE PPAs), Ubuntu 12.04 (with MATE PPAs).

Steps to reproduce:
   1. install "gir1.2-caja" package with "sudo apt-get install gir1.2-caja"
   2. test Caja is available with "python -c "from gi.repository import Caja" command

Expected results:
   Caja is imported successfully.

Actual results:
   Got error:
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
      ImportError: cannot import name Caja

If I try to import Caja in LinuxMinut 17 MATE it imports normally.

So there is something wrong with Ubuntu gir1.2-caja package.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: gir1.2-caja 1.8.2-1
ProcVersionSignature: Ubuntu 3.16.0-10.15-generic 3.16.1
Uname: Linux 3.16.0-10-generic i686
ApportVersion: 2.14.6-0ubuntu2
Architecture: i386
CasperVersion: 1.343
Date: Sun Oct 12 15:02:18 2014
Dependencies:

LiveMediaBuild: Ubuntu MATE 14.10 "Utopic Unicorn" - beta1 i386 (20140828)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: caja
UpgradeStatus: No upgrade log present (probably fresh install)
---
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: i386
CasperVersion: 1.340
DistroRelease: Ubuntu 14.04
LiveMediaBuild: Ubuntu MATE 14.04.1 "Trusty Tahr" - final i386 (20141111)
Package: caja 1.8.2-1~trusty1 [origin: LP-PPA-ubuntu-mate-dev-trusty-mate]
PackageArchitecture: i386
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.13.0-39.66-generic 3.13.11.8
Tags: third-party-packages trusty
Uname: Linux 3.13.0-39-generic i686
UnreportableReason: This is not an official Ubuntu package. Please remove any third party package and try again.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Norbert (nrbrtx) wrote :

I subscribed Ubuntu MATE developers to inform them about the problem.

description: updated
description: updated
Revision history for this message
Norbert (nrbrtx) wrote :

Added PPAs to Ubuntu 14.04.1, it is affected by this bug too.

tags: added: trusty
Revision history for this message
Norbert (nrbrtx) wrote :

Added PPAs to Ubuntu 12.04.5, it is affected by this bug too.

description: updated
description: updated
tags: added: precise
Revision history for this message
Norbert (nrbrtx) wrote :

I found the problem.
gir1.2-caja package from LinuxMint (for example - http://packages.linuxmint.com/pool/upstream/c/caja/gir1.2-caja_1.8.1-1+qiana_all.deb ) and from MATE ppa (for example http://archive.ubuntu.com/ubuntu/pool/universe/c/caja/gir1.2-caja_1.8.2-1_i386.deb) have different file structure.

Mint - gir1.2-caja_1.8.1-1+qiana_all.deb:
   /usr/lib/girepository-1.0/Caja-2.0.typelib
   /usr/share/doc/gir1.2-caja/changelog.Debian.gz
   /usr/share/doc/gir1.2-caja/copyright
   /usr/share/gir-1.0/Caja-2.0.gir

PPA - gir1.2-caja_1.8.2-1_i386.deb:
   /usr/lib/i386-linux-gnu/girepository-1.0/Caja-2.0.typelib <- this path is wrong!
   /usr/share/doc/gir1.2-caja/changelog.Debian.gz
   /usr/share/doc/gir1.2-caja/copyright
   /usr/share/gir-1.0/Caja-2.0.gir

If I move /usr/lib/i386-linux-gnu/girepository-1.0/Caja-2.0.typelib to /usr/lib/girepository-1.0/Caja-2.0.typelib
I can import Caja from gi.repository in Ubuntu 14.10 MATE, Ubuntu 14.04.1 (with MATE PPAs), in Ubuntu 12.04.5 I got other error (not related to this bug).

So gir1.2-caja should be repacked (Caja-2.0.typelib should be placed in /usr/lib/girepository-1.0/ , not in /usr/lib/i386-linux-gnu/girepository-1.0/Caja-2.0.typelib ). Please make this change and bug will be fixed.

Changed in ubuntu-mate:
status: New → Triaged
Revision history for this message
Norbert (nrbrtx) wrote :

Bug exists in Ubuntu Utopic 14.10 final.

Changed in caja (Debian):
status: Unknown → New
Revision history for this message
Norbert (nrbrtx) wrote : Dependencies.txt

apport information

tags: added: apport-collected third-party-packages
description: updated
Revision history for this message
Norbert (nrbrtx) wrote :

Bug exists in Ubuntu MATE 14.04 final. Please fix it as written is comment 4.

Changed in ubuntu-mate:
status: Triaged → In Progress
importance: Undecided → High
assignee: nobody → Martin Wimpress (flexiondotorg)
Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

I've worked with the Debian maintainers and have published new `caja` packages in my PPAs for Ubuntu MATE 14.04 and Ubuntu MATE 14.10. Once you `dist-upgrade` this new caja package installs the gir1.2-caja typelib in the correct location.

That said, this is simply working around a bug in Ubuntu. Ubuntu doesn't support multi-arch gir. So, this fix is a hack. I will now have to determine if Ubuntu will address this issue in 15.04 or if I should work with the Debian maintainers to integrate Ubuntu specific work around upstream.

Changed in ubuntu-mate:
status: In Progress → Fix Committed
Revision history for this message
Norbert (nrbrtx) wrote :

Dear Martin!
Thank you for your fix, I'll test it.

If it possible, please fix this bug for Ubuntu 12.04 too.
I hope that your packages will be included to MATE PPA.

Revision history for this message
Norbert (nrbrtx) wrote :

Tested on 32-bit Ubuntu 14.04.1 and 14.10 with MATE PPAs - gir1.2-caja works as expected.

If you can - please build packages for Ubuntu Precise 12.04 too.

Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

New `caja` and `python-caja` packages have been published to my MATE for Precise PPA.

Revision history for this message
Norbert (nrbrtx) wrote :

Tested on 64-bit Ubuntu 12.04.5 with MATE PPAs - bug is fixed.

Thank you, Martin!

Changed in caja (Debian):
status: New → Fix Released
Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Ubuntu 15.04 now supports multilib Gobject-introspection runtime which fixes this issue.

Changed in caja (Ubuntu):
status: New → Fix Released
Changed in ubuntu-mate:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.