[vox-tech] reinstalling debian package - redux

Peter Jay Salzman vox-tech@lists.lugod.org
Sun, 4 May 2003 13:46:44 -0700


--xHFwDpU9dbj6ez1V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

mike had suggested that i pass all the packages to be reinstalled to
apt-get so that apt-get can work out dependencies in one pass.

so i modified my reinstall script:



### cut here ###
#!/usr/bin/perl -w
use strict;
use Term::ANSIColor;

# 0 =3D "do it".   1 =3D "dry run".
my $dryrun  =3D 1;

# Stuff that's not installable but i'd like to keep.
my @ignore =3D qw/freefont xv csound ical ipxping gtk-gnutella kingpin
infocom pine libgimpprint1 libparted1.6-0 nas-lib openoffice.org
openoffice.org-bin openoffice.org-debian-files openoffice.org-l10n-en
opera-static xv-doc winex3 xpenguins-themes xlib6g mp3blaster xfonts-abi/;


my @debs    =3D `dpkg --get-selections | sed 's/[ \t].*//g'`;
my $options =3D 'install --reinstall --assume-yes';
my ($RED, $YEL, $RES) =3D (color('red'), color('yellow'), color('reset'));

system("clear");
if ($dryrun) {
	$options .=3D " --dry-run";
	print "\n${YEL}This is a dry run.${RES}\n";
} else {
	print "${RED}This is the real thing.  Press enter to continue.${RES}\n";
	<>;
}

foreach (@debs) { grep chomp, @debs; }
print "\n${YEL}I found $#debs selections${RES}\n\n";

# Handle ignored items
#
for (my $i=3D0; $i<=3D$#debs; ++$i) {
	for (my $j=3D0; $j<=3D$#ignore; ++$j) {
		if ($debs[$i] eq $ignore[$j]) {
			print "${YEL}Splicing package: <$debs[$i]>${RES}\n";
			splice @debs, $i, 1;
		}
	}
}
print "\n\n";

#print("apt-get $options @debs\n");
system("apt-get $options @debs");
### cut here ###


but now i'm facing two real big problems.  Here's the output:

  The following extra packages will be installed:

  emacs20 emacsen-common fortunes-min gnome-games-locale kdebase-libs
  kdelibs3 kdelibs3-bin libapache-mod-perl libgtop1 libnkf-ruby
  libnspr4 libobgnome0 libpgtcl libqt2 lincity mozilla-browser octave2.0
  perl-suid powertweak-extra powertweak-gtk powertweakd ppp tcllib=20

  The following NEW packages will be installed:

  apache-perl cvs-buildpackage emacs20 emacsen-common ethereal
  ethereal-common exult fingerd fortune-mod fortunes-min gettext-el
  gnapster gnome-admin gnome-games-locale gnome-gnibbles gnome-gnobots2
  gnome-gnometris gnome-gnotravex gnome-media gnome-same-gnome gnome-utils
  htmldoc hyperlatex kdebase-libs kdelibs3 kdelibs3-bin koffice-libs
  libapache-mod-perl libgtop1 libkonq3 libmysqlclient10 libnkf-ruby
  libnspr4 libobgnome0 libpgtcl libqt2 libqutil1 libruby libsane lincity
  lincity-x linuxlogo locales manedit mii-diag mozilla-browser
  mozilla-mailnews mysql-common nictools-pci nullidentd octave octave2.0
  perl-5.005-suid perl-5.6-suid perl-suid pgaccess postgresql-client
  powertweak powertweak-extra powertweak-gtk powertweakd ppp rsh-client
  rsh-server talkd tcllib wvdial xcdroast xtris yadex=20

  0 packages upgraded, 70 newly installed, 891 reinstalled, 0 to remove
  and 0  not upgraded.
  Inst bash (2.05b-7 Debian:testing)
  Conf bash (2.05b-7 Debian:testing)
  Inst bsdutils (1:2.11z-1 Debian:testing)
  Conf bsdutils (1:2.11z-1 Debian:testing)
  Inst coreutils (5.0-1 Debian:testing)
  Conf coreutils (5.0-1 Debian:testing)
  E: Internal Error, Couldn't configure a pre-depend


problem one is that i *really* don't want the majority of these packages
to be installed.  i have no use most of them, and don't want them.

problem two is is the "internal error".  at least i can uninstall the
new packages that i don't want.

i'm not sure what to do about apt-get's internal error.

help!

pete

--=20
GPG Instructions: http://www.dirac.org/linux/gpg
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D

--xHFwDpU9dbj6ez1V
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+tXw0o7kZRWfqlR0RAgunAJ9UcldfCV40kVdxebFS/MZV/e9D9gCgh8rM
th7Rwx6ueUJ4BnH/SF/MvX8=
=XJUP
-----END PGP SIGNATURE-----

--xHFwDpU9dbj6ez1V--