The following commit has been merged in the master branch:
commit e3ef990f83a74130246b439b2e257e33c017758a
Author: Guillem Jover <[email protected]>
Date:   Sun Aug 9 14:33:38 2009 +0200

    dpkg: On file conflicts print the version of the conflicted package
    
    Makes it easier to report bugs, without needed to additionally check
    the installed version of the conflicted package.
    
    Closes: #540019

diff --git a/debian/changelog b/debian/changelog
index 0e45716..36b8110 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -26,6 +26,8 @@ dpkg (1.15.4) UNRELEASED; urgency=low
   * Add uClibc Linux support to ostable and triplettable. Closes: #455501
   * Add uClinux support to ostable and triplettable.
     Thanks to Simon Richter <[email protected]>.
+  * When aborting due to file conflicts print the version of the conflicted
+    package. Closes: #540019
 
   [ Raphael Hertzog ]
   * Replace install-info by a wrapper around GNU's install-info. The wrapper
diff --git a/src/archives.c b/src/archives.c
index 3c3114d..2a5765b 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -594,9 +594,12 @@ int tarobject(struct TarInfo *ti) {
          keepexisting = 1;
         } else {
           if (!statr && S_ISDIR(stab.st_mode)) {
-            forcibleerr(fc_overwritedir, _("trying to overwrite directory 
`%.250s' "
-                        "in package %.250s with nondirectory"),
-                        nifd->namenode->name,otherpkg->name);
+            forcibleerr(fc_overwritedir,
+                        _("trying to overwrite directory '%.250s' "
+                          "in package %.250s %.250s with nondirectory"),
+                        nifd->namenode->name, otherpkg->name,
+                        versiondescribe(&otherpkg->installed.version,
+                                        vdew_always));
           } else {
             /* WTA: At this point we are replacing something without a 
Replaces.
             * if the new object is a directory and the previous object does not
@@ -604,8 +607,11 @@ int tarobject(struct TarInfo *ti) {
             */
             if (! (statr && ti->Type==Directory))
               forcibleerr(fc_overwrite,
-                        _("trying to overwrite `%.250s', which is also in 
package %.250s"),
-                        nifd->namenode->name,otherpkg->name);
+                          _("trying to overwrite '%.250s', "
+                            "which is also in package %.250s %.250s"),
+                          nifd->namenode->name, otherpkg->name,
+                          versiondescribe(&otherpkg->installed.version,
+                                          vdew_always));
           }
         }
       }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to