]> git.saurik.com Git - apt.git/commitdiff
fix compile and tests error
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 13 Oct 2014 07:54:21 +0000 (09:54 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Mon, 13 Oct 2014 11:01:15 +0000 (13:01 +0200)
I am pretty sure I did that before committing broken stuff…

Git-Dch: Ignore

apt-pkg/acquire-item.cc
apt-pkg/acquire.cc
apt-pkg/clean.cc
apt-pkg/deb/debrecords.cc
apt-pkg/indexcopy.cc
test/integration/framework
test/integration/test-apt-get-update-unauth-warning
test/integration/test-apt-update-expected-size
test/integration/test-apt-update-ims
test/integration/test-apt-update-rollback
test/integration/test-sourceslist-trusted-options

index 44d45cedb93cd8df94e7247199e6b7d8dfbc0964..5ca2d57fa2ade53d6b357391f14f368991fc3856 100644 (file)
@@ -1742,10 +1742,6 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
    // check if we need to fail at this point 
    if (AuthPass == true && CheckStopAuthentication(RealURI, Message))
          return;
-   else if (AuthPass == false)
-      _error->Warning(_("The data from '%s' is not signed. Packages "
-                        "from that repository can not be authenticated."),
-                      URIDesc.c_str());
 
    // FIXME: meh, this is not really elegant
    string InReleaseURI = RealURI.replace(RealURI.rfind("Release.gpg"), 12,
@@ -1774,6 +1770,10 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
          return;
       }
    }
+   else
+      _error->Warning(_("The data from '%s' is not signed. Packages "
+              "from that repository can not be authenticated."),
+           URIDesc.c_str());
 
    // this ensures that any file in the lists/ dir is removed by the
    // transaction
index 3ef912600e6bb0e7fb1f9893037b337ca9141a1e..1aa709381b98f8a362ef3eb761024d959b44437b 100644 (file)
@@ -1018,6 +1018,6 @@ void pkgAcquireStatus::Fetched(unsigned long long Size,unsigned long long Resume
 }
                                                                        /*}}}*/
 
-pkgAcquire::UriIterator::~UriIterator() {}
-pkgAcquire::MethodConfig::~MethodConfig() {}
-pkgAcquireStatus::~pkgAcquireStatus() {}
+APT_CONST pkgAcquire::UriIterator::~UriIterator() {}
+APT_CONST pkgAcquire::MethodConfig::~MethodConfig() {}
+APT_CONST pkgAcquireStatus::~pkgAcquireStatus() {}
index 606f4ec8c049c9fc0c96ebab0565f5bed6b3a01c..6edce5b6db0edf3e57759dc3f8a20055ccac8c21 100644 (file)
@@ -132,4 +132,4 @@ bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache)
 }
                                                                        /*}}}*/
 
-pkgArchiveCleaner::~pkgArchiveCleaner() {}
+APT_CONST pkgArchiveCleaner::~pkgArchiveCleaner() {}
index d08bb3c7ed1477b0d793da4825f3b594665aeee2..b41aa558407466d20be8f6e8283480902598384a 100644 (file)
@@ -208,4 +208,4 @@ void debRecordParser::GetRec(const char *&Start,const char *&Stop)
 }
                                                                        /*}}}*/
 
-debRecordParser::~debRecordParser() {};
+debRecordParser::~debRecordParser() {}
index c8767d6068f3c9e82de2449f17d8536e7a3e06b4..5fa57fd8b0ab2c4eecc478ccec5109c97d9c9059 100644 (file)
@@ -794,4 +794,4 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name,   /*{{{*/
 }
                                                                        /*}}}*/
 
-IndexCopy::~IndexCopy() {}
+APT_CONST IndexCopy::~IndexCopy() {}
index 76425f0c3f9f085e382b11befa695d6134e6dd36..160df9301fdf5eaa2b0a0e3a4e2c4c7a400c3007 100644 (file)
@@ -851,7 +851,7 @@ setupaptarchive() {
        else
                setupflataptarchive
        fi
-       signreleasefiles 'Joe Sixpack' "$@"
+       signreleasefiles 'Joe Sixpack'
        if [ "1" != "$NOUPDATE" ]; then
                testsuccess aptget update -o Debug::pkgAcquire::Worker=true -o Debug::Acquire::gpgv=true
        fi
index 8e212a3c432e674efcf40ee37a6885d399b10e12..fe0cb45a478c621f5ee519a51d08ba43163d1e29 100755 (executable)
@@ -24,10 +24,7 @@ testequal "Ign file: unstable InRelease
 Err file: unstable Release
   File not found
 W: The repository 'file: unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository.
-W: Use --allow-insecure-repositories to force the update
-W: Failed to fetch file:$APTARCHIVE/dists/unstable/Release  File not found
-
-E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
+E: Use --allow-insecure-repositories to force the update" aptget update
 
 # no package foo
 testequal "Listing..." apt list foo
index 58920f544f104a2abb34a8fcbccfaf20c479b383..a039e9e1cddec217d530a0d0c645d491503942c9 100755 (executable)
@@ -38,7 +38,7 @@ echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages.gz
 echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages
 NEW_SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)"
 rm -f rootdir/var/lib/apt/lists/localhost*
-testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages  Writing more data than expected ($NEW_SIZE > $SIZE) [IP: ::1 8080]
+testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages  Writing more data than expected ($NEW_SIZE > $SIZE)
 
 E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
 
index 8aa5a7262ab93479ebec2348d93b89a124ee1bad..06b9c2b6257d39441414239d0e32e27cb29535c9 100755 (executable)
@@ -73,7 +73,8 @@ Ign http://localhost:8080 unstable Release.gpg
 Hit http://localhost:8080 unstable/main Sources
 Hit http://localhost:8080 unstable/main amd64 Packages
 Hit http://localhost:8080 unstable/main Translation-en
-Reading package lists..."
+Reading package lists...
+W: The data from 'http://localhost:8080 unstable Release.gpg' is not signed. Packages from that repository can not be authenticated."
 
 find aptarchive -name "Release.gpg" | xargs rm -f
 
index 5b9c200fe1a3285225fb47aab62612f5537cdefa..220c3052b830e2204b21321fd43e6482be2c3b38 100755 (executable)
@@ -136,7 +136,7 @@ test_inrelease_to_unauth_inrelease() {
     msgmsg 'Test InRelease to InRelease without good sig'
     start_with_good_inrelease
 
-    signreleasefiles 'Marvin Paranoid' '+1hour'
+    signreleasefiles 'Marvin Paranoid'
 
     testequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2
 
index ae65cca83911dfe17228949058aff348c69f2cd6..1178df46a0fe83f6f5f960924d2bb58e7097236b 100755 (executable)
@@ -166,3 +166,30 @@ insecureaptgetupdate
 everythingfails
 everythingfails -t stable
 everythingfails -t testing
+
+# same as the one further above, but this time testing is unsigned
+find aptarchive/ \( -name 'InRelease' -o -name 'Release.gpg' \) -delete
+signreleasefiles 'Joe Sixpack' 'aptarchive/dists/stable'
+
+msgmsg 'Test without trusted option and unsigned and good sources'
+cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/
+insecureaptgetupdate
+everythingfails
+everythingsucceeds -t stable
+everythingfails -t testing
+
+msgmsg 'Test with trusted=yes option and unsigned and good sources'
+cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/
+sed -i 's#^deb\(-src\)\? #deb\1 [trusted=yes] #' rootdir/etc/apt/sources.list.d/*
+aptgetupdate
+everythingsucceeds
+everythingsucceeds -t stable
+everythingsucceeds -t testing
+
+msgmsg 'Test with trusted=no option and unsigned and good sources'
+cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/
+sed -i 's#^deb\(-src\)\? #deb\1 [trusted=no] #' rootdir/etc/apt/sources.list.d/*
+insecureaptgetupdate
+everythingfails
+everythingfails -t stable
+everythingfails -t testing