Marvin Renich wrote: > Matej: Can you modify your script to only remove not-installed .debs, > leaving .debs for removed-but-not-purged and not-configured packages > alone? Accept my thanks in advance if you feel like doing it.
I don't know how to get not-configured packages from aptitude (why not just
run dpkg --configure -a before running midclean -- I guess that you really
shouldn't do any cleaning operations when you do not have system in 100%
shape anyway), but removed-but-not-purged packages are preserved in this
version (which is also X/MIT licensed).
> Also, I'm not fluent in python, but it looks like the line
> if not(item[0][0] in currNames) and not(item[0][1] in currVersions):
> allows item[0][1] to match a version in currVersions for a different
> package. Is that correct? Also, the logic should probably be
> not(a and b) rather than not(a) and not(b), where b is item[0][1] ==
> corresponding-element-of-currVersions.
I have now used different method of finding differences, so this is not
relevant anymore. And yes, that if was probably wrong.
> I also noticed that the aptitude search truncated the version number,
> which could have detrimental effects.
Thanks for noticing that -- it should be OK now ('#' character in formatting
field).
Matej
--
Matej Cepl, http://www.ceplovi.cz/matej/blog/
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
God is not worried about my financial situation.
midclean.py
Description: application/python

