]> pd.if.org Git - zpackage/blobdiff - zpm-add
add gc script
[zpackage] / zpm-add
diff --git a/zpm-add b/zpm-add
index 4eb11afb4d6aa8e496bcc6e35d465f525b6345bc..cfce783c2f3cebd10a7066b192fe0a2729f2383f 100755 (executable)
--- a/zpm-add
+++ b/zpm-add
@@ -137,7 +137,6 @@ for path in $*; do
        fi
 
        if [ ! -z "$strip" ]; then
-               echo "stripping $strip"
                rpath=${rpath#$strip}
                rpath=${rpath#/}
        fi
@@ -151,6 +150,9 @@ for path in $*; do
                rpath="$prefix/$rpath"
        fi
 
+       # ensure all paths are absolute
+       rpath=/${rpath#/}
+
        filetype=$(zpm stat -l -f '%t' "$path")
        hash='NULL'
        target='NULL'
@@ -181,8 +183,8 @@ for path in $*; do
        #cat <<EOS
        zpm shell $pkgfile <<EOS
 begin;
-insert or replace into packagefiles (package,version,release,path,mode,mtime,username,groupname,filetype,hash,target)
-values ('$package', '$pkgver', $pkgrel, '$rpath', '$mode',$mtime, '$username','$groupname','$filetype',$hash,$target);
+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;
 EOS