summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/netrc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/netrc.cc')
-rw-r--r--apt-pkg/contrib/netrc.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/contrib/netrc.cc b/apt-pkg/contrib/netrc.cc
index 851b661a4..186527306 100644
--- a/apt-pkg/contrib/netrc.cc
+++ b/apt-pkg/contrib/netrc.cc
@@ -12,6 +12,7 @@
##################################################################### */
/*}}}*/
+#include <apt-pkg/configuration.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
@@ -146,7 +147,9 @@ int parsenetrc (char *host, char *login, char *password, char *netrcfile = NULL)
void maybe_add_auth (URI &Uri, string NetRCFile)
{
- if (Uri.Password.empty () == true && Uri.User.empty () == true)
+ if (_config->FindB("Debug::Acquire::netrc", false) == true)
+ std::clog << "maybe_add_auth: " << NetRCFile << std::endl;
+ if (Uri.Password.empty () == true || Uri.User.empty () == true)
{
if (NetRCFile.empty () == false)
{