Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 108012 Details for
Bug 163576
app-portage/portage-utils: qmerge -U will never remove directories
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
qmerge_unmerge_dirs.patch
qmerge_unmerge_dirs.patch (text/plain), 1.45 KB, created by
Natanael Copa
on 2007-01-24 11:44:34 UTC
(
hide
)
Description:
qmerge_unmerge_dirs.patch
Filename:
MIME Type:
Creator:
Natanael Copa
Created:
2007-01-24 11:44:34 UTC
Size:
1.45 KB
patch
obsolete
>Index: qmerge.c >=================================================================== >RCS file: /var/cvsroot/gentoo-projects/portage-utils/qmerge.c,v >retrieving revision 1.57 >diff -u -r1.57 qmerge.c >--- qmerge.c 23 Jan 2007 15:53:54 -0000 1.57 >+++ qmerge.c 24 Jan 2007 11:42:09 -0000 >@@ -79,6 +79,13 @@ > char USE[BUFSIZ]; > } Pkg; > >+struct llist_char_t { >+ char *data; >+ struct llist_char_t *next; >+}; >+ >+typedef struct llist_char_t llist_char; >+ > int interactive_rename(const char *, const char *, struct pkg_t *); > void fetch(const char *, const char *); > void qmerge_initialize(const char *); >@@ -874,6 +881,7 @@ > FILE *fp; > int argc; > char **argv; >+ llist_char *dirs = NULL; > > if ((strchr(pkgname, ' ') != NULL) || (strchr(cat, ' ') != NULL)) { > #if 0 >@@ -916,7 +924,13 @@ > /* Should we remove in order symlinks,objects,dirs ? */ > switch (e->type) { > case CONTENTS_DIR: >- if (!protected) { rmdir(dst); } >+ if (!protected) { >+ /* since the dir contains files, we remove it later */ >+ llist_char *tmp = xmalloc(sizeof(llist_char)); >+ tmp->data = xstrdup(dst); >+ tmp->next = dirs; >+ dirs = tmp; >+ } > qprintf("%s %s%s%s/\n", zing, DKBLUE, dst, NORM); > break; > case CONTENTS_OBJ: >@@ -958,6 +972,15 @@ > > fclose(fp); > >+ /* remove all dirs in reverse order */ >+ while (dirs != NULL) { >+ llist_char *tmp = dirs; >+ dirs = dirs->next; >+ rmdir(tmp->data); >+ free(tmp->data); >+ free(tmp); >+ } >+ > freeargv(argc, argv); > > if (!pretend) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 163576
: 108012