Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Type changes

Patrick McCarty edited this page Nov 30, 2016 · 5 revisions

Whenever a new build is created, bundle manifests are produced for every changed bundle. If one or more files, directories, or symlinks from the previous version of the bundle changed to a different file type, then swupd-server detects this case and checks to see whether the given type change is supported. A type change is only supported in swupd-server if swupd-client can successfully handle the change for an update.

Supported type changes

Original type New type Client action
file directory replace file with directory
file symlink replace file with symlink
symlink file replace symlink with file
symlink directory replace symlink with directory

Note: Because filenames in manifests never have path components that are symlinks, replacing symlinks with files of a different type has no side effects. In other words, all filenames in manifests have canonical paths.

Unsupported type changes

Original type New type Reason unsupported
directory file Note: possibly inaccurate Because swupd-client performs an update based on lexicographic-sorted manifests (by filename), contents of non-empty directories are not removed before replacing a directory with a file (because the toplevel directory of a directory tree removal is listed first). A special case is needed to recursively delete the original directory's contents before replacing the directory, similar to what is done when a directory is marked deleted (.d..) in the manifest.
directory symlink Note: possibly inaccurate Same reasoning as above.
Clone this wiki locally