release 0.6.6
[fapman] / aaptinterface.cpp
index 74c6dfa..3f4546d 100644 (file)
@@ -539,6 +539,10 @@ QString AAptInterface::finishProcessCommonErrorMessages(QByteArray& output)
                msg = "Some of your packages have unmet dependencies which could not be fixed. See the log for details.";
        } else if( output.contains("E: The method driver") ) {
                msg = "Apt failed to find a suitable method driver. One or more of your repositories might have an invalid URL.";
+       } else if( output.contains("E: Invalid record in the preferences file") ) {
+               msg = "Invalid record in the apt preferences file.";
+       } else if( output.contains("E: Malformed line") && output.contains("in source list") ) {
+               msg = "Malformed line in sources list. Check your repository settings.";
        }
 
        return msg;
@@ -750,15 +754,26 @@ void AAptInterface::uiUpdaterAptGetUpdate()
                return;
 
        QStringList lines = QString( data.trimmed() ).split('\n');
+       QString infoline;
 
        for( int i=0; i<lines.count(); i++ )
        {
                if( lines.at(i).startsWith("Get:") || lines.at(i).startsWith("Hit ") )
-                       iCatalogCounter++;
+               {
+                       iCatalogCounter++;                      
+               }
+               infoline = lines.at(i).trimmed();
        }
+       //if( infoline.isEmpty() )
+               //infoline = "arstus";
+
        //iUiDimmer->updateText( QString("Updating catalogs (%1)").arg(iCatalogCounter) );
        //qDebug() << iCatalogCounter << iCatalogsTotal;
-       iUiDimmer->setProgress( iCatalogCounter*100/iCatalogsTotal );
+
+       //iUiDimmer->updateText("Updating catalogs<br><font size=\"-1\">" + infoline + "</font>");
+
+       if( iCatalogsTotal > 0 )
+               iUiDimmer->setProgress( iCatalogCounter*100/iCatalogsTotal );
 }
 
 void AAptInterface::uiUpdaterAptGetInstall()
@@ -1445,6 +1460,10 @@ bool AAptInterface::processPackageDataLine(Package*& pkg, QByteArray& line)
        {
                pkg->appendBreaks( line.mid(7).trimmed() );
        }
+       else if( line.startsWith("Maintainer:") )
+       {
+               pkg->setMaintainer( line.mid(11).trimmed() );
+       }
 
        else if( line.startsWith("Description:") )
        {