RPM Community Forums

Mailing List Message of <rpm-devel>

Re: RPM checks filesystems on package install which are unrelated

From: Jeff Johnson <n3npq@mac.com>
Date: Sat 12 Apr 2008 - 14:23:21 CEST
Message-Id: <2B9E648C-D724-4117-8F3D-589C3C3A9F62@mac.com>

On Apr 12, 2008, at 4:47 AM, Ralf S. Engelschall wrote:

> When installing an RPM 5 package in a FreeBSD jail one has the  
> situation
> that the host (non-jail) filesystems are listed (on e.g. "df") but are
> not reachable. This is no problem, as e.g. /proc is not used inside  
> the
> jail. But RPM 5 seems to check all(!) filesystems known on a system
> for size capacity even if the currently to be installed package has no
> single file with a path which would stay on a particular  
> filesystem. As
> a result, as e.g. /proc is known but not mounted in this jail, I  
> get on
> every package install or upgrade:
>

Yep.

Not just available space for files that is needed when existing
symlink end-points are considered. In general symlinks can/do
point anywhere.

rpm permits installed directories to be moved by the sysadmin,
with a symlink to preserve the path, and will installs/removes files
through that path that includes a symlink, including getting the disk
accounting correct.

Since directories might be moved anywhere, there is no way to
tell from paths in installed/erased packages to determine which
mount points might actually be needed (or not) whithout
checking every path component.

> error: failed to stat /proc: No such file or directory
>

Easier to remove the message (or mount /proc) imho.

> RPM still proceeds, so this seems to be more a warning than an error,

All depends on POV. If it was "/usr" rather than "/proc" in the message,
I doubt you would be saying warning rather than error.

> but I find this confusing. Why is RPM 5 trying to check the size of
> filesystems like /proc even if not a single file in the to be  
> installed
> package directs it to /proc. Can this be changed? I would like to see
> that RPM 5 checks only those filesystems which are really related  
> to the
> operation. Or alternatively, check all filesystems, but remove the  
> above
> "error" and delay this error until the first file really is  
> intended for
> this particular filesystem.
>

Creating a table for existing mount points, using "best effort" in  
case of
failure, is the simplest implementation for calculating disk space  
usage.
Longest path match to find the correct accumulator, then +/- the  
delta for
the change.

Determining "only" is costly.

Delay assumes something like backtracking to correct, another costly  
operation.

Removing the error message is likely trivially arranged. Removing all  
errors is non-trivial because
of the complexity of handling all possible returns from all possible  
file system types,
that is a very hard portability problem.

73 de Jeff
Received on Sat Apr 12 14:23:57 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.