Depchecking for updates

I had a quick conversation with [info]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:

# 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):

missingdep = []
for new_req in new_requires:
    if not whatprovides(new_req):

Yeah, something like that. Okay, now I can go to the beach. Yay!


One thought on “Depchecking for updates

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s