#! /bin/sh /usr/share/dpatch/dpatch-run ## 01_allow_unauthenticated.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad aptitude-0.4.0~/src/cmdline/cmdline_prompt.cc aptitude-0.4.0/src/cmdline/cmdline_prompt.cc --- aptitude-0.4.0~/src/cmdline/cmdline_prompt.cc 2005-12-08 17:37:46.000000000 +0100 +++ aptitude-0.4.0/src/cmdline/cmdline_prompt.cc 2005-12-08 17:38:17.000000000 +0100 @@ -373,6 +373,12 @@ { pkgvector untrusted; + if(_config->FindB("aptitude::AllowUnauthenticated",false)) { + printf(_("Authentication warning overridden.\n")); + return true; + } + + for(pkgCache::PkgIterator pkg=(*apt_cache_file)->PkgBegin(); !pkg.end(); ++pkg) { diff -urNad aptitude-0.4.0~/src/main.cc aptitude-0.4.0/src/main.cc --- aptitude-0.4.0~/src/main.cc 2005-12-08 17:37:46.000000000 +0100 +++ aptitude-0.4.0/src/main.cc 2005-12-08 17:39:24.000000000 +0100 @@ -172,12 +172,14 @@ OPTION_VISUAL_PREVIEW, OPTION_QUEUE_ONLY, OPTION_PURGE_UNUSED, + OPTION_ALLOW_UNTRUSTED }; int getopt_result; option opts[]={ {"help", 0, NULL, 'h'}, {"version", 0, &getopt_result, OPTION_VERSION}, + {"allow-unauthenticated", 0, &getopt_result, OPTION_ALLOW_UNTRUSTED}, {"display-format", 1, NULL, 'F'}, {"quiet", 2, NULL, 'q'}, {"width", 1, NULL, 'w'}, @@ -368,6 +370,9 @@ case OPTION_VERSION: show_version(); exit(0); + case OPTION_ALLOW_UNTRUSTED: + _config->Set("aptitude::AllowUnauthenticated", true); + break; case OPTION_VISUAL_PREVIEW: visual_preview=true; break;