If a cached package didn't have an equivalent in the repo, pkg clean would end up trying to operate on a NULL struct pkg*. Detect this problem, and just add that package to the 'to delete' list.
modified pkg/clean.c
@@ -1,7 +1,7 @@
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -11,7 +11,7 @@
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -141,12 +141,12 @@ display_dellist(struct dl_head *dl, const char *cachedir)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -189,7 +189,7 @@ delete_dellist(struct dl_head *dl)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -288,29 +288,34 @@ exec_clean(int argc, char **argv)
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
|
|
| + | |
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -319,7 +324,7 @@ exec_clean(int argc, char **argv)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -348,7 +353,7 @@ exec_clean(int argc, char **argv)
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|