key-related errors while adding ppa in debian 10.7

Asked by Julio Gago Alonso

I was unable to add PPA to Debian 10.7 AMD64:

$ sudo add-apt-repository ppa:mjasnik/ppa

 This is ppa for my bits and pieces.
 More info: https://launchpad.net/~mjasnik/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpy0p4kj6p/pubring.gpg' created
gpg: /tmp/tmpy0p4kj6p/trustdb.gpg: trustdb created
gpg: key AF91A06147FA1307: public key "Launchpad PPA for Eduards Bezverhijs" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: no valid OpenPGP data found.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 688, in addkey_func
    func(**kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 386, in add_key
    return apsk.add_ppa_signing_key()
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 273, in add_ppa_signing_key
    cleanup(tmp_keyring_dir)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 234, in cleanup
    shutil.rmtree(tmp_keyring_dir)
  File "/usr/lib/python3.7/shutil.py", line 491, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib/python3.7/shutil.py", line 449, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/usr/lib/python3.7/shutil.py", line 447, in _rmtree_safe_fd
    os.unlink(entry.name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.extra'

I defaulted to download timekpr-next_0.5.0-1_amd64.deb and install it with dpkg, which required a manual edit in one python script that had a syntax error:

sudo vim /usr/lib/python3/dist-packages/timekpr/client/interface/ui/appindicator.py

After that everything seems to be working just fine!

Thanks,
Julio

Question information

Language:
English Edit question
Status:
Answered
For:
Timekpr-nExT Edit question
Assignee:
Eduards Bezverhijs Edit question
Last query:
Last reply:
Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#1

As far as I know adding Ubuntu PPA to debian is not exactly supported. I have never done this and will not be much of help.

What was the syntax error with that file?

Actally there should be a version ready for debian:
https://packages.debian.org/sid/timekpr-next

Revision history for this message
Julio Gago Alonso (fulito) said :
#2

Thanks Eduards, all that makes sense.

Perhaps we should add that detail to the README: if I remember well, I read there that debian setup was now similar to standard, but the description didn't specify any package repo, so I suspiciously picked the one from ubuntu. It may be a good idea to add the reference to sid packages from debian in the corresponding cell in the table with the commands. I admit that, although I am experienced with linux, I am not with distributions in general and debian in particular :).

Regarding the syntax error, it was actually a semantic one. I ended un downloading the package from here:

https://packages.debian.org/sid/timekpr-next

In particular, I got:

timekpr-next_0.5.0-1_amd64.deb

And the error was in appindicator.py around this code:

# indicator stuff
try:
    # try to load ayatanaappindicator
    gi.require_version("AyatanaAppIndicator3", "0.1")
    from gi.repository import AyatanaAppIndicator3 as AppIndicator

    # if successful, mark it so
    _USE_INDICATOR = True
except:
    # try to load appindicator
    gi.require_version("AppIndicator3", "0.1")
    from gi.repository import AppIndicator3 as AppIndicator

    # if successful, mark it so
    _USE_INDICATOR = True
except (ImportError, ValueError):
    # no indictor
    _USE_INDICATOR = False
    pass

I had to change the order of the two last except sections, since python was requesting the default one to be the last one!

Anyway, thank you very much for all the work you are doing. I am a parent recycling an old macbook with Debian and this parental control is exactly what I need for my kids :)

Julio

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#3

Ahh, ok, that might be expected. Regular appindicator is about to get booted from Debian or it already is :)
That's why ayatanaappindicator has to be used.

I have implemented a fix compatible to Ubuntu and others, but for Debian a package maintainer has done it too. So Debian package is the way to go.

I have to do a research before I suggest a package from sid for any debian version, though.

Revision history for this message
Julio Gago Alonso (fulito) said :
#4

Awesome. Thank's a lot for your support and your work!

Julio

Revision history for this message
Eduards Bezverhijs (mjasnik) said :
#5

>> And the error was in appindicator.py around this code:

I tried installing Debian package in Debian 10.7 and got the same error, it seems to be a packaging error.

Please wait for next release when package maintainer will release it, it should work.

Can you help with this problem?

Provide an answer of your own, or ask Julio Gago Alonso for more information if necessary.

To post a message you must log in.