#!/usr/bin/python
+
+import fnmatch
import logging
import re
### methods ###
def _does_provide_file(self, requires):
- return requires.requires in self.filelist
+ for file in self.filelist:
+ if fnmatch.fnmatch(file, requires.requires):
+ return True
+
+ return False
def does_provide(self, requires):
if not isinstance(requires, pakfire.depsolve.Requires):
#!/usr/bin/python
+import fnmatch
import json
import logging
import lzma
def get_by_file(self, filename):
for pkg in self.packages:
- if filename in pkg.filelist:
+ match = False
+ for pkg_filename in pkg.filelist:
+ if fnmatch.fnmatch(pkg_filename, filename):
+ match = True
+ break
+
+ if match:
yield pkg
def get_by_id(self, id):
def get_by_file(self, filename):
c = self.db.cursor()
- c.execute("SELECT pkg FROM files WHERE name = ?", (filename,))
+ c.execute("SELECT pkg FROM files WHERE name GLOB ?", (filename,))
for pkg in c:
yield self.get_by_id(pkg["pkg"])
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-03-04 13:23+0100\n"
+"POT-Creation-Date: 2011-03-04 14:33+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Package"
msgstr ""
-#: ../pakfire/depsolve.py:220 ../pakfire/packages/base.py:55
+#: ../pakfire/depsolve.py:220 ../pakfire/packages/base.py:57
msgid "Arch"
msgstr ""
-#: ../pakfire/depsolve.py:220 ../pakfire/packages/base.py:56
+#: ../pakfire/depsolve.py:220 ../pakfire/packages/base.py:58
msgid "Version"
msgstr ""
msgid "Repository"
msgstr ""
-#: ../pakfire/depsolve.py:220 ../pakfire/packages/base.py:58
+#: ../pakfire/depsolve.py:220 ../pakfire/packages/base.py:60
msgid "Size"
msgstr ""
msgid "Is this okay?"
msgstr ""
-#: ../pakfire/packages/base.py:54
+#: ../pakfire/packages/base.py:56
msgid "Name"
msgstr ""
-#: ../pakfire/packages/base.py:57
+#: ../pakfire/packages/base.py:59
msgid "Release"
msgstr ""
-#: ../pakfire/packages/base.py:59
+#: ../pakfire/packages/base.py:61
msgid "Repo"
msgstr ""
-#: ../pakfire/packages/base.py:60
+#: ../pakfire/packages/base.py:62
msgid "Summary"
msgstr ""
-#: ../pakfire/packages/base.py:61
+#: ../pakfire/packages/base.py:63
msgid "URL"
msgstr ""
-#: ../pakfire/packages/base.py:62
+#: ../pakfire/packages/base.py:64
msgid "License"
msgstr ""
-#: ../pakfire/packages/base.py:65
+#: ../pakfire/packages/base.py:67
msgid "Description"
msgstr ""
-#: ../pakfire/packages/base.py:71
+#: ../pakfire/packages/base.py:73
msgid "UUID"
msgstr ""
-#: ../pakfire/packages/base.py:72
+#: ../pakfire/packages/base.py:74
msgid "Build ID"
msgstr ""
-#: ../pakfire/packages/base.py:73
+#: ../pakfire/packages/base.py:75
msgid "Build date"
msgstr ""
-#: ../pakfire/packages/base.py:74
+#: ../pakfire/packages/base.py:76
msgid "Build host"
msgstr ""
msgid "Extracting:"
msgstr ""
-#: ../pakfire/repository/index.py:314
+#: ../pakfire/repository/index.py:321
#, python-format
msgid "%s: package database"
msgstr ""