#echo adding $path
# only stat the file for items not set on the command line
- mode=${clmode:-$(zpm stat -f '%a' $path)}
- username=${cluser:-$(zpm stat -f '%U' $path)}
- groupname=${clgroup:-$(zpm stat -f '%G' $path)}
- mtime=${clmtime:-$(zpm stat -f '%y' $path)}
+ mode=${clmode:-$(zpm stat -l -f '%a' $path)}
+ username=${cluser:-$(zpm stat -l -f '%U' $path)}
+ groupname=${clgroup:-$(zpm stat -l -f '%G' $path)}
+ mtime=${clmtime:-$(zpm stat -l -f '%y' $path)}
filetype=${cltype:-$(zpm stat -l -f '%t' "$path")}
rpath="$path"
# TODO check that we have such a package,version,release
#cat <<EOS
+ if [ $verbose -gt 2 ]; then
+ shellecho=".echo on"
+ fi
zpm shell $pkgfile <<EOS
begin;
+$shellecho
insert or replace into packagefiles (package,version,release,path,mode,mtime,username,groupname,filetype,hash,configuration,target)
values ('$package', '$pkgver', $pkgrel, '$rpath', '$mode',$mtime, '$username','$groupname','$filetype',$hash,$isconfig,$target);
commit;