[Pkg-mozext-maintainers] Bug#982758: webext-browserpass: Failed to install on upgrade to bullseye

Axel Beckert abe at debian.org
Tue Apr 20 22:20:56 BST 2021


Hi,

Antoine Beaupré wrote:
> I have had the same, completely crashes the apt run too, neat. :)
>
> dpkg: error processing archive /var/cache/apt/archives/webext-browserpass_3.7.2-1+b1_amd64.deb (--unpack):
>  unable to open '/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/browserpass at maximbaz.com/icon.png.dpkg-new': No such file or directory
> Reinstalling /etc/chromium/native-messaging-hosts/com.dannyvankooten.browserpass.json that was moved away

Ack. Ran into this, too, today.

> I bumped the severity because it completely fails to upgrade.

Thanks!

> Workaround: apt purge webext-browserpass && apt install webext-browserpass

Ah, nice!

I digged a bit deeper and found the culprit:

First that weird dpkg error message. It's well explained here:
https://raphaelhertzog.com/2011/07/18/deciphering-one-of-dpkg-weirdest-errors-unable-to-open-pathtofoo-dpkg-new/

This led me quickly looking into the preinst script and it indeed
fiddles with directories and symlinks. That's also why purging and
installing from scratch doesn't trigger the issue and helps as
workaround:

  #!/bin/sh
  set -e
  # Automatically added by dh_installdeb/13.3.4
  dpkg-maintscript-helper symlink_to_dir /usr/share/chromium/extensions/browserpass /usr/share/webext/browserpass 3.0.0-1 -- "$@"
  dpkg-maintscript-helper symlink_to_dir /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/browserpass\@maximbaz.com /usr/share/webext/browserpass 3.0.0-1 -- "$@"
  dpkg-maintscript-helper rm_conffile /etc/chromium/native-messaging-hosts/com.dannyvankooten.browserpass.json 3.4.1-3\~ -- "$@"
  # End automatically added section

Combine that with the fact that the package ships both,
/usr/share/chromium/extensions/browserpass/icon.png and
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/browserpass at maximbaz.com/icon.png
and you get that problem.

So now the question is, what exactly happens and how to fix it?

In general, symlink_to_dir seems to be the right thing, since those
directories are indeed symlinks in buster:

  lrwxrwxrwx 1 root root 24 Feb  6  2019  /usr/share/chromium/extensions/browserpass -> ../../webext/browserpass/
  lrwxrwxrwx 1 root root 27 Feb  6  2019 '/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/browserpass at maximbaz.com' -> ../../../webext/browserpass/

And directory in sid/bullseye:

  drwxr-xr-x 2 root root 4096 Apr 10 03:00  /usr/share/chromium/extensions/browserpass/
  drwxr-xr-x 7 root root 4096 Apr 10 03:00 '/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/browserpass at maximbaz.com'/

The effect looks as if those symlinks weren't changed into
directories. But why? That 3.0.0-1 looks valid. And looking at my
upgrade logs (I always log dist-upgrades with "script"), the versions
seem the expected ones:

  Preparing to unpack .../370-webext-browserpass_3.7.2-1+b1_amd64.deb ...
  Unpacking webext-browserpass (3.7.2-1+b1) over (2.0.22-2) ...
  dpkg: error processing archive /tmp/apt-dpkg-install-VKYulC/370-webext-browserpass_3.7.2-1+b1_amd64.deb (--unpack):
   unable to open '/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/browserpass at maximbaz.com/icon.png.dpkg-new': No such file or directory
  Reinstalling /etc/chromium/native-messaging-hosts/com.dannyvankooten.browserpass.json that was moved away

So I must admit, I'm currently not understanding what exactly goes
wrong. Wanted though to share how far I came with debugging this in
case someone else was stuck earlier in the process, but now has an
idea what goes wrong.

Will write again if I figure out more.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



More information about the Pkg-mozext-maintainers mailing list