The only outcomes that could occur are

apt ------ snap
error ---- not installed (1)
success -- installed (2)
error ---- installed (3)

Of course there is a period where the snap installation could be
in progress, but it should be a transitional state.

> leaves the device with a partially installed snap.

If the installation fails with the error reported in this bug ("snap
installation in progress" — exit status 10), then indeed the deb can be left in
some non-installed state[1]. The snap, however, will never be partially
installed. It will be either installed or in the process of being installed.
All that would be a correct outcome in my opinion, although I do not argue that
it is confusing that Apt says "I give up, the package installation fail"
whereas Snapd is nonetheless chugging along, installing Chromium albeit slowly
(outcome 3 above). I searched and asked around but could find no evidence for a
time-out in Dpkg's maintainer scripts. 

If you ever get that again and can gather evidence of a partially installed
snap, please do correct me. I fail to see such evidence in LP:1891373 either;
There, the *deb* is partially installed, but then the user forced the Apt
process to end, which is usually indeed a bad idea.

> To clarify when I say the package should handle its own failure
scenarios, I don't mean that it shouldn't fail, just that it should put
the system back into the state it was in before the failure rather than
leave something behind that could cause problems with future
installations.

I agree there. There is a denominator problem that Apt does not handle
interruption well.

> I appreciate that this may be a difficult one to get to the bottom of
> and appreciate your patience.

I likewise appreciate your constructive comments and please let me know if
anything was unclear or if you disagree or if you have a suggestion to
reproduce the issue etc..

[1] https://www.debian.org/doc/debian-policy/ch-
maintainerscripts.html#details-of-unpack-phase-of-installation-or-
upgrade

Am 06/11/2024 um 16:07 schrieb [email protected]:
> I've tested this again just now and in typically I cannot get it to fail
> again on my computer. I've asked someone else to test and although it
> took about 10 minutes compared to the 10 seconds it took me, it did
> complete. This is despite us being sat next to each other on the same
> network and their device being a higher specification than mine.
> 
> After replicating this bug during the Ubuntu Summit, then me replicating
> the failure on a Canonical employees device in the same way, I'm certain
> in some scenarios it fails and leaves the device with a partially
> installed snap. Perhaps this is down to the snap taking a long time to
> download then hitting a timeout whilst the install is occurring? You can
> see a report of this in the linked bug #1891373.
> 
> To clarify when I say the package should handle its own failure
> scenarios, I don't mean that it shouldn't fail, just that it should put
> the system back into the state it was in before the failure rather than
> leave something behind that could cause problems with future
> installations. I appreciate that it may be difficult to do this if
> 
> I appreciate that this may be a difficult one to get to the bottom of
> and appreciate your patience.
>

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/1886414

Title:
  the chromium snap takes a long time to install without visible user
  feedback, seems stuck

Status in chromium-browser package in Ubuntu:
  In Progress

Bug description:
  after an initial attemp to install where the progress got stuck at
  20%, i rebooted as there were a bunch of other system updates that had
  been applied after a fresh isntall.

  Now chromium wont install

  dantheperson@danski:~$ sudo apt install chromium-browser
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following packages will be upgraded:
    chromium-browser
  1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  1 not fully installed or removed.
  Need to get 48.4 kB of archives.
  After this operation, 164 kB of additional disk space will be used.
  Get:1 http://nz.archive.ubuntu.com/ubuntu focal-updates/universe amd64 
chromium-browser amd64 81.0.4044.129-0ubuntu0.20.04.1 [48.4 kB]
  Fetched 48.4 kB in 0s (1,527 kB/s)          
  Preconfiguring packages ...
  (Reading database ... 185728 files and directories currently installed.)
  Preparing to unpack 
.../chromium-browser_81.0.4044.129-0ubuntu0.20.04.1_amd64.deb ...
  => Installing the chromium snap
  ==> Checking connectivity with the snap store
  ==> Installing the chromium snap
  error: snap "chromium" has "install-snap" change in progress
  dpkg: error processing archive 
/var/cache/apt/archives/chromium-browser_81.0.4044.129-0ubuntu0.20.04.1_amd64.deb
 (--unpack):
   new chromium-browser package pre-installation script subprocess returned 
error exit status 10
  Errors were encountered while processing:
   
/var/cache/apt/archives/chromium-browser_81.0.4044.129-0ubuntu0.20.04.1_amd64.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)

  ProblemType: Package
  DistroRelease: Ubuntu 20.04
  Package: chromium-browser 81.0.4044.129-0ubuntu0.20.04.1
  ProcVersionSignature: Ubuntu 5.4.0-40.44-generic 5.4.44
  Uname: Linux 5.4.0-40-generic x86_64
  ApportVersion: 2.20.11-0ubuntu27.3
  AptOrdering:
   chromium-browser:amd64: Install
   NULL: ConfigurePending
  Architecture: amd64
  CasperMD5CheckResult: skip
  Date: Mon Jul  6 23:39:11 2020
  Dependencies:
   
  ErrorMessage: new chromium-browser package pre-installation script subprocess 
returned error exit status 10
  InstallationDate: Installed on 2020-07-06 (0 days ago)
  InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
  Python3Details: /usr/bin/python3.8, Python 3.8.2, python3-minimal, 
3.8.2-0ubuntu2
  PythonDetails: N/A
  RelatedPackageVersions:
   dpkg 1.19.7ubuntu3
   apt  2.0.2ubuntu0.1
  SourcePackage: chromium-browser
  Title: package chromium-browser 81.0.4044.129-0ubuntu0.20.04.1 failed to 
install/upgrade: new chromium-browser package pre-installation script 
subprocess returned error exit status 10
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1886414/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to