mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-15 22:05:02 -05:00
Add -Qee option for the original behavior of -Qe
-Qee now lists "orphans" the way pacman used to - that is, -Qe lists packages required by nothing that were installed as a dependency, but -Qee lists all packages not required by something else. Also, I snuck in a compile fix for my real_path cleanup earlier, heh Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
parent
ebad199614
commit
51225b3263
@ -386,7 +386,7 @@ static int parseargs(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
case 'd': config->flags |= PM_TRANS_FLAG_NODEPS; break;
|
case 'd': config->flags |= PM_TRANS_FLAG_NODEPS; break;
|
||||||
case 'e':
|
case 'e':
|
||||||
config->op_q_orphans = 1;
|
config->op_q_orphans++;
|
||||||
config->flags |= PM_TRANS_FLAG_DEPENDSONLY;
|
config->flags |= PM_TRANS_FLAG_DEPENDSONLY;
|
||||||
break;
|
break;
|
||||||
case 'f': config->flags |= PM_TRANS_FLAG_FORCE; break;
|
case 'f': config->flags |= PM_TRANS_FLAG_FORCE; break;
|
||||||
|
@ -51,7 +51,7 @@ static char *resolve_path(const char* file)
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!realpath(copy, str)) {
|
if(!realpath(file, str)) {
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,7 +289,8 @@ int pacman_query(alpm_list_t *targets)
|
|||||||
dump_pkg_files(info);
|
dump_pkg_files(info);
|
||||||
} else if(config->op_q_orphans) {
|
} else if(config->op_q_orphans) {
|
||||||
if(alpm_pkg_get_requiredby(info) == NULL
|
if(alpm_pkg_get_requiredby(info) == NULL
|
||||||
&& (long)alpm_pkg_get_reason(info) == PM_PKG_REASON_DEPEND) {
|
&& ((long)alpm_pkg_get_reason(info) == PM_PKG_REASON_DEPEND
|
||||||
|
|| config->op_q_orphans > 1)) {
|
||||||
printf("%s %s\n", pkgname, pkgver);
|
printf("%s %s\n", pkgname, pkgver);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user