Amiga Unix — 68040 · 68060

Manual pages › System administration commands (1M)

contents-fsck(1M)

check and repair the installed-software database

Package: APKG, added for amigaux.

contents-fsck - check and repair the installed-software database

contents-fsck file
contents-fsck -r [ -s ] [ -b ] [ -o out ] file
contents-fsck -V

contents-fsck checks a contents(5) database, normally /var/sadm/install/contents, the record of every file installed packages own. The Amix 2.1 factory database ships with records the stock package tools cannot read (a file named TrueType Fonts with a space in its name, and a duplicated package field); one such record makes pkgrm(1M) and pkginfo -l abort.

Without -r, contents-fsck only reports. It prints the number of records of each file type and each finding with its line number:

[unparseable]
no reading of the record is valid; the reason is given
[spaced-path]
a path name that holds a space, recovered by trying each split
[dup-pkg]
a package name repeated at the end of the record
[sort-order]
a path name out of sorted order
[eq-hazard]
a = in the path name of a record that is not a link; the stock tools split such a record at the =
[long-line]
a line over 4096 bytes

Repair: write the repaired database to file.fixed (through a temporary file and a rename). The input is never changed. Repeated package names are removed, the white space between fields becomes one space, and comment lines, the record order and records it cannot parse are kept as they are.
With -r: drop records with a space in the path name, and print those path names so the files can be renamed first. Use it on a system that only has the stock tools; by default such records are kept.
With -r: copy the input to file.bak first.
With -r: write the result to out instead of file.fixed.
Print the version.

0
the database is clean
1
findings were reported
2
a usage or I/O error

# contents-fsck /var/sadm/install/contents
# contents-fsck -r -b /var/sadm/install/contents
# cp /var/sadm/install/contents.fixed /var/sadm/install/contents

/var/sadm/install/contents
the installed-software database

contents(5), pkgchk(1M), amix-sadm-migrate(1M)

October 2026 contents-fsck 1.0