Merge branch 'maint'

This commit is contained in:
Dan McGee 2009-08-08 11:23:38 -05:00
commit 7bb9c4098b
4 changed files with 25 additions and 17 deletions

View file

@ -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");
}
}

View file

@ -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:"

View file

@ -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

View file

@ -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");
}
}