This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

commit ca2eb8ec82fd6450ad283279b8ad16c6b13b3433
Author: Guillem Jover <guil...@debian.org>
Date:   Thu Feb 19 23:57:19 2015 +0100

    libdpkg: Rename ensure_pathname_nonexisting() to path_remove_tree()
---
 src/archives.c | 8 ++++----
 src/help.c     | 9 +++++----
 src/main.h     | 2 +-
 src/remove.c   | 4 ++--
 src/unpack.c   | 4 ++--
 5 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/archives.c b/src/archives.c
index c6438f1..d3d148c 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -225,7 +225,7 @@ md5hash_prev_conffile(struct pkginfo *pkg, char *oldhash, 
const char *oldname,
 }
 
 void cu_pathname(int argc, void **argv) {
-  ensure_pathname_nonexisting((char*)(argv[0]));
+  path_remove_tree((char*)(argv[0]));
 }
 
 int tarfileread(void *ud, char *buf, int len) {
@@ -974,8 +974,8 @@ tarobject(void *ctx, struct tar_entry *ti)
   } else {
     /* Now, at this stage we want to make sure neither of .dpkg-new and
      * .dpkg-tmp are hanging around. */
-    ensure_pathname_nonexisting(fnamenewvb.buf);
-    ensure_pathname_nonexisting(fnametmpvb.buf);
+    path_remove_tree(fnamenewvb.buf);
+    path_remove_tree(fnametmpvb.buf);
 
     /* Now we start to do things that we need to be able to undo
      * if something goes wrong. Watch out for the CLEANUP comments to
@@ -1434,7 +1434,7 @@ void cu_cidir(int argc, void **argv) {
   char *cidir= (char*)argv[0];
   char *cidirrest= (char*)argv[1];
   cidirrest[-1] = '\0';
-  ensure_pathname_nonexisting(cidir);
+  path_remove_tree(cidir);
 }
 
 void cu_fileslist(int argc, void **argv) {
diff --git a/src/help.c b/src/help.c
index 332c5c6..7a3a5a7 100644
--- a/src/help.c
+++ b/src/help.c
@@ -366,14 +366,16 @@ secure_unlink_statted(const char *pathname, const struct 
stat *stab)
   return 0;
 }
 
-void ensure_pathname_nonexisting(const char *pathname) {
+void
+path_remove_tree(const char *pathname)
+{
   pid_t pid;
   const char *u;
 
   u = path_skip_slash_dotslash(pathname);
   assert(*u);
 
-  debug(dbg_eachfile, "ensure_pathname_nonexisting '%s'", pathname);
+  debug(dbg_eachfile, "%s '%s'", __func__, pathname);
   if (!rmdir(pathname))
     return; /* Deleted it OK, it was a directory. */
   if (errno == ENOENT || errno == ELOOP) return;
@@ -392,8 +394,7 @@ void ensure_pathname_nonexisting(const char *pathname) {
     execlp(RM, "rm", "-rf", "--", pathname, NULL);
     ohshite(_("unable to execute %s (%s)"), _("rm command for cleanup"), RM);
   }
-  debug(dbg_eachfile, "ensure_pathname_nonexisting running rm -rf '%s'",
-        pathname);
+  debug(dbg_eachfile, "%s running rm -rf '%s'", __func__, pathname);
   subproc_reap(pid, _("rm command for cleanup"), 0);
 }
 
diff --git a/src/main.h b/src/main.h
index 101649c..b136355 100644
--- a/src/main.h
+++ b/src/main.h
@@ -242,7 +242,7 @@ bool force_depends(struct deppossi *possi);
 bool force_conflicts(struct deppossi *possi);
 void conffile_mark_obsolete(struct pkginfo *pkg, struct filenamenode 
*namenode);
 void oldconffsetflags(const struct conffile *searchconff);
-void ensure_pathname_nonexisting(const char *pathname);
+void path_remove_tree(const char *pathname);
 int secure_unlink(const char *pathname);
 int secure_unlink_statted(const char *pathname, const struct stat *stab);
 void checkpath(void);
diff --git a/src/remove.c b/src/remove.c
index 4b32ab8..285e8b1 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -318,13 +318,13 @@ removal_bulk_remove_files(struct pkginfo *pkg)
       varbuf_add_str(&fnvb, DPKGTEMPEXT);
       varbuf_end_str(&fnvb);
       debug(dbg_eachfiledetail, "removal_bulk cleaning temp '%s'", fnvb.buf);
-      ensure_pathname_nonexisting(fnvb.buf);
+      path_remove_tree(fnvb.buf);
 
       varbuf_trunc(&fnvb, before);
       varbuf_add_str(&fnvb, DPKGNEWEXT);
       varbuf_end_str(&fnvb);
       debug(dbg_eachfiledetail, "removal_bulk cleaning new '%s'", fnvb.buf);
-      ensure_pathname_nonexisting(fnvb.buf);
+      path_remove_tree(fnvb.buf);
 
       varbuf_trunc(&fnvb, before);
       varbuf_end_str(&fnvb);
diff --git a/src/unpack.c b/src/unpack.c
index 5328907..0e9acb1 100644
--- a/src/unpack.c
+++ b/src/unpack.c
@@ -189,7 +189,7 @@ get_control_dir(char *cidir)
     strcat(cidir, "/" CONTROLDIRTMP);
 
     /* Make sure the control information directory is empty. */
-    ensure_pathname_nonexisting(cidir);
+    path_remove_tree(cidir);
   }
 
   strcat(cidir, "/");
@@ -1457,7 +1457,7 @@ void process_archive(const char *filename) {
     varbuf_add_str(&fnametmpvb, usenode->name);
     varbuf_add_str(&fnametmpvb, DPKGTEMPEXT);
     varbuf_end_str(&fnametmpvb);
-    ensure_pathname_nonexisting(fnametmpvb.buf);
+    path_remove_tree(fnametmpvb.buf);
   }
 
   /* OK, we're now fully done with the main package.

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/dpkg/dpkg.git


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to