On Tue, 17 Apr 2007 16:06:30 +0200, Lucas C. Villa Real  
<[EMAIL PROTECTED]> wrote:

> On 4/17/07, Jonas Karlsson <[EMAIL PROTECTED]> wrote:
>> 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).
>
> --- 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
>
> Is it really necessary to pushd $prefix? There's already a 'cd
> $prefix' command in VerifyProgram. One of these should be removed,
> probably.
>
pushd doesn't break anything and I dislike the idea that the calling  
function is forced to do things like changing working directory before  
calling a subfunction. At the same time one can ask oneself why there's a  
popd in the end of Check_FileHash.
If one should be removed I vote for the 'cd' in VerifyProgram.

-- 
/Jonas

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to