The following commit has been merged in the master branch:
commit ed250955ff45778f083091d3bf78cf172c3a35ad
Author: Guillem Jover <[email protected]>
Date:   Sat Feb 26 17:45:41 2011 +0100

    dpkg: Sync and print the correct info database directory
    
    On unpack sync the info database directory instead of the temporary
    control information directory, and print the correct pathname on
    error instead of the last file acted on that directory.

diff --git a/debian/changelog b/debian/changelog
index 43acc26..54fa91b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,6 +36,9 @@ dpkg (1.16.0) UNRELEASED; urgency=low
     Thanks to Robert Millan. Closes: #612203
   * On install for Ubuntu adjust the i386 GNU cpu name in cputable.
     Thanks to Colin Watson <[email protected]>. Closes: #611741
+  * Sync the info database directory on unpack instead of the temporary
+    control information directory, and print the correct pathname on error
+    instead of the last file acted on that directory.
 
   [ Raphaƫl Hertzog ]
   * Fail properly when debian/source/format is empty. Closes: #600854
diff --git a/src/processarc.c b/src/processarc.c
index 3892ac7..3cfb256 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -978,12 +978,10 @@ void process_archive(const char *filename) {
     debug(dbg_scripts,"process_archive tmp.ci script/file `%s' installed as 
`%s'",
           cidir, newinfofilename);
   }
-
-  /* Sync the info database directory. */
-  dir_sync(dsd, cidir);
-
   pop_cleanup(ehflag_normaltidy); /* closedir */
 
+  dir_sync_path(pkgadmindir());
+
   /*
    * Update the status database.
    *
@@ -1176,12 +1174,10 @@ void process_archive(const char *filename) {
         ohshite(_("unable to delete disappearing control info file 
`%.250s'"),fnvb.buf);
       debug(dbg_scripts, "process_archive info unlinked %s",fnvb.buf);
     }
-
-    /* Sync the info database directory. */
-    dir_sync(dsd, fnvb.buf);
-
     pop_cleanup(ehflag_normaltidy); /* closedir */
 
+    dir_sync_path(pkgadmindir());
+
     otherpkg->status= stat_notinstalled;
     otherpkg->want = want_unknown;
     otherpkg->eflag = eflag_ok;
diff --git a/src/remove.c b/src/remove.c
index fcf1fe6..9722367 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -303,12 +303,10 @@ removal_bulk_remove_files(struct pkginfo *pkg)
         ohshite(_("unable to delete control info file `%.250s'"),fnvb.buf);
       debug(dbg_scripts, "removal_bulk info unlinked %s",fnvb.buf);
     }
-
-    /* Sync the info database directory. */
-    dir_sync(dsd, fnvb.buf);
-
     pop_cleanup(ehflag_normaltidy); /* closedir */
 
+    dir_sync_path(pkgadmindir());
+
     pkg->status= stat_configfiles;
     pkg->installed.essential = false;
     modstatdb_note(pkg);

-- 
dpkg's main repository


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

Reply via email to