Package: apt
Version: 0.5.14
Severity: normal
Followup-For: Bug #180322

I just wrote a patch to allow "apt-get reinstall <package ...>". The
patch will leave that feature in the moo-category.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux schlafzimmer 2.4.21-3-k7 #1 Sun Jul 20 19:23:36 EST 2003 i686
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (ignored: LC_ALL set to [EMAIL 
PROTECTED])

Versions of packages apt depends on:
ii  libc6                         2.3.2-8    GNU C Library: Shared libraries an
ii  libgcc1                       1:3.3.2-1  GCC support library
ii  libstdc++5                    1:3.3.2-1  The GNU Standard C++ Library v3

-- no debconf information

diff -urN apt-0.5.14/cmdline/apt-get.cc apt-0.5.14.new/cmdline/apt-get.cc
--- apt-0.5.14/cmdline/apt-get.cc       2003-09-24 06:00:25.000000000 +0200
+++ apt-0.5.14.new/cmdline/apt-get.cc   2003-11-01 13:08:16.000000000 +0100
@@ -1609,6 +1609,17 @@
    return InstallPackages(Cache,false);   
 }
                                                                        /*}}}*/
+
+// DoReinstall - Reinstall packages from the command line               /*{{{*/
+// ---------------------------------------------------------------------
+/* Install named packages */
+bool DoReinstall(CommandLine &CmdL)
+{
+   _config->Set("APT::Get::Reinstall", true);
+   return DoInstall(CmdL);
+}
+                                                                       /*}}}*/
+
 // DoDistUpgrade - Automatic smart upgrader                            /*{{{*/
 // ---------------------------------------------------------------------
 /* Intelligent upgrader that will install and remove packages at will */
@@ -2422,6 +2433,7 @@
    CommandLine::Dispatch Cmds[] = {{"update",&DoUpdate},
                                    {"upgrade",&DoUpgrade},
                                    {"install",&DoInstall},
+                                   {"reinstall",&DoReinstall},
                                    {"remove",&DoInstall},
                                    {"dist-upgrade",&DoDistUpgrade},
                                    {"dselect-upgrade",&DoDSelectUpgrade},

Reply via email to