+ def RemoveRPMS( self ):
+
+ Message( "\nLooking for RPMs to be deleted." )
+ if os.access(DELETE_RPM_LIST_FILE, os.R_OK) and \
+ os.path.isfile(DELETE_RPM_LIST_FILE):
+ rpm_list_contents= file(DELETE_RPM_LIST_FILE).read()
+ rpm_list_contents= string.strip(rpm_list_contents)
+
+ if rpm_list_contents == "":
+ Message( "No RPMs listed in file to delete." )
+ return
+
+ rpm_list= string.join(string.split(rpm_list_contents))
+
+ Message( "Deleting these RPMs:" )
+ Message( rpm_list_contents )
+
+ rc= os.system( "%s -ev %s" % (RPM_PATH, rpm_list) )
+
+ if rc != 0:
+ Error( "Unable to delete RPMs, continuing. rc=%d" % rc )
+ else:
+ Message( "RPMs deleted successfully." )
+
+ else:
+ Message( "No RPMs list file found." )