| # Load the deb_info.txt file into a dictionary for further processing. |
| with open("deb_info.txt") as f: |
| deps[linfo[0]]["deb_file"] = linfo[1] |
| deps[linfo[0]]["deps"] = linfo[2].split(",") |
| # First extract all packages that don't have any dependencies |
| # at all with the current set of packages |
| #print(key, " has dependencies ", deps[key]["deps"]) |
| for dep in deps[key]["deps"]: |
| #print(key, " has no dependencies") |
| print(deps[pkg]["deb_file"]) |
| # The rest is for future layering of updates and |
| # Now scan iterate over the remaining items and |
| # add them to the sort_list if they have their |
| # dependencies satisfied in the sort list. |
| # Continue until the pkgList is empty |
| for dep in deps[pkg]["deps"]: |
| if dep not in sort_list and dep in pkgList: |
| # Now write the packages out in the sorted order |
| # this should ensure that dependent packages are |
| print(deps[pkg]["deb_file"]) |