Some *.tcz.list files on the server do not follow the standard format.
Resulting unwanted behavior with provides.sh
For people who's unfamiliar with provides.sh:
provides.sh updates provides.db and then search the content with awk.
Let's take a look at what's inside the database.
tc@box:/mnt/sda1/tce$ head provides.db
8086tiny.tcz
usr/local/share/licences/8086tiny/license.txt
usr/local/share/8086tiny/8086tiny.tar.gz
usr/local/bin/8086tiny
usr/local/tce.installed/8086tiny
915resolution.tcz
usr/local/sbin/915resolution
usr/local/tce.installed/915resolution
As you can see, the correct format should be:
extension1.tcz
path/to/file
extension2.tcz
path/to/file
It seems sometimes people who make an extension would create the list by
unsquashfs -l extension.tcz
For example: 7.x/x86/tcz/sed.tcz.list
Parallel unsquashfs: Using 4 processors
1 inodes (11 blocks) to write
squashfs-root
squashfs-root/usr
squashfs-root/usr/local
squashfs-root/usr/local/bin
squashfs-root/usr/local/bin/sed
The thing is, if I want to see which extension contains "sed"
I would use the GUI app browser or do
provides.sh usr\\/local\\/bin\\/sedGuess what I have get ?
tc@box:~$ provides.sh usr\\/local\\/bin\\/sed
squashfs-root
That's not what I want, "squashfs-root" is not even an extension.
***Solutions***To get a catalog of incorrectly-listed extensions.
awk 'BEGIN {FS="\n";RS=""} /Parallel unsquashfs: /{print $1}' provides.db > /tmp/catalog
Recreate *.tcz.list files.
mkdir -p pkg
sudo mount extension.tcz pkg
find pkg -not -type d | sort -u | sed 's~^pkg/~~g' > extension.tcz.list
sudo umount pkg