Here's a fix for verifying packed packages. First is a fix so that the correct package name was deduced. Then I changed the behaviour of Check_FileHash to take a prefix instead of appname and version because with the latter it would have tried to verify the filehash of the installed program instead of the contents of the tarball (which is unpacked into goboTemp).

--
/Jonas

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Index: bin/VerifyProgram
===================================================================
RCS file: /sources/goboscripts/tools/Scripts/bin/VerifyProgram,v
retrieving revision 1.18
diff -u -r1.18 VerifyProgram
--- bin/VerifyProgram	9 Apr 2007 02:11:55 -0000	1.18
+++ bin/VerifyProgram	17 Apr 2007 12:44:03 -0000
@@ -49,11 +49,10 @@
 then
    Log_Normal "Uncompressing package..."
    tar -C $goboTemp -jxf "$(Arg 1)"
-   package=`echo "$(Arg 1)" | sed 's,\(.*\)--\(.*\)--.*,\1,g'`
-   versionandrevision=`echo "$(Arg 1)" | sed 's,\(.*\)--\(.*\)--.*,\2,g'`
+   package=$(echo "$(basename $(Arg 1))" | sed 's,\(.*\)--\(.*\)--.*,\1,g')
+   versionandrevision=`echo "$(basename $(Arg 1))" | sed 's,\(.*\)--\(.*\)--.*,\2,g'`
    version=`String_Version "$versionandrevision"`
    basedir=$goboTemp
-   appname=$basedir/$package/$version
 else
    package=`GuessProgramCase $(Arg 1) $(Arg 2)`
    if [ "$2" ]
@@ -61,7 +60,6 @@
    else version=`Get_Version "$package" "Current"`
    fi
    basedir=$goboPrograms
-   appname=$package
 fi
 
 quiet=""
@@ -117,7 +115,7 @@
 if Exists "${FileHash_loc}"
 then
    Boolean "quiet" || Log_Normal "Verifying FileHash..."
-   output=`Check_FileHash "$appname" "$version" "Resources/FileHash"`
+   output=$(Check_FileHash "$prefix" "Resources/FileHash")
    if Failed
    then
       Boolean "quiet" || Log_Error "FileHash check failed: $output"
Index: Functions/File
===================================================================
RCS file: /sources/goboscripts/tools/Scripts/Functions/File,v
retrieving revision 1.33
diff -u -r1.33 File
--- Functions/File	7 Mar 2007 21:08:43 -0000	1.33
+++ Functions/File	17 Apr 2007 12:44:03 -0000
@@ -177,9 +177,11 @@
 function Check_FileHash() {
 ### python check_filehashes CHANGELOG
 # 10/10/2004 - [calica] First version
-   Parameters "$@" program version hash_file
+   Parameters "$@" prefix hash_file
+   cleanhashfilename=$(echo $hash_file | sed s,$prefix/,,g)
    local rtn
-   $sudo_exec ListProgramFiles --files "$program" "$version" | grep -v "$hash_file" | $sudo_exec python -c """#
+   Quiet pushd $prefix
+   $sudo_exec ListProgramFiles --files "$prefix" | grep -v "$cleanhashfilename" | $sudo_exec python -c """#
 import re, os, string, os.path, sys
 
 hashfile='$hash_file'
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to