Package: wajig
Version: 2.0.38
Followup-For: Bug #477921

I attach a script that does not suffer from the problem I described
before (no longer gives an error if there are no removed packages to
purge).

What would you like next? Python code?

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages wajig depends on:
ii  apt                      0.7.20.2+lenny1 Advanced front-end for dpkg
ii  dselect                  1.14.25         Debian package management front-en
ii  python                   2.5.2-3         An interactive high-level object-o
ii  python-apt               0.7.7.1+nmu1    Python interface to libapt-pkg
ii  python-central           0.6.8           register and build utility for Pyt

wajig recommends no packages.

Versions of packages wajig suggests:
pn  alien                   <none>           (no description available)
pn  apt-listbugs            <none>           (no description available)
pn  apt-move                <none>           (no description available)
ii  apt-show-versions       0.15             lists available package versions w
ii  debconf                 1.5.24           Debian configuration management sy
ii  deborphan               1.7.27           program that can find unused packa
pn  dpkg-repack             <none>           (no description available)
ii  fakeroot                1.11             Gives a fake root environment
ii  fping                   2.4b2-to-ipv6-15 sends ICMP ECHO_REQUEST packets to
pn  gkdebconf               <none>           (no description available)
pn  gnome-tasksel           <none>           (no description available)
pn  gnome-terminal          <none>           (no description available)
ii  locales                 2.7-18           GNU C Library: National Language (
pn  lynx                    <none>           (no description available)
pn  python-glade2           <none>           (no description available)
pn  python-gnome2           <none>           (no description available)
pn  python-gtk2             <none>           (no description available)
ii  reportbug               3.48             reports bugs in the Debian distrib
ii  sudo                    1.6.9p17-2       Provide limited super user privile
pn  vrms                    <none>           (no description available)
ii  wget                    1.11.4-2         retrieves files from the web

-- no debconf information
#! /bin/sh
# Purge removed packages
packages=`dpkg-query -W --showformat='${Package}\t${Status}\n' | grep "deinstall ok config-files" | cut -f 1`
if [ "x$packages" != x ]; then
    echo foo
    xargs wajig purge $packages
fi

Reply via email to