diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-02-08 10:25:47 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-02-08 10:25:47 +0100 |
commit | 4c6cf49317769725fee34a132c52ec1fe076b8b5 (patch) | |
tree | 1394a74a187ce61982c6c8649721de2f543459a1 /apt-inst | |
parent | 931dcf2f960c6a2b117ab3cc847ce51c04e2140c (diff) | |
parent | 3eb9e257855d83d0486d7a5fa7cc5e2edebb6aaa (diff) |
merged from lp:~donkult/apt/sid
Diffstat (limited to 'apt-inst')
-rw-r--r-- | apt-inst/contrib/extracttar.cc | 12 | ||||
-rw-r--r-- | apt-inst/extract.cc | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 3d2788aaf..1a358d57e 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -195,10 +195,14 @@ bool ExtractTar::Go(pkgDirStream &Stream) // Decode all of the fields pkgDirStream::Item Itm; if (StrToNum(Tar->Mode,Itm.Mode,sizeof(Tar->Mode),8) == false || - StrToNum(Tar->UserID,Itm.UID,sizeof(Tar->UserID),8) == false || - StrToNum(Tar->GroupID,Itm.GID,sizeof(Tar->GroupID),8) == false || - StrToNum(Tar->Size,Itm.Size,sizeof(Tar->Size),8) == false || - StrToNum(Tar->MTime,Itm.MTime,sizeof(Tar->MTime),8) == false || + (Base256ToNum(Tar->UserID,Itm.UID,8) == false && + StrToNum(Tar->UserID,Itm.UID,sizeof(Tar->UserID),8) == false) || + (Base256ToNum(Tar->GroupID,Itm.GID,8) == false && + StrToNum(Tar->GroupID,Itm.GID,sizeof(Tar->GroupID),8) == false) || + (Base256ToNum(Tar->Size,Itm.Size,12) == false && + StrToNum(Tar->Size,Itm.Size,sizeof(Tar->Size),8) == false) || + (Base256ToNum(Tar->MTime,Itm.MTime,12) == false && + StrToNum(Tar->MTime,Itm.MTime,sizeof(Tar->MTime),8) == false) || StrToNum(Tar->Major,Itm.Major,sizeof(Tar->Major),8) == false || StrToNum(Tar->Minor,Itm.Minor,sizeof(Tar->Minor),8) == false) return _error->Error(_("Corrupted archive")); diff --git a/apt-inst/extract.cc b/apt-inst/extract.cc index 85363b9a1..cd8edb27a 100644 --- a/apt-inst/extract.cc +++ b/apt-inst/extract.cc @@ -372,7 +372,6 @@ bool pkgExtract::HandleOverwrites(pkgFLCache::NodeIterator Nde, pkgFLCache::NodeIterator TmpNde = Nde; unsigned long DiverOwner = 0; unsigned long FileGroup = Nde->File; - const char *FirstOwner = 0; for (; Nde.end() == false && FileGroup == Nde->File; Nde++) { if ((Nde->Flags & pkgFLCache::Node::Diversion) != 0) @@ -392,8 +391,7 @@ bool pkgExtract::HandleOverwrites(pkgFLCache::NodeIterator Nde, if something has already been diverted by this diversion */ if (FPkg.Offset() == DiverOwner) continue; - FirstOwner = FPkg.Name(); - + // Now see if this package matches one in a replace depends pkgCache::DepIterator Dep = Ver.DependsList(); bool Ok = false; |