Commits

Rodrigo Bistolfi committed 027d627

Fix missing packages in packages.py

Comments (0)

Files changed (1)

vinstall/controller/packages.py

             for packagename in f:
                 if packagename in excluded:
                     continue
-                #XXX do not use glob this way
-                fname = "%s/*/%s*t?z" % (pkgbasedir, packagename.strip())
+                #XXX do not use glob this way, god forgive us
+                packagename = packagename.strip()
+                fname = "%s/*/%s*t?z" % (pkgbasedir, packagename)
                 fullpath = glob.glob(fname)
                 if fullpath:
-                    yield fullpath[0]
+                    for p in fullpath:
+                        f = p.rsplit("/", 1)[1]
+                        name, _, _, _ = f.rsplit("-", 3)
+                        print name, packagename
+                        if name == packagename:
+                            yield p
                 else:
                     print "WARNING: missing package", packagename