[Pkg-privacy-maintainers] Bug#910493: Bug#910493: Handle transition from MAT to MAT2

Georg Faerber georg at riseup.net
Mon Feb 18 23:09:30 GMT 2019


Hi all,

(Cc:ing all the people who took part in this issue, and also Julien as
the upstream author.)

On 19-02-12 14:39:32, Georg Faerber wrote:
> That is: option one of the second proposal ("quickly patch together a
> Python 2 Nautilus extension that wraps mat2's CLI").

Unfortunately, and sorry again for my delay working on this, there was
no feedback. I've poked Jonas today on IRC privately, asking if he had a
comment, he said "sounds good, go ahead", and so I did.

Initially, I wanted to do what I wrote above, but in the end I just
patched the current Nautilus extension to make it work with
python-nautilus build against Python 2.7, as it will be shipped in
Debian buster.

The changes I needed to make weren't that intrusive:

- I've changed the interpreter and added "coding: utf-8" to overcome
  utf-8 errors.
- Changed some imports to make these work with Python 2.7.
- Removed type hints. (Were this backported to 2.7?)
- Removed internal calls to libmat2, replaced by two funtions to call
  the cli of mat2 (and to check the output) and to guess the mtype of a
  given file.
- Furthermore, I've removed line 5 in the following code

	class Mat2Extension(GObject.GObject, Nautilus.MenuProvider, Nautilus.LocationWidgetProvider):
    """ This class adds an item to the right-clic menu in Nautilus. """

    def __init__(self):
        super().__init__()					<-
        self.infobar_hbox = None
        self.infobar = None
        self.failed_items = list()

  as otherwise I was running into

  TypeError: super() takes at least 1 argument (0 given)

  and I was unsure what's the cause and how to fix this.

I've tested the changes quickly with some files of different types, it
seems to be working. 

I would be very happy if someone of you could review this.

I've prepared 0.7.0-2 and pushed to the branch d/0.7.0-2. The repo is
available via [1].

To ease consumption and testing, I've attached the .deb to this mail as
well, it's signed by my key. If you take this route, please note: AFAIK,
dpkg -i doesn't install recommend packages, so please install
python-nautilus manually.

Thanks in advance,
cheers,
Georg


[1] https://salsa.debian.org/pkg-privacy-team/mat2/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mat2_0.7.0-2_all.deb
Type: application/vnd.debian.binary-package
Size: 30024 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-maintainers/attachments/20190218/015b54d7/attachment-0001.deb>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-maintainers/attachments/20190218/015b54d7/attachment-0001.sig>


More information about the Pkg-privacy-maintainers mailing list