I had a quick conversation with skvidal and notting earlier about how we should be handling dependency checking on new updates. Right now, I’m supposed to be packing – I’m going to visit my wife’s family in Panama City, Florida. Ah, a weekend at the beach. Except I can’t concentrate now. Can’t.. stop.. thinking.. about.. depchecking! Argh! Must braindump!
# 'provides' = literal provides, filelist, name/ver # # get a list of oldpackage's provides & requires oldprov = get_provides(oldpkg) oldreq = get_requires(oldpkg) # get a list of newpackage's provides & requires newprov = get_provides(newpkg) newreq = get_requires(newpkg) # also check obsoletes! quoth skvidal: # if NewA obsoletes pkgB # then make sure nothing Requires pkgB but not provided by NewA for obspkg in newpkg.obsoletes: oldreq.append(get_requires(obspkg)) oldprov.append(get_provides(obspkg)) # Now that we've got the old and new lists, find the diffs dropped_provides = [p for p in oldprov if p not in newprov] new_requires = [r for r in newreq if r not in oldreq] # And find the affected packages willbreak =  for dropped_prov in dropped_provides: for pkg in whatrequires(dropped_prov): willbreak.append(pkg) missingdep =  for new_req in new_requires: if not whatprovides(new_req): missingdep.append(new_req)
Yeah, something like that. Okay, now I can go to the beach. Yay!