[Yum-devel] [PATCH] Remove rpmdb version of contains(), the PackageSackBase one is identical
Seth Vidal
skvidal at fedoraproject.org
Thu Oct 15 15:31:29 UTC 2009
On Thu, 15 Oct 2009, James Antill wrote:
> ---
> yum/rpmsack.py | 16 ----------------
> 1 files changed, 0 insertions(+), 16 deletions(-)
>
> diff --git a/yum/rpmsack.py b/yum/rpmsack.py
> index 93e14ec..1c7e8f1 100644
> --- a/yum/rpmsack.py
> +++ b/yum/rpmsack.py
> @@ -416,22 +416,6 @@ class RPMDBPackageSack(PackageSackBase):
> def searchNevra(self, name=None, epoch=None, ver=None, rel=None, arch=None):
> return self._search(name, epoch, ver, rel, arch)
>
> - def contains(self, name=None, arch=None, epoch=None, ver=None, rel=None, po=None):
> - """return if there are any packages in the sack that match the given NAEVR
> - or the NAEVR of the given po"""
> - if po:
> - name = po.name
> - arch = po.arch
> - epoch = po.epoch
> - ver = po.version
> - rel = po.release
> -
> - if name and arch and epoch and ver and rel: # cheater lookup
> - if (name, arch, epoch, ver, rel) in self._tup2pkg:
> - return True
> -
> - return bool(self.searchNevra(name=name, arch=arch, epoch=epoch, ver=ver, rel=rel))
> -
> def excludeArchs(self, archlist):
> pass
>
ACK
and I can't figure why I patched that in there to begin with.
there's no comment that relates to it.
-sv
More information about the Yum-devel
mailing list