|
Lines 79-84
Link Here
|
| 79 |
char USE[BUFSIZ]; |
79 |
char USE[BUFSIZ]; |
| 80 |
} Pkg; |
80 |
} Pkg; |
| 81 |
|
81 |
|
|
|
82 |
struct llist_char_t { |
| 83 |
char *data; |
| 84 |
struct llist_char_t *next; |
| 85 |
}; |
| 86 |
|
| 87 |
typedef struct llist_char_t llist_char; |
| 88 |
|
| 82 |
int interactive_rename(const char *, const char *, struct pkg_t *); |
89 |
int interactive_rename(const char *, const char *, struct pkg_t *); |
| 83 |
void fetch(const char *, const char *); |
90 |
void fetch(const char *, const char *); |
| 84 |
void qmerge_initialize(const char *); |
91 |
void qmerge_initialize(const char *); |
|
Lines 874-879
Link Here
|
| 874 |
FILE *fp; |
881 |
FILE *fp; |
| 875 |
int argc; |
882 |
int argc; |
| 876 |
char **argv; |
883 |
char **argv; |
|
|
884 |
llist_char *dirs = NULL; |
| 877 |
|
885 |
|
| 878 |
if ((strchr(pkgname, ' ') != NULL) || (strchr(cat, ' ') != NULL)) { |
886 |
if ((strchr(pkgname, ' ') != NULL) || (strchr(cat, ' ') != NULL)) { |
| 879 |
#if 0 |
887 |
#if 0 |
|
Lines 916-922
Link Here
|
| 916 |
/* Should we remove in order symlinks,objects,dirs ? */ |
924 |
/* Should we remove in order symlinks,objects,dirs ? */ |
| 917 |
switch (e->type) { |
925 |
switch (e->type) { |
| 918 |
case CONTENTS_DIR: |
926 |
case CONTENTS_DIR: |
| 919 |
if (!protected) { rmdir(dst); } |
927 |
if (!protected) { |
|
|
928 |
/* since the dir contains files, we remove it later */ |
| 929 |
llist_char *tmp = xmalloc(sizeof(llist_char)); |
| 930 |
tmp->data = xstrdup(dst); |
| 931 |
tmp->next = dirs; |
| 932 |
dirs = tmp; |
| 933 |
} |
| 920 |
qprintf("%s %s%s%s/\n", zing, DKBLUE, dst, NORM); |
934 |
qprintf("%s %s%s%s/\n", zing, DKBLUE, dst, NORM); |
| 921 |
break; |
935 |
break; |
| 922 |
case CONTENTS_OBJ: |
936 |
case CONTENTS_OBJ: |
|
Lines 958-963
Link Here
|
| 958 |
|
972 |
|
| 959 |
fclose(fp); |
973 |
fclose(fp); |
| 960 |
|
974 |
|
|
|
975 |
/* remove all dirs in reverse order */ |
| 976 |
while (dirs != NULL) { |
| 977 |
llist_char *tmp = dirs; |
| 978 |
dirs = dirs->next; |
| 979 |
rmdir(tmp->data); |
| 980 |
free(tmp->data); |
| 981 |
free(tmp); |
| 982 |
} |
| 983 |
|
| 961 |
freeargv(argc, argv); |
984 |
freeargv(argc, argv); |
| 962 |
|
985 |
|
| 963 |
if (!pretend) { |
986 |
if (!pretend) { |