dialog parent fix, etc
[fapman] / aaptinterface.cpp
index 1a0f046..74c6dfa 100644 (file)
@@ -1868,6 +1868,7 @@ void AAptInterface::readPinnedPackages()
        if( !f.exists() )
                return;
 
+       bool warnAllPinned = false;
        if( f.open(QIODevice::ReadOnly | QIODevice::Text ) )
        {
                qDebug() << "apt preferences exist: reading pinned packages";
@@ -1875,6 +1876,10 @@ void AAptInterface::readPinnedPackages()
                while( !f.atEnd() )
                {
                        QString line = f.readLine().trimmed();
+
+                       if( line=="Package: *" || line=="Package:*")
+                               warnAllPinned = true;
+
                        if( line.startsWith("Package:") ) {
                                pinned_packages++;
                                QString pkg = line.mid(8).trimmed();
@@ -1891,6 +1896,11 @@ void AAptInterface::readPinnedPackages()
                f.close();
                qDebug() << "read" << pinned_packages << "pinned packages";
        }
+
+       if( warnAllPinned ) {
+               iMainWindow->notifyDialog("Warning","You have pinned packages with '*' in apt preferences. It is strongly recommended to "
+                                                                 "remove such settings as they can result in unexpected behavior of Faster Application Manager.");
+       }
 }
 
 bool AAptInterface::loadInstallFiles(QStringList files_)