error+=_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1=found_conflict.name,pkgname2=pkg.name,pkgname3=str_required)
print(_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1=found_conflict.name,pkgname2=pkg.name,pkgname3=str_required))
#~ error += _('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1 = found_conflict.name, pkgname2 = pkg.name, pkgname3 = str_required)
#~ print(_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1 = found_conflict.name, pkgname2 = pkg.name, pkgname3 = str_required))
warning+=_('{pkgname1} conflicts with {pkgname2}').format(pkgname1=pkg.name,pkgname2= found_conflict.name)
print(_('{pkgname1} conflicts with {pkgname2}').format(pkgname1=pkg.name,pkgname2= found_conflict.name))
warning+=_('{pkgname1} conflicts with {pkgname2}').format(pkgname1=pkg.name,pkgname2=new_found_conflict.name)
print(_('{pkgname1} conflicts with {pkgname2}').format(pkgname1=pkg.name,pkgname2=new_found_conflict.name))
else:
# check if the conflict can be safely removed
required=set(pkg.compute_requiredby())
required&=set(transaction.localpkgs.keys())
ifrequired:
str_required=''
foriteminrequired:
ifstr_required:
str_required+=', '
str_required+=item
iferror:
error+='\n'
error+=_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1=found_conflict.name,pkgname2=pkg.name,pkgname3=str_required)
print(_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1=found_conflict.name,pkgname2=pkg.name,pkgname3=str_required))
#~ error += _('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1 = found_conflict.name, pkgname2 = pkg.name, pkgname3 = str_required)
#~ print(_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1 = found_conflict.name, pkgname2 = pkg.name, pkgname3 = str_required))
error+=_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1=pkg.name,pkgname2=found_conflict.name,pkgname3=str_required)
print(_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1=pkg.name,pkgname2=found_conflict.name,pkgname3=str_required))
elifnotpkg.nameintransaction.to_remove:
#~ # check if the conflict can be safely removed
#~ required = set(pkg.compute_requiredby())
#~ required &= set(transaction.localpkgs.keys())
#~ if required:
#~ str_required = ''
#~ for item in required:
#~ if str_required:
#~ str_required += ', '
#~ str_required += item
#~ if error:
#~ error += '\n'
#~ error += _('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1 = pkg.name, pkgname2 = found_conflict.name, pkgname3 = str_required)
#~ print(_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1 = pkg.name, pkgname2 = found_conflict.name, pkgname3 = str_required))
#~ el
ifnotpkg.nameintransaction.to_remove:
transaction.to_remove.add(pkg.name)
ifwarning:
warning+='\n'
warning+=_('{pkgname1} conflicts with {pkgname2}').format(pkgname1=found_conflict.name,pkgname2=pkg.name)
print(_('{pkgname1} conflicts with {pkgname2}').format(pkgname1=found_conflict.name,pkgname2=pkg.name))
else:
# check if the conflict can be safely removed
required=set(pkg.compute_requiredby())
required&=set(transaction.localpkgs.keys())
ifrequired:
str_required=''
foriteminrequired:
ifstr_required:
str_required+=', '
str_required+=item
iferror:
error+='\n'
error+=_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1=pkg.name,pkgname2=found_conflict.name,pkgname3=str_required)
print(_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1=pkg.name,pkgname2=found_conflict.name,pkgname3=str_required))
elifnotpkg.nameintransaction.to_remove:
#~ # check if the conflict can be safely removed
#~ required = set(pkg.compute_requiredby())
#~ required &= set(transaction.localpkgs.keys())
#~ if required:
#~ str_required = ''
#~ for item in required:
#~ if str_required:
#~ str_required += ', '
#~ str_required += item
#~ if error:
#~ error += '\n'
#~ error += _('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1 = pkg.name, pkgname2 = found_conflict.name, pkgname3 = str_required)
#~ print(_('{pkgname1} conflicts with {pkgname2} but cannot be removed because it is needed by {pkgname3}').format(pkgname1 = pkg.name, pkgname2 = found_conflict.name, pkgname3 = str_required))
print(' to add:',transaction.to_addiftransaction.to_addelse'None')
iftransaction.to_load:
print(' to load:',transaction.to_load)
print(' will not be removed:',transaction.to_remove&wont_be_removediftransaction.to_remove&wont_be_removedelse'None')
transaction.to_remove-=wont_be_removed
print(' to remove:',transaction.to_removeiftransaction.to_removeelse'None')
print(' to update:',transaction.to_updateiftransaction.to_updateelse'None')
print('check done')
ifwarning:
WarningDialog.format_secondary_text(warning)
response=WarningDialog.run()
@ -827,15 +875,20 @@ def choose_provides(name):
ifnotpkg.nameinprovides.keys():
provides[pkg.name]=pkg
ifprovides:
choose_label.set_markup(_('<b>{pkgname} is provided by {number} packages.\nPlease choose the one(s) you want to install:</b>').format(pkgname=name,number=str(len(provides.keys()))))
choose_label.set_markup(_('<b>{pkgname} is provided by {number} packages.\nPlease choose the one(s) you want to install:</b>').format(pkgname=name,number=str(len(provides.keys()))))