Merge lp:~jibel/synaptic/bug.513460 into lp:synaptic

Proposed by Jean-Baptiste Lallement
Status: Merged
Merged at revision: 1771
Proposed branch: lp:~jibel/synaptic/bug.513460
Merge into: lp:synaptic
Diff against target: 64 lines (+22/-9)
1 file modified
gtk/rgmainwindow.cc (+22/-9)
To merge this branch: bzr merge lp:~jibel/synaptic/bug.513460
Reviewer Review Type Date Requested Status
synaptic-developers Pending
Review via email: mp+23173@code.launchpad.net

Description of the change

I applied nearly the same checks than those to enable/disable the contextual menu entries.
It fixes the synaptic bug but there is still something odd with apt.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks! I merged it into the lucid branch, the next step is to merge into trunk/ and upload to debian.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'gtk/rgmainwindow.cc'
--- gtk/rgmainwindow.cc 2010-03-25 20:34:44 +0000
+++ gtk/rgmainwindow.cc 2010-04-11 11:29:16 +0000
@@ -641,6 +641,7 @@
641 vector<RPackage *> exclude;641 vector<RPackage *> exclude;
642 vector<RPackage *> instPkgs;642 vector<RPackage *> instPkgs;
643 RPackage *pkg = NULL;643 RPackage *pkg = NULL;
644 int flags;
644645
645 while (li != NULL) {646 while (li != NULL) {
646 pkgDepCache::ActionGroup group(*_lister->getCache()->deps());647 pkgDepCache::ActionGroup group(*_lister->getCache()->deps());
@@ -650,6 +651,8 @@
650 if (pkg == NULL)651 if (pkg == NULL)
651 continue;652 continue;
652653
654 flags = pkg->getFlags();
655
653 pkg->setNotify(false);656 pkg->setNotify(false);
654657
655 // needed for the stateChange 658 // needed for the stateChange
@@ -660,24 +663,34 @@
660 pkgKeepHelper(pkg);663 pkgKeepHelper(pkg);
661 break;664 break;
662 case PKG_INSTALL: // install665 case PKG_INSTALL: // install
663 instPkgs.push_back(pkg);666 // install only if not installed
664 pkgInstallHelper(pkg, false);667 if(!(flags & RPackage::FInstalled))
668 pkgInstallHelper(pkg, false);
665 break;669 break;
666 case PKG_INSTALL_FROM_VERSION: // install with specific version670 case PKG_INSTALL_FROM_VERSION: // install with specific version
667 pkgInstallHelper(pkg, false);671 if(!(flags & RPackage::FInstalled))
672 pkgInstallHelper(pkg, false);
668 break;673 break;
669 case PKG_REINSTALL: // reinstall674 case PKG_REINSTALL: // reinstall
670 instPkgs.push_back(pkg);675 // Only reinstall installable packages and non outdated packages
671 pkgInstallHelper(pkg, false, true);676 if(flags & RPackage::FInstalled
672 break;677 && !(flags & RPackage::FNotInstallable)
678 && !(flags & RPackage::FOutdated)) {
679 instPkgs.push_back(pkg);
680 pkgInstallHelper(pkg, false, true);
681 }
682 break;
673 case PKG_DELETE: // delete683 case PKG_DELETE: // delete
674 pkgRemoveHelper(pkg);684 if(flags & RPackage::FInstalled)
685 pkgRemoveHelper(pkg);
675 break;686 break;
676 case PKG_PURGE: // purge687 case PKG_PURGE: // purge
677 pkgRemoveHelper(pkg, true);688 if(flags & RPackage::FInstalled || flags & RPackage::FResidualConfig)
689 pkgRemoveHelper(pkg, true);
678 break;690 break;
679 case PKG_DELETE_WITH_DEPS:691 case PKG_DELETE_WITH_DEPS:
680 pkgRemoveHelper(pkg, true, true);692 if(flags & RPackage::FInstalled || flags & RPackage::FResidualConfig)
693 pkgRemoveHelper(pkg, true, true);
681 break;694 break;
682 default:695 default:
683 cout << "uh oh!!!!!!!!!" << endl;696 cout << "uh oh!!!!!!!!!" << endl;

Subscribers

People subscribed via source and target branches

to status/vote changes: