From 0d7a243df522cad460bc1f94f32c6b7f766cabb1 Mon Sep 17 00:00:00 2001 From: "Eugene V. Lyubimkin" Date: Sat, 25 Oct 2008 01:33:40 +0300 Subject: Added fallback to uncompressed files while acquiring index files (Sources and Packages) --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0bb4fcdde..5c2c5f292 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +apt (0.7.17) unstable; urgency=low + + [ Eugene V. Lyubimkin ] + * apt-pkg/acquire-item.cc: + - Added fallback to uncompressed 'Packages' if neither 'bz2' nor 'gz' + available. (Closes: #409284) + + -- Eugene V. Lyubimkin Fri, 24 Oct 2008 23:45:17 +0300 + apt (0.7.16) unstable; urgency=low [ Luca Bruno ] -- cgit v1.2.3-70-g09d2 From 4805f1cfd795c41db2a3c7fed56c15bb8c350c49 Mon Sep 17 00:00:00 2001 From: "Eugene V. Lyubimkin" Date: Sat, 25 Oct 2008 17:03:16 +0300 Subject: Strip user/password from URL in error message. --- apt-pkg/algorithms.cc | 18 +++++++++++++++++- debian/changelog | 3 +++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt-pkg/algorithms.cc b/apt-pkg/algorithms.cc index 2e2a976bb..bd59a4749 100644 --- a/apt-pkg/algorithms.cc +++ b/apt-pkg/algorithms.cc @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -1342,7 +1343,22 @@ bool ListUpdate(pkgAcquireStatus &Stat, (*I)->Finished(); - _error->Warning(_("Failed to fetch %s %s\n"),(*I)->DescURI().c_str(), + // stripping username/password from URI if present + string descUri = (*I)->DescURI(); + regex_t userPassRegex; + regcomp(&userPassRegex, "\\://(\\w+)\\:(\\w+)@", REG_EXTENDED); + regmatch_t userPassMatch; + regexec(&userPassRegex, descUri.c_str(), 1, &userPassMatch, 0); + if (userPassMatch.rm_so != -1) // regexp matched + { + // really stripping + size_t stripStart = userPassMatch.rm_so + 3; + size_t stripEnd = userPassMatch.rm_eo; + descUri = descUri.substr(0, stripStart) + + descUri.substr(stripEnd, string::npos); + } + + _error->Warning(_("Failed to fetch %s %s\n"), descUri.c_str(), (*I)->ErrorText.c_str()); if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError) diff --git a/debian/changelog b/debian/changelog index 5c2c5f292..40e1cc23d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ apt (0.7.17) unstable; urgency=low * apt-pkg/acquire-item.cc: - Added fallback to uncompressed 'Packages' if neither 'bz2' nor 'gz' available. (Closes: #409284) + * apt-pkg/algorithm.cc: + - Strip username and password from source URL in error message. + (Closes: #425150) -- Eugene V. Lyubimkin Fri, 24 Oct 2008 23:45:17 +0300 -- cgit v1.2.3-70-g09d2