|
|
|
@ -282,10 +282,10 @@ void install::showDependencies()
|
|
|
|
|
if( allDepends[i].contains("|") ) {
|
|
|
|
|
tmp = TQStringList::split( " | ", allDepends[i] );
|
|
|
|
|
uint j = 0;
|
|
|
|
|
bool exit = FALSE;
|
|
|
|
|
bool exit = false;
|
|
|
|
|
while ( !exit && j < tmp.count() ) {
|
|
|
|
|
if( isInstalled(tmp[j]) )
|
|
|
|
|
exit = TRUE;
|
|
|
|
|
exit = true;
|
|
|
|
|
j++;
|
|
|
|
|
}
|
|
|
|
|
if( !exit )
|
|
|
|
@ -362,9 +362,9 @@ void install::showDependencies()
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
printf("2");
|
|
|
|
|
this->shell->setCommand("if dpkg --compare-versions "+pkgVersion+" \""+op+"\" "+cVersion+"; then echo \"TRUE\"; fi");
|
|
|
|
|
this->shell->setCommand("if dpkg --compare-versions "+pkgVersion+" \""+op+"\" "+cVersion+"; then echo \"true\"; fi");
|
|
|
|
|
this->shell->start(true);
|
|
|
|
|
if( this->shell->getBuffer().stripWhiteSpace() == "TRUE" )
|
|
|
|
|
if( this->shell->getBuffer().stripWhiteSpace() == "true" )
|
|
|
|
|
rconflicts += name+" ";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -418,21 +418,21 @@ bool install::isInstalled(TQString input)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( sysVersion.contains("(") || sysVersion == "" )
|
|
|
|
|
return FALSE;
|
|
|
|
|
return false;
|
|
|
|
|
else if( version != "" )
|
|
|
|
|
{
|
|
|
|
|
TQString op = TQStringList::split( " ", version )[0];
|
|
|
|
|
TQString pkgVersion = TQStringList::split( " ", version )[1];
|
|
|
|
|
|
|
|
|
|
this->shell->setCommand("if dpkg --compare-versions "+sysVersion+" \""+op+"\" "+pkgVersion+"; then echo \"TRUE\"; fi");
|
|
|
|
|
this->shell->setCommand("if dpkg --compare-versions "+sysVersion+" \""+op+"\" "+pkgVersion+"; then echo \"true\"; fi");
|
|
|
|
|
this->shell->start(true);
|
|
|
|
|
if( this->shell->getBuffer().stripWhiteSpace() == "TRUE" )
|
|
|
|
|
return TRUE;
|
|
|
|
|
if( this->shell->getBuffer().stripWhiteSpace() == "true" )
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
|
return FALSE;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------//
|
|
|
|
@ -454,16 +454,16 @@ bool install::checkArchitecture()
|
|
|
|
|
TQString arch = fields.grep("Architecture:")[0].mid(14);
|
|
|
|
|
|
|
|
|
|
if(arch == "all")
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
// get architecture
|
|
|
|
|
this->shell->setCommand("dpkg --print-architecture");
|
|
|
|
|
this->shell->start(true);
|
|
|
|
|
|
|
|
|
|
if( arch == this->shell->getBuffer().stripWhiteSpace() )
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -473,9 +473,9 @@ bool install::isLocked()
|
|
|
|
|
this->shell->setCommand("apt-get install -s" );
|
|
|
|
|
this->shell->start(true);
|
|
|
|
|
if( this->shell->getBuffer().stripWhiteSpace().contains("...") )
|
|
|
|
|
return FALSE;
|
|
|
|
|
return false;
|
|
|
|
|
else
|
|
|
|
|
return TRUE;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|