summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/util.c4
-rw-r--r--scripts/makepkg.sh.in10
-rw-r--r--scripts/repo-add.sh.in2
-rw-r--r--src/pacman/sync.c26
4 files changed, 25 insertions, 17 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index e56efb17..082c095b 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -509,7 +509,7 @@ int _alpm_run_chroot(const char *root, const char *cmd)
umask(0022);
pipe = popen(cmd, "r");
if(!pipe) {
- _alpm_log(PM_LOG_ERROR, _("call to popen failed (%s)"),
+ _alpm_log(PM_LOG_ERROR, _("call to popen failed (%s)\n"),
strerror(errno));
exit(1);
}
@@ -562,7 +562,7 @@ int _alpm_ldconfig(const char *root)
if(access(line, F_OK) == 0) {
snprintf(line, PATH_MAX, "%ssbin/ldconfig", root);
if(access(line, X_OK) == 0) {
- _alpm_run_chroot(root, "ldconfig");
+ _alpm_run_chroot(root, "/sbin/ldconfig");
}
}
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 05df175f..daa95856 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -953,6 +953,9 @@ create_package() {
exit 1 # $E_MISSING_PKGDIR
fi
+ cd "$pkgdir"
+ msg "$(gettext "Creating package...")"
+
if [ -z "$1" ]; then
nameofpkg="$pkgname"
else
@@ -961,9 +964,6 @@ create_package() {
write_pkginfo $nameofpkg
- cd "$pkgdir"
- msg "$(gettext "Creating package...")"
-
local comp_files=".PKGINFO"
# check for an install script
@@ -1444,8 +1444,8 @@ fi
ARGLIST=$@
# Parse Command Line Options.
-OPT_SHORT="AbcCdefFghiLmop:rRsV"
-OPT_LONG="allsource,asroot,ignorearch,builddeps,clean,cleancache,nodeps"
+OPT_SHORT="AcCdefFghiLmop:rRsV"
+OPT_LONG="allsource,asroot,ignorearch,clean,cleancache,nodeps"
OPT_LONG="$OPT_LONG,noextract,force,forcever:,geninteg,help,holdver"
OPT_LONG="$OPT_LONG,install,log,nocolor,nobuild,rmdeps,repackage,source"
OPT_LONG="$OPT_LONG,syncdeps,version,config:"
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index d3566f5a..a1e5f7f4 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -301,7 +301,7 @@ check_repo_db()
CLEAN_LOCK=1
else
error "$(gettext "Failed to acquire lockfile: %s.")" "$LOCKFILE"
- [ -f "$LOCKFILE" ] && error "$(gettext "Held by %s")" "$(cat $LOCKFILE)"
+ [ -f "$LOCKFILE" ] && error "$(gettext "Held by process %s")" "$(cat $LOCKFILE)"
exit 1
fi
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 4da65400..7bfe454b 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -837,18 +837,26 @@ int pacman_sync(alpm_list_t *targets)
/* check for newer versions of packages to be upgraded first */
alpm_list_t *packages = syncfirst();
if(packages) {
- printf(_(":: The following packages should be upgraded first :\n"));
- list_display(" ", packages);
- if(yesno(_(":: Do you want to cancel the current operation\n"
- ":: and upgrade these packages now?"))) {
- FREELIST(targs);
- targs = packages;
- config->flags = 0;
- config->op_s_upgrade = 0;
+ /* Do not ask user if all the -S targets are SyncFirst packages, see FS#15810 */
+ alpm_list_t *tmp = NULL;
+ if(config->op_s_upgrade || (tmp = alpm_list_diff(targets, packages, (alpm_list_fn_cmp)strcmp))) {
+ alpm_list_free(tmp);
+ printf(_(":: The following packages should be upgraded first :\n"));
+ list_display(" ", packages);
+ if(yesno(_(":: Do you want to cancel the current operation\n"
+ ":: and upgrade these packages now?"))) {
+ FREELIST(targs);
+ targs = packages;
+ config->flags = 0;
+ config->op_s_upgrade = 0;
+ } else {
+ FREELIST(packages);
+ }
+ printf("\n");
} else {
+ pm_printf(PM_LOG_DEBUG, "skipping SyncFirst dialog\n");
FREELIST(packages);
}
- printf("\n");
}
}