Jonatan Liljedahl wrote:
> When trying to install a package from my old drive:
> 
> cd /Mount/HDB/Programs
> InstallPackage ROX-Filer
> 
> I get something like this:
>   Traceback:
>   file "<string>", line 9, in ?
>   IOError: Errno 2 no such file or directory: ''
> Invalid signature. Package has been modified
> Suspect package in /Programs/ROX-Filer/2.5
> And then I need to symlinkprogram it manually..
> 
> First of all, an invalid signature shouldn't produce a python traceback.
> Also, it would be nice if I could just InstallPackage -S or
> --no-sign-check, I have no reason to check the sign of a package I know
> I created myself and which lives in my own filesystem already...

Here's a patch for InstallPackage that adds a -S/--no-sign-check option!

-- 
/Jonatan - http://kymatica.com
--- /Programs/Scripts/2.6.2/bin/InstallPackage  2007-01-26 19:24:00.000000000 
+0100
+++ ./InstallPackage    2007-02-18 09:36:09.000000000 +0100
@@ -32,6 +32,7 @@
 "from package. Options available are \"ask\", \"remove\" and \"keep\"." "ask"
 Add_Option_Boolean "U" "no-unmanaged" "Do not install unmanaged files. Same as 
'--unmanaged skip' (deprecated)"
 Add_Option_Boolean "W" "no-web" "Do not check remote site for packages, and 
bypass fetching of archives."
+Add_Option_Boolean "S" "no-sign-check" "Do not check the signature."
   
 Parse_Options "$@"
 
@@ -254,28 +255,34 @@
    Verbose tar "$taroption" "$archive" -C ${goboPrograms}
 fi
 
-verify_opts="--quiet"
-package_verified="false"
-Boolean "verbose" && verify_opts="--verbose"
-VerifyProgram $verify_opts "$packagename" "$packageversion"
-result="$?"
-if [ $result -eq 0 ]
+if Boolean "no-sign-check"
 then
-   Log_Normal "Package Signature Verified"
    package_verified="true"
-elif [ $result -eq 2 ]
-then
-   Log_Question "GnuPG not installed.  Unable to verify signature"
-   Ask_Continue "Continue install?"
-elif [ $result -eq 4 ] || [ $result -eq 5 ] 
-then
-   Log_Question "No signature.  Unable to verify package"
-   Ask_Continue "Continue install?"
-elif [ $result -eq 1 ] || [ $result -eq 3 ] 
-then
-   Log_Error "Invalid signature.  Package has been modified"
-   Log_Error "Suspect package in ${goboPrograms}/$packagename/$packageversion"
-   exit 1
+   Log_Normal "Skipping signature check"
+else
+   verify_opts="--quiet"
+   package_verified="false"
+   Boolean "verbose" && verify_opts="--verbose"
+   VerifyProgram $verify_opts "$packagename" "$packageversion"
+   result="$?"
+   if [ $result -eq 0 ]
+   then
+      Log_Normal "Package Signature Verified"
+      package_verified="true"
+   elif [ $result -eq 2 ]
+   then
+      Log_Question "GnuPG not installed.  Unable to verify signature"
+      Ask_Continue "Continue install?"
+   elif [ $result -eq 4 ] || [ $result -eq 5 ] 
+   then
+      Log_Question "No signature.  Unable to verify package"
+      Ask_Continue "Continue install?"
+   elif [ $result -eq 1 ] || [ $result -eq 3 ] 
+   then
+      Log_Error "Invalid signature.  Package has been modified"
+      Log_Error "Suspect package in 
${goboPrograms}/$packagename/$packageversion"
+      exit 1
+   fi
 fi
 
 # Hack for updating Glibc
_______________________________________________
gobolinux-devel mailing list
[email protected]
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to