Ticket #13: yum-3.2.21-consider-ts.patch
| File yum-3.2.21-consider-ts.patch, 4.0 kB (added by bergolth, 2 years ago) |
|---|
-
yum/__init__.py
old new 2585 2585 self.tsInfo.addObsoleted(obsoletee, po) 2586 2586 tx_return.append(txmbr) 2587 2587 else: 2588 # naive handling of packages that are already in the transaction set 2589 if not self.allowedMultipleInstalls(po): 2590 for tsmember in self.tsInfo.matchNaevr(name = po.name): 2591 self.tsInfo.remove(tsmember.pkgtup) 2592 2588 2593 txmbr = self.tsInfo.addInstall(po) 2589 2594 tx_return.append(txmbr) 2590 2595 … … 2855 2860 2856 2861 tx_return = [] 2857 2862 pkgs = [] 2858 2863 tspkgs = [] 2859 2864 2860 2865 if po: 2861 2866 pkgs = [po] 2867 tspkgs = self.tsInfo.getMembers(po.pkgtup) 2862 2868 else: 2863 2869 if kwargs.has_key('pattern'): 2864 2870 if kwargs['pattern'][0] == '@': … … 2879 2885 self.logger.critical(_('No Match for argument: %s') % arg) 2880 2886 else: 2881 2887 pkgs.extend(depmatches) 2882 2888 2889 (e,m,u) = self.tsInfo.matchPackageNames([kwargs['pattern']]) 2890 tspkgs.extend(e) 2891 tspkgs.extend(m) 2883 2892 else: 2884 2893 nevra_dict = self._nevra_kwarg_parse(kwargs) 2885 2894 … … 2891 2900 if not kwargs.get('silence_warnings', False): 2892 2901 self.logger.warning(_("No package matched to remove")) 2893 2902 2903 tspkgs = self.tsInfo.matchNaevr(name=nevra_dict['name'], 2904 arch=nevra_dict['arch'], epoch=nevra_dict['epoch'], 2905 ver=nevra_dict['version'], rel=nevra_dict['release']) 2906 2907 # naive handling of packages that are already in the transaction set 2908 for txmbr in tspkgs: 2909 self.tsInfo.remove(txmbr.pkgtup) 2910 2894 2911 for po in pkgs: 2895 2912 txmbr = self.tsInfo.addErase(po) 2896 2913 tx_return.append(txmbr)

