Source: MontaVista Software, Inc. Type: Defect Fix Disposition: needs submitting to apt-rpm.org Description: apt incorrectly checks the abs path "/var/lib/apt" instead of the corrected 'Dir'+'Dir::State' path. diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index f2232c4..81727c5 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -53,11 +53,15 @@ bool pkgInitConfig(Configuration &Cnf) /* Just in case something goes horribly wrong, we can fall back to the old /var/state paths.. */ - struct stat St; - if (stat("/var/lib/apt/.",&St) != 0 && - stat("/var/state/apt/.",&St) == 0) - Cnf.Set("Dir::State","var/state/apt/"); - + +/* Apt-rpm should not rely on fixed absolute paths. Instead it should be + * using Dir + Dir::State as the path. + * struct stat St; + * if (stat("/var/lib/apt/.",&St) != 0 && + * stat("/var/state/apt/.",&St) == 0) + * Cnf.Set("Dir::State","var/state/apt/"); + */ + Cnf.Set("Dir::State::lists","lists/"); Cnf.Set("Dir::State::cdroms","cdroms.list"); Source: MontaVista Software, Inc. Type: Defect Fix Disposition: needs submitting to apt-rpm.org Description: With this patch, apt-rpm no longer causes an alignment trap on arm processors when built with gcc-4.2. diff --git a/apt-pkg/contrib/md5.h b/apt-pkg/contrib/md5.h index 334bf44..4613fa9 100644 --- a/apt-pkg/contrib/md5.h +++ b/apt-pkg/contrib/md5.h @@ -28,6 +28,7 @@ #endif #include +#include using std::string; @@ -56,9 +57,9 @@ class MD5SumValue class MD5Summation { - unsigned char Buf[4*4]; - unsigned char Bytes[2*4]; - unsigned char In[16*4]; + uint32_t Buf[4]; + uint32_t Bytes[2]; + uint32_t In[16]; bool Done; public: diff --git a/apt-pkg/rpm/rpmhandler.cc b/apt-pkg/rpm/rpmhandler.cc index 6629ad4..89072b2 100644 --- a/apt-pkg/rpm/rpmhandler.cc +++ b/apt-pkg/rpm/rpmhandler.cc @@ -65,7 +65,7 @@ extern sigset_t rpmsqCaught; // suitable for those versions. For rpm >= 4.2.1 this is linked with // promoteepoch behavior - if promoteepoch is used then epoch hiding must // not happen. -bool HideZeroEpoch; +bool HideZeroEpoch __attribute__ ((aligned (4))); extern map rpmIndexSizes; Source: MontaVista Software, Inc. Type: Defect Fix Disposition: needs submitting to apt-rpm.org Description: Add support for 64bit mips diff --git a/buildlib/archtable b/buildlib/archtable index 795aba2..505798a 100644 --- a/buildlib/archtable +++ b/buildlib/archtable @@ -20,6 +20,8 @@ powerpc64 powerpc64 mipsel mipsel mipseb mips mips mips +mips64el mips64el +mips64 mips64 sheb sheb shel sh sh sh Source: MontaVista Software, Inc. Type: Defect Fix Disposition: needs submitting to apt-rpm.org Description: This patch fixes a bug where if a user types the incorrect login info, apt will continue to ask them for their password several times more; even after they have typed it in correctly. diff --git a/methods/http.cc b/methods/http.cc index d9b2bc7..82c113d 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -939,11 +939,33 @@ int HttpMethod::DealWithHeaders(FetchResult &Res,ServerState *Srv) { AuthUser = CurrentAuth->User; AuthPass = CurrentAuth->Password; + CurrentAuth->AuthURIs.push_back(&(Queue->Uri)); break; } } else - CurrentAuth = AuthList.end(); + { + bool setLogin = false; + for (CurrentAuth = AuthList.begin(); CurrentAuth != AuthList.end(); + CurrentAuth++) + if (CurrentAuth->Host == Srv->ServerName.Host && + CurrentAuth->Realm == Srv->Realm) + { + vector::iterator CurrentUri = find(CurrentAuth->AuthURIs.begin(), CurrentAuth->AuthURIs.end(), &(Queue->Uri)); + if (CurrentUri == CurrentAuth->AuthURIs.end()) + { + //We have not give the new passwd yet + AuthUser = CurrentAuth->User; + AuthPass = CurrentAuth->Password; + CurrentAuth->AuthURIs.push_back(&(Queue->Uri)); + setLogin = true; + break; + } + } + + if (setLogin == false) + CurrentAuth = AuthList.end(); + } // Nope - get username and password if (CurrentAuth == AuthList.end()) diff --git a/methods/http.h b/methods/http.h index 80aef84..78b14ef 100644 --- a/methods/http.h +++ b/methods/http.h @@ -13,6 +13,7 @@ #define MAXLEN 360 +#include #include using std::cout; @@ -131,6 +132,7 @@ class HttpMethod : public pkgAcqMethod string Realm; string User; string Password; + vector AuthURIs; }; void SendReq(FetchItem *Itm,CircleBuf &Out); Source: MontaVista Software, Inc. Type: Defect Fix Disposition: needs submitting to apt-rpm.org Description: Fix garbled output in Apt-rpm. diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc index fa6ad7f..ded1d7e 100644 --- a/cmdline/acqprogress.cc +++ b/cmdline/acqprogress.cc @@ -20,6 +20,7 @@ #include #include #include +#include #include /*}}}*/ @@ -39,6 +40,7 @@ AcqTextStatus::AcqTextStatus(unsigned int &ScreenWidth,unsigned int Quiet) : void AcqTextStatus::Start() { pkgAcquireStatus::Start(); + bzero(BlankLine, sizeof(BlankLine)); BlankLine[0] = 0; ID = 1; } @@ -157,6 +159,7 @@ bool AcqTextStatus::Pulse(pkgAcquire *Owner) char Buffer[sizeof(BlankLine)]; char *End = Buffer + sizeof(Buffer); char *S = Buffer; + bzero((void *)Buffer, sizeof(Buffer)); if (ScreenWidth >= sizeof(Buffer)) ScreenWidth = sizeof(Buffer)-1; Source: MontaVista Software, Inc. Type: Defect Fix Disposition: needs submitting to apt-rpm.org Description: When requesting to download the source for multiple rpms, who share the same src rpm, apt-rpm will fail to download them with an "Undetermined Error". This is becuase apt-rpm will try to download the same file multiple times at once. This patch fixes apt-rpm to only download each src rpm once per request. diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 7eaa3ec..2e73ac6 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1598,6 +1598,7 @@ bool DoSource(CommandLine &CmdL) // Create the download object AcqTextStatus Stat(ScreenWidth,_config->FindI("quiet",0)); pkgAcquire Fetcher(&Stat); + vector FetchList; DscFile *Dsc = new DscFile[CmdL.FileSize()]; @@ -1658,9 +1659,24 @@ bool DoSource(CommandLine &CmdL) continue; } - new pkgAcqFile(&Fetcher,Last->Index().ArchiveURI(I->Path), - I->MD5Hash,I->Size, - Last->Index().SourceInfo(*Last,*I),Src); + //Make sure we aren't already grabbing this file + int found = 0; + for (int x=0; x < FetchList.size(); x++) + { + if (Last->Index().ArchiveURI(I->Path).compare(FetchList.at(x)) == 0) + { + found = 1; + break; + } + } + + if (found == 0) + { + new pkgAcqFile(&Fetcher,Last->Index().ArchiveURI(I->Path), + I->MD5Hash,I->Size, + Last->Index().SourceInfo(*Last,*I),Src); + FetchList.push_back(Last->Index().ArchiveURI(I->Path)); + } } }