Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

FS#69444 - [pacman] NoUpgrade config option fails at disk space check for read-only files

Attached to Project: Pacman
Opened by Marcel Menzel (WRMSR) - Tuesday, 26 January 2021, 12:04 GMT
Last edited by Allan McRae (Allan) - Tuesday, 26 January 2021, 12:40 GMT
Task Type Bug Report
Category Backend/Core
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.2.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No


Description: Having mounted files as read-only in Arch Linux LXC containers owned by packages and having those files set in NoUpgrade, pacman still fails to upgrade the affected package owning this file at the disk space check.

Config to reproduce:

LXD config:

path: /etc/resolv.conf
readonly: "true"
source: /root/containerfiles/resolv.conf
type: disk


NoUpgrade = etc/resolv.conf
NoExtract = etc/resolv.conf

pacman version: 5.2.2-1

When upgrading the package "filesystem", pacman fails with: error: Partition /etc/resolv.conf is mounted read only

A workaround is to comment out "CheckSpace". Then the package upgrade will succeed.
This task depends upon

Comment by Anton Rieger (arcbug) - Tuesday, 26 January 2021, 13:57 GMT
I can reproduce it with following setup:

Commands to execute
mount -rB /etc/resolv.conf{,}
pacman -S filesystem

warning: filesystem-2021.01.19-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1) Old Version New Version Net Change

core/filesystem 2021.01.19-1 2021.01.19-1 0.00 MiB

Total Installed Size: 0.03 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [--------------] 100%
(1/1) checking package integrity [--------------] 100%
(1/1) loading package files [--------------] 100%
(1/1) checking for file conflicts [--------------] 100%
(1/1) checking available disk space [--------------] 100%
error: Partition /etc/resolv.conf is mounted read only
error: not enough free disk space
error: failed to commit transaction (not enough free disk space)
Errors occurred, no packages were upgraded.

Used Pacman v5.2.2 - libalpm v12.0.2 and util-linux 2.36.1-4.