diff --git a/TODO b/TODO index 8b7aa783a..50dbe075a 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,4 @@ TODO list: - - check mail error (*) - update progress in calculating removal (*) - change package naming format adding category - migrate server code to ServerInterface diff --git a/libraries/databaseTools.py b/libraries/databaseTools.py index fff3e397b..b81a158ec 100644 --- a/libraries/databaseTools.py +++ b/libraries/databaseTools.py @@ -2359,6 +2359,9 @@ class etpDatabase(TextInterface): def retrieveNeeded(self, idpackage): + if not self.doesNeededExist(): + self.createNeededTable() + self.cursor.execute('SELECT library FROM needed,neededreference WHERE needed.idpackage = (?) and needed.idneeded = neededreference.idneeded', (idpackage,)) needed = self.fetchall2set(self.cursor.fetchall()) @@ -3244,6 +3247,13 @@ class etpDatabase(TextInterface): if rslt == None: raise exceptionTools.SystemDatabaseError("SystemDatabaseError: table extrainfo not found. Either does not exist or corrupted.") + def doesNeededExist(self): + self.cursor.execute('select name from SQLITE_MASTER where type = (?) and name = (?)', ("table","needed")) + rslt = self.cursor.fetchone() + if rslt == None: + return False + return True + def tablesChecksum(self): # NOTE: if you will add dependstable to the validation # please have a look at EquoInterface.__install_package_into_database world calculation cache stuff diff --git a/libraries/entropy.py b/libraries/entropy.py index 90d81e1a6..88badd79e 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -2708,6 +2708,7 @@ class PackageInterface: # -- CONFIGURATION FILE PROTECTION -- protected = False + tofile_before_protect = tofile try: for x in protect: @@ -2761,6 +2762,8 @@ class PackageInterface: # -- CONFIGURATION FILE PROTECTION -- except Exception, e: + protected = False # safely revert to false + tofile = tofile_before_protect self.Entropy.updateProgress( red("QA: ")+brown("cannot check CONFIG PROTECTION. Exception: %s :: error: %s" % ( str(Exception),