Skip to content

fix: remove apt-get upgrade from pdf-prep-force to fix CI snap failure - #619

Open
izmalk wants to merge 1 commit into
canonical:mainfrom
izmalk:fix/pdf-prep-force-snap-failure
Open

fix: remove apt-get upgrade from pdf-prep-force to fix CI snap failure#619
izmalk wants to merge 1 commit into
canonical:mainfrom
izmalk:fix/pdf-prep-force-snap-failure

Conversation

@izmalk

@izmalk izmalk commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the apt-get upgrade -y line from the pdf-prep-force target in docs/Makefile. This line was causing CI failures on the PDF dependencies installation step.

Root cause

apt-get upgrade -y upgrades all system packages, not just the PDF-related ones. On the GitHub Actions ubuntu-latest runner, this pulls in a new version of the firefox package. In Ubuntu 24.04, firefox is a transitional package that depends on the firefox snap, and snapd doesn't work properly in the containerized CI environment — hence:

Errors were encountered while processing:
 /tmp/apt-dpkg-install-Z28U0P/02-firefox_1%3a1snap1-0ubuntu5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is an environmental failure: whenever a new firefox snap version is published in the Ubuntu archive, apt-get upgrade tries (and fails) to install it.

The fix

The apt-get upgrade -y line is unnecessary for PDF generation — you only need to install the PDF packages, not upgrade the entire system. Removing it makes CI deterministic and avoids snap-related failures.

 pdf-prep-force:
 	apt-get update
-	apt-get upgrade -y
 	apt-get install --no-install-recommends -y $(DOCS_PDFPACKAGES) \

The 'apt-get upgrade -y' line in the pdf-prep-force target was causing
CI to fail on the PDF dependencies installation step. The upgrade pulls
in ALL system packages, including the firefox snap on Ubuntu 24.04
runners, which cannot be installed in the containerized CI environment.

The upgrade is unnecessary for PDF generation - only the PDF packages
need to be installed, not the entire system upgraded. Removing it makes
CI deterministic and avoids snap-related failures.

@medubelko medubelko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me. @izmalk How did you test this locally? I'd like to give it a try.

@izmalk

izmalk commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

@medubelko I have encountered it in my own Ulwazi repo, where we have the same problem - https://github.com/canonical/ulwazi/actions/runs/29955798613/job/89046899743#step:3:739
I tried it locally (just running the PDF build test was enough for me) and got the same error.
The fix has been tested both locally and in CI - https://github.com/canonical/ulwazi/actions/runs/29957695270/job/89050792575?pr=130#step:3:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants