Ticket #13: yum-consider-tsinfo.patch
| File yum-consider-tsinfo.patch, 4.0 kB (added by bergolth, 3 years ago) |
|---|
-
yum/__init__.py
old new 2575 2575 self.tsInfo.addObsoleted(obsoletee, po) 2576 2576 tx_return.append(txmbr) 2577 2577 else: 2578 # naive handling of packages that are already in the transaction set 2579 if not self.allowedMultipleInstalls(po): 2580 for tsmember in self.tsInfo.matchNaevr(name = po.name): 2581 self.tsInfo.remove(tsmember.pkgtup) 2582 2578 2583 txmbr = self.tsInfo.addInstall(po) 2579 2584 tx_return.append(txmbr) 2580 2585 … … 2846 2851 2847 2852 tx_return = [] 2848 2853 pkgs = [] 2849 2854 tspkgs = [] 2850 2855 2851 2856 if po: 2852 2857 pkgs = [po] 2858 tspkgs = self.tsInfo.getMembers(po.pkgtup) 2853 2859 else: 2854 2860 if kwargs.has_key('pattern'): 2855 2861 if kwargs['pattern'][0] == '@': … … 2870 2876 self.logger.critical(_('No Match for argument: %s') % arg) 2871 2877 else: 2872 2878 pkgs.extend(depmatches) 2873 2879 2880 (e,m,u) = self.tsInfo.matchPackageNames([kwargs['pattern']]) 2881 tspkgs.extend(e) 2882 tspkgs.extend(m) 2874 2883 else: 2875 2884 nevra_dict = self._nevra_kwarg_parse(kwargs) 2876 2885 … … 2882 2891 if not kwargs.get('silence_warnings', False): 2883 2892 self.logger.warning(_("No package matched to remove")) 2884 2893 2894 tspkgs = self.tsInfo.matchNaevr(name=nevra_dict['name'], 2895 arch=nevra_dict['arch'], epoch=nevra_dict['epoch'], 2896 ver=nevra_dict['version'], rel=nevra_dict['release']) 2897 2898 # naive handling of packages that are already in the transaction set 2899 for txmbr in tspkgs: 2900 self.tsInfo.remove(txmbr.pkgtup) 2901 2885 2902 for po in pkgs: 2886 2903 txmbr = self.tsInfo.addErase(po) 2887 2904 tx_return.append(txmbr)

