Преглед изворни кода

drop extra newline in 'Failed to fetch' and 'GPG error' message

I never understood why there is an extra newline in those messages, so
now is as good time as any to drop them. Lets see if someone complains
with a good reason to keep it…
David Kalnischkies пре 11 година
родитељ
комит
0efb29eb36

+ 1 - 1
apt-pkg/acquire-item.cc

@@ -790,7 +790,7 @@ bool pkgAcqMetaBase::CheckStopAuthentication(pkgAcquire::Item * const I, const s
       _error->Warning(_("An error occurred during the signature "
                         "verification. The repository is not updated "
                         "and the previous index files will be used. "
-                        "GPG error: %s: %s\n"),
+                        "GPG error: %s: %s"),
                       Desc.Description.c_str(),
                       LookupTag(Message,"Message").c_str());
       RunScripts("APT::Update::Auth-Failure");

+ 1 - 1
apt-pkg/update.cc

@@ -74,7 +74,7 @@ bool AcquireUpdate(pkgAcquire &Fetcher, int const PulseInterval,
       uri.User.clear();
       uri.Password.clear();
       string descUri = string(uri);
-      _error->Warning(_("Failed to fetch %s  %s\n"), descUri.c_str(),
+      _error->Warning(_("Failed to fetch %s  %s"), descUri.c_str(),
 	      (*I)->ErrorText.c_str());
 
       if ((*I)->Status == pkgAcquire::Item::StatTransientNetworkError) 

+ 0 - 4
test/integration/test-apt-update-nofallback

@@ -171,9 +171,7 @@ test_inrelease_to_invalid_inrelease()
     inject_evil_package
 
     testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file:${APTARCHIVE} unstable InRelease: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
 W: Failed to fetch file:${APTARCHIVE}/dists/unstable/InRelease  The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
 W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
 
     # ensure we keep the repo
@@ -195,9 +193,7 @@ test_release_gpg_to_invalid_release_release_gpg()
     inject_evil_package
 
     testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file:${APTARCHIVE} unstable Release: The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
 W: Failed to fetch file:${APTARCHIVE}/dists/unstable/Release.gpg  The following signatures were invalid: BADSIG 5A90D141DBAC8DAE Joe Sixpack (APT Testcases Dummy) <joe@example.org>
-
 W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
 
     testfailure grep 'evil' rootdir/var/lib/apt/lists/*Release

+ 0 - 2
test/integration/test-apt-update-not-modified

@@ -47,7 +47,6 @@ Get:2 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable
 Err:2 $1 unstable/main amd64 Packages
   Hash Sum mismatch
 W: Failed to fetch $1/dists/unstable/main/binary-amd64/Packages.gz  Hash Sum mismatch
-
 E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
 	testfileequal 'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)"
 	rm -rf aptarchive/dists
@@ -107,7 +106,6 @@ Get:4 $1 unstable/main amd64 Packages [$(stat -c '%s' 'aptarchive/dists/unstable
 Err:4 $1 unstable/main amd64 Packages
   Hash Sum mismatch
 W: Failed to fetch $1/dists/unstable/main/binary-amd64/Packages.gz  Hash Sum mismatch
-
 E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
 	testfileequal 'listsdir-without-amd64.lst' "$(listcurrentlistsdirectory)"
 	rm -rf aptarchive/dists

+ 0 - 4
test/integration/test-apt-update-rollback

@@ -61,7 +61,6 @@ test_inrelease_to_broken_hash_reverts_all() {
 
     # test the error condition
     testfailureequal "W: Failed to fetch file:${APTARCHIVE}/dists/unstable/main/source/Sources.gz  Hash Sum mismatch
-
 E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
     # ensure that the Packages file is also rolled back
     testfileequal lists.before "$(listcurrentlistsdirectory)"
@@ -128,7 +127,6 @@ E: There are problems and -y was used without --force-yes" aptget install -qq -y
     break_repository_sources_index '+1hour'
 
     testfailureequal "W: Failed to fetch file:$APTARCHIVE/dists/unstable/main/source/Sources.gz  Hash Sum mismatch
-
 E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
 
     testfileequal lists.before "$(listcurrentlistsdirectory)"
@@ -145,9 +143,7 @@ test_inrelease_to_unauth_inrelease() {
     signreleasefiles 'Marvin Paranoid'
 
     testwarningequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file:${APTARCHIVE} unstable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2
-
 W: Failed to fetch file:$APTARCHIVE/dists/unstable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2
-
 W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
 
     testfileequal lists.before "$(listcurrentlistsdirectory)"

+ 0 - 2
test/integration/test-bug-595691-empty-and-broken-archive-files

@@ -55,7 +55,6 @@ Reading package lists..." "empty archive Packages.$COMPRESS over file"
 Err:2 file:$APTARCHIVE  Packages
   Empty files can't be valid archives
 W: Failed to fetch ${COMPRESSOR}:${APTARCHIVE}/Packages.$COMPRESS  Empty files can't be valid archives
-
 E: Some index files failed to download. They have been ignored, or old ones used instead." "empty file Packages.$COMPRESS over file"
 }
 
@@ -72,7 +71,6 @@ Reading package lists..." "empty archive Packages.$COMPRESS over http"
 Err:2 http://localhost:8080  Packages
   Empty files can't be valid archives
 W: Failed to fetch ${COMPRESSOR}:$(readlink -f rootdir/var/lib/apt/lists/partial/localhost:8080_Packages.${COMPRESS})  Empty files can't be valid archives
-
 E: Some index files failed to download. They have been ignored, or old ones used instead." "empty file Packages.$COMPRESS over http"
 }