Re: which packages are older/missing?
Andreas Barth <aba@not.so.argh.org> writes:
> Hi,
>
> I have two package lists, and want to find out which packages are
> missing in one of the lists or are older than in the other list. Of
> course, it's easy to write such a program but if somebody has already
> done that, I'd try to safe the effort. Any hints for me?
for i in 1 2; do
grep-dctrl "" -s Package,Version -n <Packages.$i \
| paste -s -d " \n" | sort -u >Pkgs.$i
done
By package:
Removed: cat Pkgs.1 Pkgs.2 Pkgs.2 | sort | uniq -c -W 1 | grep " 1"
Added: cat Pkgs.1 Pkgs.2 Pkgs.2 | sort | uniq -c -W 1 | grep " 2"
By package+version:
Removed: cat Pkgs.1 Pkgs.2 Pkgs.2 | sort | uniq -c | grep " 1"
Added: cat Pkgs.1 Pkgs.2 Pkgs.2 | sort | uniq -c | grep " 2"
> (or as alternative, what's the best way to read a package list into
> python?)
The python-apt or apt-python module.
> Cheers,
> Andi
MfG
Goswin
Reply to: