libyui-ncurses-pkg  2.50.10
NCPkgStatusStrategy.cc
1 /****************************************************************************
2 |
3 | Copyright (c) [2002-2011] Novell, Inc.
4 | All Rights Reserved.
5 |
6 | This program is free software; you can redistribute it and/or
7 | modify it under the terms of version 2 of the GNU General Public License as
8 | published by the Free Software Foundation.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program; if not, contact Novell, Inc.
17 |
18 | To contact Novell about this file by physical or electronic mail,
19 | you may find current contact information at www.novell.com
20 |
21 |***************************************************************************/
22 
23 
24 /*---------------------------------------------------------------------\
25 | |
26 | __ __ ____ _____ ____ |
27 | \ \ / /_ _/ ___|_ _|___ \ |
28 | \ V / _` \___ \ | | __) | |
29 | | | (_| |___) || | / __/ |
30 | |_|\__,_|____/ |_| |_____| |
31 | |
32 | core system |
33 | (C) SuSE GmbH |
34 \----------------------------------------------------------------------/
35 
36  File: NCPkgStatusStrategy.cc
37 
38  Author: Gabriele Strattner <gs@suse.de>
39 
40 /-*/
41 #define YUILogComponent "ncurses-pkg"
42 #include <YUILog.h>
43 
44 #include "NCPkgStatusStrategy.h"
45 #include "NCTable.h"
46 #include "NCZypp.h"
47 #include "NCPopupInfo.h"
48 #include "NCPkgStrings.h"
49 
50 #include <zypp/ui/Selectable.h>
51 #include <zypp/base/LogTools.h>
52 #include <zypp/ResObject.h>
53 
54 using std::endl;
55 
56 
57 //------------------------------------------------------------
58 // Base class for strategies to handle status
59 //------------------------------------------------------------
60 
61 //
62 // Constructor
63 //
64 NCPkgStatusStrategy::NCPkgStatusStrategy()
65 {
66 }
67 
68 //
69 // Destructor - must be defined here (because it is pure virtual)
70 //
71 NCPkgStatusStrategy::~NCPkgStatusStrategy()
72 {
73 }
74 
75 
76 ///////////////////////////////////////////////////////////////////
77 //
78 // NCPkgStatusStrategy::getPackageStatus()
79 //
80 // Gets status from package manager
81 //
82 ZyppStatus NCPkgStatusStrategy::getPackageStatus( ZyppSel slbPtr,
83  ZyppObj objPtr )
84 {
85  if ( slbPtr )
86  {
87  return slbPtr->status();
88  }
89  else
90  {
91  yuiError() << "Selectable pointer not valid" << endl;
92  return S_NoInst;
93  }
94 }
95 
96 
97 /////////////////////////////////////////////////////////////////
98 //
99 // NCPkgStatusStrategy::setObjectStatus()
100 //
101 // Informs the package manager about the status change
102 //
103 bool NCPkgStatusStrategy::setObjectStatus( ZyppStatus newstatus, ZyppSel slbPtr, ZyppObj objPtr )
104 {
105  bool ok = false;
106 
107  if ( !slbPtr )
108  {
109  yuiError() << "Invalid package object" << endl;
110  return false;
111  }
112 
113  ok = slbPtr->setStatus( newstatus );
114 
115  yuiMilestone() << "Set status of: " << slbPtr->name() << " to: "
116  << newstatus << " returns: " << ( ok ? "true" : "false" ) << endl;
117 
118  return ok;
119 }
120 
121 
122 ///////////////////////////////////////////////////////////////////
123 //
124 // NCPkgStatusStrategy::keyToStatus()
125 //
126 // Returns the corresponding status
127 //
128 bool NCPkgStatusStrategy::keyToStatus( const int & key,
129  ZyppSel slbPtr,
130  ZyppObj objPtr,
131  ZyppStatus & newStat )
132 {
133  if ( !slbPtr )
134  return false;
135 
136  bool valid = true;
137  ZyppStatus retStat = S_NoInst;
138  ZyppStatus oldStatus = getPackageStatus( slbPtr, objPtr );
139  bool installed = !slbPtr->installedEmpty();
140 
141  // get the new status
142  switch ( key )
143  {
144  case '-':
145  if ( installed ) // installed package -> always set status to delete
146  {
147  // if required, NCPkgTable::changeStatus() shows the delete notify
148  retStat = S_Del;
149  }
150  else
151  {
152  retStat = S_NoInst;
153  }
154  break;
155 
156  case '+':
157  if ( oldStatus == S_NoInst
158  || oldStatus == S_AutoInstall )
159  {
160  // if required, NCPkgTable::changeStatus() shows the notify message
161  retStat = S_Install;
162  }
163  else if ( oldStatus == S_Del
164  || oldStatus == S_AutoDel)
165  {
166  retStat = S_KeepInstalled;
167  }
168  else if ( oldStatus == S_AutoUpdate )
169  {
170  retStat = S_Update;
171  }
172  else
173  {
174  valid = false;
175  }
176  break;
177 
178  case '>':
179  if ( oldStatus == S_KeepInstalled
180  || oldStatus == S_Del
181  || oldStatus == S_AutoDel )
182  {
183  if ( slbPtr->hasCandidateObj() )
184  {
185  retStat = S_Update;
186  }
187  }
188  else
189  {
190  valid = false;
191  }
192  break;
193 
194  // this is the case for 'going back' i.e. S_Install -> S_NoInst, S_Update -> S_KeepInstalled
195  // not for S_Del, since '+' key does this
196  case '<':
197  if ( oldStatus == S_Install
198  || oldStatus == S_AutoInstall )
199  {
200  retStat = S_NoInst;
201  }
202  else if ( oldStatus == S_Update
203  || oldStatus == S_AutoUpdate )
204  {
205  retStat = S_KeepInstalled;
206  }
207  break;
208 
209  case '!': // set S_Taboo
210  if ( !installed )
211  {
212  retStat = S_Taboo;
213  }
214  break;
215 
216  case '*': // set S_Protected
217  if ( installed )
218  {
219  retStat = S_Protected;
220  }
221  break;
222 
223  default:
224  yuiDebug() << "Key not valid" << endl;
225  valid = false;
226  break;
227  }
228 
229  if ( valid )
230  newStat = retStat;
231 
232  return valid;
233 }
234 
235 
236 //
237 // Cycle the status patch to a new one and return the new status in
238 // newStat_ret.
239 //
240 // The function return value is 'true' if ok, 'false' if not.
241 //
242 bool NCPkgStatusStrategy::cycleStatus( ZyppSel slbPtr,
243  ZyppObj objPtr,
244  ZyppStatus & newStat_ret )
245 {
246  if ( !slbPtr )
247  return false;
248 
249  bool ok = true;
250 
251  ZyppStatus oldStatus = getPackageStatus( slbPtr, objPtr );
252  ZyppStatus newStatus = oldStatus;
253  ZyppPattern patPtr = tryCastToZyppPattern (objPtr);
254 
255  switch ( oldStatus )
256  {
257  case S_Del:
258  newStatus = S_KeepInstalled;
259  break;
260 
261  case S_Install:
262  newStatus =S_NoInst;
263  break;
264 
265  case S_Update:
266  newStatus = S_Del;
267  break;
268 
269  case S_KeepInstalled:
270  if ( patPtr )
271  newStatus = S_Install;
272 
273  else if ( slbPtr->hasCandidateObj() )
274  {
275  newStatus = S_Update;
276  }
277  else
278  {
279  newStatus = S_Del;
280  }
281  break;
282 
283  case S_NoInst:
284  if ( slbPtr->hasCandidateObj() || patPtr )
285  {
286  newStatus = S_Install;
287  }
288  else
289  {
290  yuiWarning() << "No candidate object for " << slbPtr->theObj()->name().c_str() << endl;
291  newStatus = S_NoInst;
292  }
293  break;
294 
295  case S_AutoInstall:
296  // this used to be taboo before, but now ZYpp supports
297  // saving weak locks (unselected packages)
298  newStatus = S_NoInst;
299  break;
300 
301  case S_AutoDel:
302  newStatus = S_KeepInstalled;
303  break;
304 
305  case S_AutoUpdate:
306  newStatus = S_KeepInstalled;
307  break;
308 
309  case S_Taboo:
310  newStatus = S_NoInst;
311  break;
312 
313  case S_Protected:
314  newStatus = S_KeepInstalled;
315  break;
316  }
317 
318  yuiMilestone() << "Status toogled: old " << oldStatus << ", new " << newStatus << endl;
319  newStat_ret = newStatus;
320 
321  return ok;
322 }
323 
324 
325 ///////////////////////////////////////////////////////////////////
326 //
327 // NCPkgStatusStrategy::solveResolvableCollections()
328 //
329 // Do a "small" solver run
330 //
332 {
333  zypp::Resolver_Ptr resolver = zypp::getZYpp()->resolver();
334  resolver->resolvePool();
335 }
336 
337 
338 
339 //------------------------------------------------------------
340 // Class for strategies to get status for packages
341 //------------------------------------------------------------
342 
343 //
344 // Constructor
345 //
346 PackageStatStrategy::PackageStatStrategy()
348 {
349 }
350 
351 
352 
353 
354 //------------------------------------------------------------
355 // Class for strategies to get status for patches
356 //------------------------------------------------------------
357 
358 //
359 // Constructor
360 //
361 PatchStatStrategy::PatchStatStrategy()
363 {
364 }
365 
366 
367 ///////////////////////////////////////////////////////////////////
368 //
369 // PatchStatStrategy::keyToStatus()
370 //
371 // Returns the corresponding status
372 //
373 bool PatchStatStrategy::keyToStatus( const int & key,
374  ZyppSel slbPtr,
375  ZyppObj objPtr,
376  ZyppStatus & newStat )
377 {
378  if ( !slbPtr || !slbPtr->hasCandidateObj() )
379  return false;
380 
381  bool valid = true;
382  ZyppStatus retStat = S_NoInst;
383  ZyppStatus oldStatus = getPackageStatus( slbPtr, objPtr );
384  bool toBeInst = slbPtr->candidateObj().status().isToBeInstalled();
385  bool isRelevant = slbPtr->candidateObj().isRelevant();
386  bool isBroken = slbPtr->candidateObj().isBroken();
387 
388  yuiMilestone() << slbPtr->name() << ": " << (toBeInst?"to be installed" : "not to be installed,")
389  << " old status: " << oldStatus << endl;
390 
391  // get the new status
392  switch ( key )
393  {
394  case '-':
395  // To be installed includes S_Install and S_AutoInstall
396  if ( toBeInst )
397  {
398  retStat = S_NoInst;
399  }
400  else if ( oldStatus == S_Taboo )
401  {
402  if ( isBroken )
403  {
404  retStat = S_Install;
405  }
406  else
407  {
408  retStat = S_NoInst;
409  }
410  }
411  else // patches cannot be deleted
412  {
413  valid = false;
414  }
415  break;
416  case '+':
417  // only relevant patches can be installed
418  if ( isRelevant &&
419  ( oldStatus == S_NoInst ||
420  oldStatus == S_AutoInstall ||
421  oldStatus == S_KeepInstalled ) )
422  {
423  retStat = S_Install;
424  }
425  else
426  {
427  valid = false;
428  }
429  break;
430  case '!':
431  {
432  // For patches there isn't an installed object available (patches are not installed,
433  // they can be satisfied because required version/s of the patch package/s is/are
434  // installed). Therefore they only can be set to S_Taboo (not to S_Protected).
435  retStat = S_Taboo;
436  }
437  break;
438  default:
439  yuiDebug() << "Key not valid" << endl;
440  valid = false;
441  }
442 
443  if ( valid )
444  {
445  newStat = retStat;
446  }
447  yuiMilestone() << "New status: " << newStat << endl;
448 
449  return valid;
450 }
451 
452 
453 //
454 // Cycle the status patch to a new one and return the new status in
455 // newStat_ret.
456 //
457 // The function return value is 'true' if ok, 'false' if not.
458 //
459 bool PatchStatStrategy::cycleStatus( ZyppSel slbPtr,
460  ZyppObj objPtr,
461  ZyppStatus & newStat_ret )
462 {
463  if ( !slbPtr || !slbPtr->hasCandidateObj() )
464  return false;
465 
466  bool ok = true;
467 
468  ZyppStatus oldStatus = getPackageStatus( slbPtr, objPtr );
469  bool isBroken = slbPtr->candidateObj().isBroken();
470  ZyppStatus newStatus = oldStatus;
471 
472  switch ( oldStatus )
473  {
474  case S_Install:
475  case S_AutoInstall:
476  newStatus = S_NoInst;
477  break;
478 
479  case S_KeepInstalled:
480  newStatus = S_Install;
481  break;
482 
483  case S_NoInst:
484  newStatus = S_Install;
485  break;
486 
487  case S_Taboo:
488  if ( isBroken )
489  {
490  newStatus = S_Install;
491  }
492  else
493  {
494  newStatus = S_NoInst;
495  }
496  break;
497 
498  default:
499  newStatus = oldStatus;
500  break;
501  }
502 
503  yuiMilestone() << "Status toogled: old " << oldStatus << ", new " << newStatus << endl;
504  newStat_ret = newStatus;
505 
506  return ok;
507 }
508 
509 
510 /////////////////////////////////////////////////////////////////
511 //
512 // PatchStatStrategy::setObjectStatus()
513 //
514 // Inform the package manager about the status change
515 // of the patch
516 //
517 bool PatchStatStrategy::setObjectStatus( ZyppStatus newstatus, ZyppSel slbPtr, ZyppObj objPtr )
518 {
519  bool ok = false;
520 
521  if ( !slbPtr )
522  {
523  yuiError() << "Invalid patch object" << endl;
524  return false;
525  }
526 
527  ok = slbPtr->setStatus( newstatus );
528  yuiMilestone() << "Set status of: " << slbPtr->name() << " to: "
529  << newstatus << " returns: " << ( ok ? "true" : "false" ) << endl;
530 
531  // do a solver run
533 
534  return ok;
535 }
536 
537 
538 //------------------------------------------------------------
539 // Class for strategies for selections
540 //------------------------------------------------------------
541 
542 //
543 // Constructor
544 //
545 SelectionStatStrategy::SelectionStatStrategy()
547 {
548 }
549 
550 
551 /////////////////////////////////////////////////////////////////
552 //
553 // SelectionStatStrategy::setObjectStatus()
554 //
555 // Inform the package manager about the status change
556 // of the selection
557 //
558 bool SelectionStatStrategy::setObjectStatus( ZyppStatus newstatus, ZyppSel slbPtr, ZyppObj objPtr )
559 {
560  bool ok = false;
561 
562  if ( !slbPtr || !objPtr )
563  {
564  yuiError() << "Invalid selection" << endl;
565  return false;
566  }
567 
568  ok = slbPtr->setStatus( newstatus );
569  yuiMilestone() << "Set status of: " << slbPtr->name() << " to: "
570  << newstatus << " returns: " << ( ok ? "true" : "false" ) << endl;
571 
572  // do a solver run -> solver runs in NCPkgTable::changeStatus()
573  // solveResolvableCollections();
574 
575  return ok;
576 }
577 
578 
579 //------------------------------------------------------------
580 // Class for strategies for depndencies
581 //------------------------------------------------------------
582 
583 //
584 // Constructor
585 //
586 DependencyStatStrategy::DependencyStatStrategy()
588 {
589 }
590 
591 
592 //------------------------------------------------------------
593 // Class for strategies to get status for available packages
594 //------------------------------------------------------------
595 
596 //
597 // Constructor
598 //
599 AvailableStatStrategy::AvailableStatStrategy()
601 {
602 }
603 
604 
605 ///////////////////////////////////////////////////////////////////
606 //
607 // AvailableStatStrategy::setObjectStatus
608 //
609 // Informs the package manager about the new status (sets the candidate)
610 //
611 bool AvailableStatStrategy::setObjectStatus( ZyppStatus newstatus,
612  ZyppSel slbPtr,
613  ZyppObj objPtr )
614 {
615  bool ok = false;
616 
617  if ( !slbPtr || !objPtr )
618  {
619  return false;
620  }
621 
622  ZyppObj newCandidate = objPtr;
623 
624  if ( newCandidate != slbPtr->candidateObj() )
625  {
626  yuiMilestone() << "CANDIDATE changed" << endl;
627 
628  // Change status of selectable
629  ZyppStatus status = slbPtr->status();
630 
631  if ( slbPtr->installedObj() &&
632  slbPtr->installedObj()->edition() == newCandidate->edition() &&
633  slbPtr->installedObj()->vendor() == newCandidate->vendor() )
634  {
635  yuiMilestone() << "Identical package installed" << endl;
636  // Switch back to the original instance -
637  // the version that was previously installed
638  status = S_KeepInstalled;
639  }
640  else
641  {
642  switch ( status )
643  {
644  case S_KeepInstalled:
645  case S_Protected:
646  case S_AutoDel:
647  case S_AutoUpdate:
648  case S_Del:
649  case S_Update:
650 
651  status = S_Update;
652  break;
653 
654  case S_NoInst:
655  case S_Taboo:
656  case S_Install:
657  case S_AutoInstall:
658  status = S_Install;
659  break;
660  }
661  }
662 
663  // Set candidate
664  ok = bool( slbPtr->setCandidate( newCandidate ) );
665  yuiMilestone() << "Set user candidate returns: " << ( ok ? "true" : "false" ) << endl;
666  if ( ok )
667  {
668  // Set status
669  ok = slbPtr->setStatus( status );
670  yuiMilestone() << "Set status of: " << slbPtr->name() << " to: "
671  << status << " returns: " << ( ok ? "true" : "false" ) << endl;
672  }
673  }
674 
675  return ok;
676 }
677 
678 
679 //------------------------------------------------------------
680 // Class for strategies to get status for multi version packages
681 //------------------------------------------------------------
682 
683 //
684 // Constructor
685 //
686 MultiVersionStatStrategy::MultiVersionStatStrategy()
688 {
689 }
690 
691 
692 ///////////////////////////////////////////////////////////////////
693 //
694 // MultiVersionStatStrategy::getPackageStatus()
695 //
696 // Gets status from package manager
697 //
699  ZyppObj objPtr )
700 {
701  if ( !slbPtr || !objPtr )
702  {
703  yuiError() << "Selectable pointer not valid" << endl;
704  return S_NoInst;
705  }
706 
707  zypp::PoolItem itemPtr ( objPtr->satSolvable() );
708  return slbPtr->pickStatus( itemPtr );
709 }
710 
711 
712 ///////////////////////////////////////////////////////////////////
713 //
714 // MultiVersionStatStrategy::setObjectStatus
715 //
716 // Checking for multiversion and not-multiversion conflicts and
717 // informs the package manager about the new status.
718 //
719 bool MultiVersionStatStrategy::setObjectStatus( ZyppStatus newstatus,
720  ZyppSel slbPtr,
721  ZyppObj objPtr )
722 {
723  bool ok = false;
724 
725  if ( !slbPtr || !objPtr )
726  {
727  return false;
728  }
729  zypp::PoolItem itemPtr ( objPtr->satSolvable() );
730 
731  bool multiVersion = itemPtr->multiversionInstall();
732  yuiMilestone() << "Selected: "
733  << ( multiVersion ? "Multiversion " : "Non-Multiversion " )
734  << itemPtr;
735 
736  if ( anyMultiVersionToInstall( slbPtr, !multiVersion ) )
737  {
738  yuiMilestone() << "Multiversion and non-multiversion conflict!" << endl;
739 
740  if ( mixedMultiVersionPopup( multiVersion ) )
741  {
742  ok = slbPtr->setPickStatus( itemPtr, newstatus );
743  yuiMilestone() << "Set new status of: "<< slbPtr->name() << ", " << objPtr->edition()
744  << " to: " << newstatus << " returns: " << ( ok ? "true" : "false" ) << endl;
745  }
746  else
747  {
748  yuiMilestone() << "Selection canceled by the user.";
749  }
750  }
751  else
752  {
753  ok = slbPtr->setPickStatus( itemPtr, newstatus );
754  yuiMilestone() << "Set new status of: "<< slbPtr->name() << ", " << objPtr->edition()
755  << " to: " << newstatus << " returns: " << ( ok ? "true" : "false" ) << endl;
756  }
757 
758  return ok;
759 }
760 
761 
762 //
763 // Check if any package version is marked for installation where its
764 // 'multiversion' flag is set to 'multiversion'.
765 //
766 bool MultiVersionStatStrategy::anyMultiVersionToInstall( ZyppSel slbPtr, bool multiversion ) const
767 {
768  if ( ! slbPtr )
769  return false;
770 
771  zypp::ui::Selectable::available_iterator it = slbPtr->availableBegin();
772 
773  while ( it != slbPtr->availableEnd() )
774  {
775  if ( it->multiversionInstall() == multiversion )
776  {
777  switch ( slbPtr->pickStatus( *it ) )
778  {
779  case S_Install:
780  case S_AutoInstall:
781  yuiMilestone() << "Found " << ( multiversion ? "multiversion" : "non-multiversion" )
782  << " to install" << endl;
783  return true;
784  case S_KeepInstalled:
785  yuiMilestone() << "Found " << ( multiversion ? "multiversion" : "non-multiversion" )
786  << " wich is already installed" << endl;
787  return true;
788  default:
789  break;
790  }
791  }
792 
793  ++it;
794  }
795 
796  yuiMilestone() << "No " << ( multiversion ? "multiversion" : "non-multiversion" )
797  << " to install" << endl;
798  return false;
799 }
800 
801 
802 ///////////////////////////////////////////////////////////////////
803 //
804 // MultiVersionStatStrategy::mixedMultiVersionPopup
805 //
806 // Ask user if he really wants to install incompatible package versions.
807 // Return 'true' if he hits [Continue], 'false' if [Cancel].
808 //
810 {
811  std::string msg = NCPkgStrings::MultiversionIntro();
812 
813  if ( multiversion )
814  {
815  msg += NCPkgStrings::MultiversionText();
816  }
817  else
818  {
819  msg += NCPkgStrings::NotMultiversionText();
820  }
821 
822  NCPopupInfo * cancelMsg = new NCPopupInfo( wpos( (NCurses::lines()-22)/2, (NCurses::cols()-45)/2 ),
824  msg,
827  );
828  cancelMsg->setPreferredSize( 60, 15 );
829  cancelMsg->focusCancelButton();
830  NCursesEvent input = cancelMsg->showInfoPopup();
831 
832  YDialog::deleteTopmostDialog();
833 
834  return !(input == NCursesEvent::cancel);
835 }
836 
837 
838 //------------------------------------------------------------
839 // Class for strategies to get status for update packages
840 //------------------------------------------------------------
841 
842 //
843 // Constructor
844 //
845 UpdateStatStrategy::UpdateStatStrategy()
847 {
848 }
849 
850 
851 //------------------------------------------------------------
852 // Class for strategies to get status for patch packages
853 //------------------------------------------------------------
854 
855 //
856 // Constructor
857 //
858 PatchPkgStatStrategy::PatchPkgStatStrategy()
860 {
861 }
862 
863 
864 bool PatchPkgStatStrategy::setObjectStatus( ZyppStatus newstatus,
865  ZyppSel slbPtr,
866  ZyppObj objPtr )
867 {
868  // it is not possible to set the status of the packages belonging to a certain patch
869  return false;
870 }
NCPkgStatusStrategy::cycleStatus
virtual bool cycleStatus(ZyppSel slbPtr, ZyppObj objPtr, ZyppStatus &newStat_ret)
Cyle the package status (e.g.
Definition: NCPkgStatusStrategy.cc:242
NCPkgStatusStrategy::setObjectStatus
virtual bool setObjectStatus(ZyppStatus newstatus, ZyppSel slbPtr, ZyppObj objPtr)
Informs the package manager about the new status.
Definition: NCPkgStatusStrategy.cc:103
NCPkgStrings::CancelLabel
static const std::string CancelLabel()
The label of the Cancel button.
Definition: NCPkgStrings.cc:681
NCPkgStatusStrategy::keyToStatus
virtual bool keyToStatus(const int &key, ZyppSel slbPtr, ZyppObj objPtr, ZyppStatus &newStat)
Returns the new status to the given key (respecting the old status of th eobject).
Definition: NCPkgStatusStrategy.cc:128
AvailableStatStrategy::setObjectStatus
virtual bool setObjectStatus(ZyppStatus newstatus, ZyppSel slbPtr, ZyppObj objPtr)
Informs the package manager about the new status and additionally sets the candidate object to the us...
Definition: NCPkgStatusStrategy.cc:611
PatchStatStrategy::keyToStatus
virtual bool keyToStatus(const int &key, ZyppSel slbPtr, ZyppObj objPtr, ZyppStatus &newStat)
Returns the new status to the given key (respecting the old status of the patch).
Definition: NCPkgStatusStrategy.cc:373
MultiVersionStatStrategy::getPackageStatus
virtual ZyppStatus getPackageStatus(ZyppSel slbPtr, ZyppObj objPtr)
Gets the status information from the package manager.
Definition: NCPkgStatusStrategy.cc:698
NCPkgStatusStrategy::solveResolvableCollections
void solveResolvableCollections()
Do a "small" solver run for all "resolvable collections", i.e., for selections, patterns,...
Definition: NCPkgStatusStrategy.cc:331
MultiVersionStatStrategy::mixedMultiVersionPopup
virtual bool mixedMultiVersionPopup(bool multiversion) const
Ask user if he really wants to install incompatible package versions.
Definition: NCPkgStatusStrategy.cc:809
NCPkgStatusStrategy::getPackageStatus
virtual ZyppStatus getPackageStatus(ZyppSel slbPtr, ZyppObj objPtr)
Gets the status information from the package manager.
Definition: NCPkgStatusStrategy.cc:82
MultiVersionStatStrategy::anyMultiVersionToInstall
virtual bool anyMultiVersionToInstall(ZyppSel slbPtr, bool multiversion) const
Check if any package version is marked for installation where its 'multiversion' flag is set to 'mult...
Definition: NCPkgStatusStrategy.cc:766
PatchStatStrategy::setObjectStatus
virtual bool setObjectStatus(ZyppStatus newstatus, ZyppSel slbPtr, ZyppObj objPtr)
Sets the status of the patch AND the status of the patch packages.
Definition: NCPkgStatusStrategy.cc:517
NCPkgStrings::MultiversionHead
static const std::string MultiversionHead()
Info about multiversion packages.
Definition: NCPkgStrings.cc:821
PatchPkgStatStrategy::setObjectStatus
virtual bool setObjectStatus(ZyppStatus newstatus, ZyppSel slbPtr, ZyppObj objPtr)
It is not possible to std::set the package status for packages belonging to a patch,...
Definition: NCPkgStatusStrategy.cc:864
MultiVersionStatStrategy::setObjectStatus
virtual bool setObjectStatus(ZyppStatus newstatus, ZyppSel slbPtr, ZyppObj objPtr)
Informs the package manager about the new status and additionally sets the candidate object to the us...
Definition: NCPkgStatusStrategy.cc:719
NCPkgStrings::ContinueLabel
static const std::string ContinueLabel()
The label of the Continue button.
Definition: NCPkgStrings.cc:674
NCPkgStatusStrategy
Definition: NCPkgStatusStrategy.h:53
PatchStatStrategy::cycleStatus
virtual bool cycleStatus(ZyppSel slbPtr, ZyppObj objPtr, ZyppStatus &newStat_ret)
Cycle the patch status (e.g.
Definition: NCPkgStatusStrategy.cc:459
SelectionStatStrategy::setObjectStatus
virtual bool setObjectStatus(ZyppStatus newstatus, ZyppSel slbPtr, ZyppObj objPtr)
Sets the status of the selection.
Definition: NCPkgStatusStrategy.cc:558