Blob Blame History Raw
From 527c0cfad2d9b2f9ce6fc4ce829d8ee06b576544 Mon Sep 17 00:00:00 2001
From: Jan Silhan <jsilhan@redhat.com>
Date: Sun, 19 Jun 2016 23:09:18 +0200
Subject: [PATCH 2/2] nevra: added _has_just_name helper method

Closes: #189
Approved by: j-mracek
---
 src/python/__init__.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/python/__init__.py b/src/python/__init__.py
index 32ac2a7..d92edbc 100644
--- a/src/python/__init__.py
+++ b/src/python/__init__.py
@@ -169,6 +169,10 @@ class NEVRA(_hawkey.NEVRA):
         _hawkey_query = super(NEVRA, self).to_query(sack)
         return Query(query=_hawkey_query)
 
+    def _has_just_name(self):
+        return self.name and not self.epoch and not self.version and \
+            not self.release and not self.arch
+
 
 class Goal(_hawkey.Goal):
     _reserved_kw = set(['package', 'select'])
-- 
2.11.0