summaryrefslogtreecommitdiffstats
path: root/src/pacman
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-02-16 23:57:25 +0100
committerAurelien Foret <aurelien@archlinux.org>2006-02-16 23:57:25 +0100
commit041e51f68d14b826e81ee4a1716623fc04b27c38 (patch)
tree2fc964946a7273261fe6b36e6a7b747b54e2f08e /src/pacman
parent1fadb8d250b97278aefbb46528d559eeff1eab77 (diff)
downloadpacman-041e51f68d14b826e81ee4a1716623fc04b27c38.tar.gz
pacman-041e51f68d14b826e81ee4a1716623fc04b27c38.tar.xz
sync with pacman 2.9.8
Diffstat (limited to 'src/pacman')
-rw-r--r--src/pacman/pacman.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 75ce1bca..82765342 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -193,6 +193,13 @@ int main(int argc, char *argv[])
cleanup(1);
}
+ if(list_count(pm_targets) == 0 && !(config->op == PM_OP_QUERY || (config->op == PM_OP_SYNC
+ && (config->op_s_sync || config->op_s_upgrade || config->op_s_clean || config->group
+ || config->op_q_list)))) {
+ ERR(NL, "no targets specified (use -h for help)\n");
+ cleanup(1);
+ }
+
/* start the requested operation */
switch(config->op) {
case PM_OP_ADD: ret = pacman_add(pm_targets); break;
@@ -205,9 +212,6 @@ int main(int argc, char *argv[])
ERR(NL, "no operation specified (use -h for help)\n");
ret = 1;
}
- if(ret != 0 && config->op_d_vertest == 0) {
- MSG(NL, "\n");
- }
cleanup(ret);
/* not reached */
@@ -218,6 +222,10 @@ void cleanup(int signum)
{
list_t *lp;
+ if(signum != 0 && config->op_d_vertest == 0) {
+ fprintf(stderr, "\n");
+ }
+
/* free alpm library resources */
if(alpm_release() == -1) {
ERR(NL, "%s\n", alpm_strerror(pm_errno));