|
@@ -400,7 +400,8 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
|
|
|
// Check if the current version of the package is available and will satisfy this dependency
|
|
// Check if the current version of the package is available and will satisfy this dependency
|
|
|
if (DepPkg.CurrentVer() == Ver && List->IsNow(DepPkg) == true &&
|
|
if (DepPkg.CurrentVer() == Ver && List->IsNow(DepPkg) == true &&
|
|
|
List->IsFlag(DepPkg,pkgOrderList::Removed) == false &&
|
|
List->IsFlag(DepPkg,pkgOrderList::Removed) == false &&
|
|
|
- DepPkg.State() == PkgIterator::NeedsNothing)
|
|
|
|
|
|
|
+ DepPkg.State() == PkgIterator::NeedsNothing &&
|
|
|
|
|
+ (Cache[DepPkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)
|
|
|
{
|
|
{
|
|
|
Bad = false;
|
|
Bad = false;
|
|
|
break;
|
|
break;
|
|
@@ -413,8 +414,13 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
|
|
|
if (PkgLoop == true)
|
|
if (PkgLoop == true)
|
|
|
{
|
|
{
|
|
|
if (Debug)
|
|
if (Debug)
|
|
|
- std::clog << OutputInDepth(Depth) << "Package " << Pkg << " loops in SmartConfigure" << std::endl;
|
|
|
|
|
- Bad = false;
|
|
|
|
|
|
|
+ std::clog << OutputInDepth(Depth) << "Package " << Pkg << " loops in SmartConfigure";
|
|
|
|
|
+ if (List->IsFlag(DepPkg,pkgOrderList::UnPacked))
|
|
|
|
|
+ Bad = false;
|
|
|
|
|
+ else if (Debug)
|
|
|
|
|
+ std::clog << ", but it isn't unpacked yet";
|
|
|
|
|
+ if (Debug)
|
|
|
|
|
+ std::clog << std::endl;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -426,7 +432,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
|
|
|
if (Bad == false)
|
|
if (Bad == false)
|
|
|
{
|
|
{
|
|
|
if (Debug)
|
|
if (Debug)
|
|
|
- std::clog << OutputInDepth(Depth) << "Found ok dep " << D.TargetPkg() << std::endl;
|
|
|
|
|
|
|
+ std::clog << OutputInDepth(Depth) << "Found ok dep " << Start.TargetPkg() << std::endl;
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -444,7 +450,8 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
|
|
|
// Check if the current version of the package is available and will satisfy this dependency
|
|
// Check if the current version of the package is available and will satisfy this dependency
|
|
|
if (DepPkg.CurrentVer() == Ver && List->IsNow(DepPkg) == true &&
|
|
if (DepPkg.CurrentVer() == Ver && List->IsNow(DepPkg) == true &&
|
|
|
List->IsFlag(DepPkg,pkgOrderList::Removed) == false &&
|
|
List->IsFlag(DepPkg,pkgOrderList::Removed) == false &&
|
|
|
- DepPkg.State() == PkgIterator::NeedsNothing)
|
|
|
|
|
|
|
+ DepPkg.State() == PkgIterator::NeedsNothing &&
|
|
|
|
|
+ (Cache[DepPkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)
|
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
// Check if the version that is going to be installed will satisfy the dependency
|
|
// Check if the version that is going to be installed will satisfy the dependency
|
|
@@ -454,8 +461,13 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
|
|
|
if (PkgLoop == true)
|
|
if (PkgLoop == true)
|
|
|
{
|
|
{
|
|
|
if (Debug)
|
|
if (Debug)
|
|
|
- std::clog << OutputInDepth(Depth) << "Package " << Pkg << " loops in SmartConfigure" << std::endl;
|
|
|
|
|
- Bad = false;
|
|
|
|
|
|
|
+ std::clog << OutputInDepth(Depth) << "Package " << Pkg << " loops in SmartConfigure";
|
|
|
|
|
+ if (List->IsFlag(DepPkg,pkgOrderList::UnPacked))
|
|
|
|
|
+ Bad = false;
|
|
|
|
|
+ else if (Debug)
|
|
|
|
|
+ std::clog << ", but it isn't unpacked yet";
|
|
|
|
|
+ if (Debug)
|
|
|
|
|
+ std::clog << std::endl;
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
@@ -722,7 +734,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
|
|
|
|
|
|
|
|
// See if the current version is ok
|
|
// See if the current version is ok
|
|
|
if (Pkg.CurrentVer() == Ver && List->IsNow(Pkg) == true &&
|
|
if (Pkg.CurrentVer() == Ver && List->IsNow(Pkg) == true &&
|
|
|
- Pkg.State() == PkgIterator::NeedsNothing)
|
|
|
|
|
|
|
+ Pkg.State() == PkgIterator::NeedsNothing &&
|
|
|
|
|
+ (Cache[Pkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)
|
|
|
{
|
|
{
|
|
|
Bad = false;
|
|
Bad = false;
|
|
|
if (Debug)
|
|
if (Debug)
|
|
@@ -744,8 +757,11 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
|
|
|
PkgIterator DepPkg = Ver.ParentPkg();
|
|
PkgIterator DepPkg = Ver.ParentPkg();
|
|
|
|
|
|
|
|
// Not the install version
|
|
// Not the install version
|
|
|
- if (Cache[DepPkg].InstallVer != *I ||
|
|
|
|
|
- (Cache[DepPkg].Keep() == true && DepPkg.State() == PkgIterator::NeedsNothing))
|
|
|
|
|
|
|
+ if (Cache[DepPkg].InstallVer != *I)
|
|
|
|
|
+ continue;
|
|
|
|
|
+
|
|
|
|
|
+ if (Cache[DepPkg].Keep() == true && DepPkg.State() == PkgIterator::NeedsNothing &&
|
|
|
|
|
+ (Cache[DepPkg].iFlags & pkgDepCache::ReInstall) != pkgDepCache::ReInstall)
|
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
if (List->IsFlag(DepPkg,pkgOrderList::Configured))
|
|
if (List->IsFlag(DepPkg,pkgOrderList::Configured))
|
|
@@ -757,6 +773,16 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
|
|
|
// check if it needs unpack or if if configure is enough
|
|
// check if it needs unpack or if if configure is enough
|
|
|
if (List->IsFlag(DepPkg,pkgOrderList::UnPacked) == false)
|
|
if (List->IsFlag(DepPkg,pkgOrderList::UnPacked) == false)
|
|
|
{
|
|
{
|
|
|
|
|
+ // two packages pre-depending on each other can't be handled sanely
|
|
|
|
|
+ if (List->IsFlag(DepPkg,pkgOrderList::Loop) && PkgLoop)
|
|
|
|
|
+ {
|
|
|
|
|
+ // this isn't an error as there is potential for something else to satisfy it
|
|
|
|
|
+ // (like a provides or an or-group member)
|
|
|
|
|
+ if (Debug)
|
|
|
|
|
+ clog << OutputInDepth(Depth) << "Unpack loop detected between " << DepPkg.FullName() << " and " << Pkg.FullName() << endl;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (Debug)
|
|
if (Debug)
|
|
|
clog << OutputInDepth(Depth) << "Trying to SmartUnpack " << DepPkg.FullName() << endl;
|
|
clog << OutputInDepth(Depth) << "Trying to SmartUnpack " << DepPkg.FullName() << endl;
|
|
|
if (NonLoopingSmart(UNPACK_IMMEDIATE, Pkg, DepPkg, Depth, PkgLoop, &Bad, &Changed) == false)
|
|
if (NonLoopingSmart(UNPACK_IMMEDIATE, Pkg, DepPkg, Depth, PkgLoop, &Bad, &Changed) == false)
|