Hi Darjeeling,
I can recall only one package with files not belongs to root. So, let's experiment with it.
Package "tazwikiss" files list: http://cook.slitaz.org/cooker.cgi?files=tazwikiss
As you can see, all the files inside the "/var/www/wiki" folder are belongs to user "www" group "www".
Let's repack "tazwikiss":
$ cd /tmp
$ su
# repack tazwikiss
Let's extract repacked package:
# tazpkg extract tazwikiss-250.tazpkg
Let's list all packages files in the long format:
# find tazwikiss-250/fs -type f | xargs ls -l
-rw-r--r-- 1 root root 221 Дек 21 13:55 tazwikiss-250/fs/usr/share/applications/tazcalc.desktop
-rw-r--r-- 1 root root 205 Дек 21 13:55 tazwikiss-250/fs/usr/share/applications/tazwikiss.desktop
-rwxr-xr-x 1 www www 579 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/config-de.sh
-rwxr-xr-x 1 www www 606 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/config-fr.sh
-rwxr-xr-x 1 www www 522 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/config.sh
-rwxr-xr-x 1 www www 16780 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/index.sh
-rwxr-xr-x 1 www www 712 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/Accueil.txt
-rw-r--r-- 1 www www 1326 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/AideCalc.txt
-rw-r--r-- 1 www www 2461 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/AideTables.txt
-rw-r--r-- 1 www www 4205 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/Aide.txt
-rw-r--r-- 1 www www 918 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/Calc.txt
-rw-r--r-- 1 www www 1277 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/HelpCalc.txt
-rw-r--r-- 1 www www 2416 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/HelpTables.txt
-rw-r--r-- 1 www www 4139 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/Help.txt
-rwxr-xr-x 1 www www 595 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/Welcome.txt
-rwxr-xr-x 1 www www 4308 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Admin.sh
-rw-r--r-- 1 www www 478 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Calc.css
-rwxr-xr-x 1 www www 5746 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Calc.sh
-rwxr-xr-x 1 www www 1751 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_FullScreen.sh
-rwxr-xr-x 1 www www 2043 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Password.sh
-rwxr-xr-x 1 www www 1203 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Rss.sh
-rwxr-xr-x 1 www www 1611 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Tables.sh
-rwxr-xr-x 1 www www 2586 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Upload.sh
-rwxr-xr-x 1 www www 2075 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/style.css
-rwxr-xr-x 1 www www 1282 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/template.html
As you can see, files still belongs to "www:www".
Now remove repacked package and pack it from extracted fs tree, remove tree and restore it from packed package:
# rm tazwikiss-250.tazpkg
# tazpkg pack tazwikiss-250
# rm -r tazwikiss-250
# tazpkg extract tazwikiss-250.tazpkg
Let's see files list:
# find tazwikiss-250/fs -type f | xargs ls -l
-rw-r--r-- 1 root root 221 Дек 21 13:55 tazwikiss-250/fs/usr/share/applications/tazcalc.desktop
-rw-r--r-- 1 root root 205 Дек 21 13:55 tazwikiss-250/fs/usr/share/applications/tazwikiss.desktop
-rwxr-xr-x 1 www www 579 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/config-de.sh
-rwxr-xr-x 1 www www 606 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/config-fr.sh
-rwxr-xr-x 1 www www 522 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/config.sh
-rwxr-xr-x 1 www www 16780 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/index.sh
-rwxr-xr-x 1 www www 712 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/Accueil.txt
-rw-r--r-- 1 www www 1326 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/AideCalc.txt
-rw-r--r-- 1 www www 2461 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/AideTables.txt
-rw-r--r-- 1 www www 4205 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/Aide.txt
-rw-r--r-- 1 www www 918 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/Calc.txt
-rw-r--r-- 1 www www 1277 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/HelpCalc.txt
-rw-r--r-- 1 www www 2416 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/HelpTables.txt
-rw-r--r-- 1 www www 4139 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/Help.txt
-rwxr-xr-x 1 www www 595 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/pages/Welcome.txt
-rwxr-xr-x 1 www www 4308 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Admin.sh
-rw-r--r-- 1 www www 478 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Calc.css
-rwxr-xr-x 1 www www 5746 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Calc.sh
-rwxr-xr-x 1 www www 1751 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_FullScreen.sh
-rwxr-xr-x 1 www www 2043 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Password.sh
-rwxr-xr-x 1 www www 1203 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Rss.sh
-rwxr-xr-x 1 www www 1611 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Tables.sh
-rwxr-xr-x 1 www www 2586 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/plugins/wkp_Upload.sh
-rwxr-xr-x 1 www www 2075 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/style.css
-rwxr-xr-x 1 www www 1282 Ноя 7 02:36 tazwikiss-250/fs/var/www/wiki/template.html
So, we ended with next: "tazpkg repack" and "tazpkg pack" stores files permissions and ownership.
--------------------
Your script makes you headache because "ls -alR
" lists "." and ".." items that can change its timestamp, but it is not an error, and it not touch content and timestamp and permissions/ownership of any file inside fs tree.
Please, change it to "ls -AlR
" to exclude "." and ".." and try again.
--------------------
2) installed packages are not correctly counted and listed
missing: xorg-xsetroot
missing: yad
A] Try to find "xorg-xsetroot" and "yad" inside /var/lib/tazpkg/installed.info and inside /var/lib/tazpkg/installed:
grep "^xorg-xsetroot"$'\t' /var/lib/tazpkg/installed.info
grep "^yad"$'\t' /var/lib/tazpkg/installed.info
ls /var/lib/tazpkg/installed/xorg-xsetroot
ls /var/lib/tazpkg/installed/yad
Does all four commands not fails?
B] Try to get tazpkg info for "xorg-xsetroot" and "yad":
tazpkg info xorg-xsetroot
tazpkg info yad
Does all two commands output that specified packages are installed?
C] Try to fresh reinstall "xorg-xsetroot" and "yad":
# tazpkg -gi xorg-xsetroot --forced
# tazpkg -gi yad --forced
Please try again A] and B].
And please post all the outputs here.
And I very hope that you're using actual versions of the TazPkg and TazPanel...