mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-10 21:38:19 -05:00
Merge branch 'maint'
This commit is contained in:
commit
521de7ceed
@ -49,7 +49,6 @@ _pacman_opts_query_modifiers=(
|
|||||||
'-c[List package changelog]'
|
'-c[List package changelog]'
|
||||||
'-d[List packages installed as dependencies]'
|
'-d[List packages installed as dependencies]'
|
||||||
'-e[List packages explicitly installed]'
|
'-e[List packages explicitly installed]'
|
||||||
'-g[List all members of a package group]'
|
|
||||||
'-i[View package information]'
|
'-i[View package information]'
|
||||||
'-ii[View package information including backup files]'
|
'-ii[View package information including backup files]'
|
||||||
'-l[List package contents]'
|
'-l[List package contents]'
|
||||||
@ -87,8 +86,10 @@ _pacman_opts_sync_modifiers=(
|
|||||||
'-u[Upgrade all out-of-date packages]'
|
'-u[Upgrade all out-of-date packages]'
|
||||||
'-w[Download packages only]'
|
'-w[Download packages only]'
|
||||||
'-y[Download fresh package databases]'
|
'-y[Download fresh package databases]'
|
||||||
'*--ignore[Ignore a package upgrade]:package:_pacman_completions_installed_packages'
|
'*--ignore[Ignore a package upgrade]:package:
|
||||||
'*--ignoregroup[Ignore a group upgrade]:package group:_pacman_completions_all_groups'
|
_pacman_completions_all_packages'
|
||||||
|
'*--ignoregroup[Ignore a group upgrade]:package group:
|
||||||
|
_pacman_completions_all_groups'
|
||||||
'--asdeps[Install packages as non-explicitly installed]'
|
'--asdeps[Install packages as non-explicitly installed]'
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -288,17 +289,6 @@ _pacman_get_command() {
|
|||||||
|
|
||||||
# main dispatcher
|
# main dispatcher
|
||||||
_pacman() {
|
_pacman() {
|
||||||
# First check if --ignoregroup was the last command given. If so, complete
|
|
||||||
# all groups.
|
|
||||||
if [ "$words[-2]" = "--ignoregroup" ]; then
|
|
||||||
_arguments -s : \
|
|
||||||
"$_pacman_opts_common[@]" \
|
|
||||||
"$_pacman_opts_sync_modifiers[@]" \
|
|
||||||
'*:package group:_pacman_completions_all_groups'
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Otherwise, complete on the given command.
|
|
||||||
case $words[2] in
|
case $words[2] in
|
||||||
-A*) _pacman_action_add ;;
|
-A*) _pacman_action_add ;;
|
||||||
-Q*g*) # ipkg groups
|
-Q*g*) # ipkg groups
|
||||||
@ -307,7 +297,7 @@ _pacman() {
|
|||||||
"$_pacman_opts_query_modifiers[@]" \
|
"$_pacman_opts_query_modifiers[@]" \
|
||||||
'*:groups:_pacman_completions_installed_groups'
|
'*:groups:_pacman_completions_installed_groups'
|
||||||
;;
|
;;
|
||||||
-Q*o*) # file *.pkg.tar.gz
|
-Q*o*) # file
|
||||||
_arguments -s : \
|
_arguments -s : \
|
||||||
"$_pacman_opts_common[@]" \
|
"$_pacman_opts_common[@]" \
|
||||||
"$_pacman_opts_query_modifiers[@]" \
|
"$_pacman_opts_query_modifiers[@]" \
|
||||||
|
@ -270,7 +270,7 @@ from.
|
|||||||
*_svntrunk*;;
|
*_svntrunk*;;
|
||||||
The trunk of the SVN repository.
|
The trunk of the SVN repository.
|
||||||
|
|
||||||
*_cvsmod*;;
|
*_svnmod*;;
|
||||||
The SVN module to fetch.
|
The SVN module to fetch.
|
||||||
|
|
||||||
*Git*::
|
*Git*::
|
||||||
|
@ -235,7 +235,7 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(pmdb_t *db, int reversedeps,
|
|||||||
alpm_list_t *remove, alpm_list_t *upgrade)
|
alpm_list_t *remove, alpm_list_t *upgrade)
|
||||||
{
|
{
|
||||||
alpm_list_t *i, *j;
|
alpm_list_t *i, *j;
|
||||||
alpm_list_t *joined, *dblist;
|
alpm_list_t *targets, *dblist = NULL, *modified = NULL;
|
||||||
alpm_list_t *baddeps = NULL;
|
alpm_list_t *baddeps = NULL;
|
||||||
pmdepmissing_t *miss = NULL;
|
pmdepmissing_t *miss = NULL;
|
||||||
|
|
||||||
@ -245,9 +245,16 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(pmdb_t *db, int reversedeps,
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
joined = alpm_list_join(alpm_list_copy(remove), alpm_list_copy(upgrade));
|
targets = alpm_list_join(alpm_list_copy(remove), alpm_list_copy(upgrade));
|
||||||
dblist = alpm_list_diff(_alpm_db_get_pkgcache(db), joined, _alpm_pkg_cmp);
|
for(i = _alpm_db_get_pkgcache(db); i; i = i->next) {
|
||||||
alpm_list_free(joined);
|
void *pkg = i->data;
|
||||||
|
if(alpm_list_find(targets, pkg, _alpm_pkg_cmp)) {
|
||||||
|
modified = alpm_list_add(modified, pkg);
|
||||||
|
} else {
|
||||||
|
dblist = alpm_list_add(dblist, pkg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
alpm_list_free(targets);
|
||||||
|
|
||||||
/* look for unsatisfied dependencies of the upgrade list */
|
/* look for unsatisfied dependencies of the upgrade list */
|
||||||
for(i = upgrade; i; i = i->next) {
|
for(i = upgrade; i; i = i->next) {
|
||||||
@ -275,9 +282,6 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(pmdb_t *db, int reversedeps,
|
|||||||
if(reversedeps) {
|
if(reversedeps) {
|
||||||
/* reversedeps handles the backwards dependencies, ie,
|
/* reversedeps handles the backwards dependencies, ie,
|
||||||
* the packages listed in the requiredby field. */
|
* the packages listed in the requiredby field. */
|
||||||
|
|
||||||
alpm_list_t *modified = alpm_list_diff(_alpm_db_get_pkgcache(db), dblist, _alpm_pkg_cmp);
|
|
||||||
|
|
||||||
for(i = dblist; i; i = i->next) {
|
for(i = dblist; i; i = i->next) {
|
||||||
pmpkg_t *lp = i->data;
|
pmpkg_t *lp = i->data;
|
||||||
for(j = alpm_pkg_get_depends(lp); j; j = j->next) {
|
for(j = alpm_pkg_get_depends(lp); j; j = j->next) {
|
||||||
@ -297,8 +301,8 @@ alpm_list_t SYMEXPORT *alpm_checkdeps(pmdb_t *db, int reversedeps,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
alpm_list_free(modified);
|
|
||||||
}
|
}
|
||||||
|
alpm_list_free(modified);
|
||||||
alpm_list_free(dblist);
|
alpm_list_free(dblist);
|
||||||
|
|
||||||
return(baddeps);
|
return(baddeps);
|
||||||
|
@ -147,7 +147,9 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
|
|||||||
_alpm_recursedeps(db, trans->packages, 0);
|
_alpm_recursedeps(db, trans->packages, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!(trans->flags & PM_TRANS_FLAG_NODEPS)) {
|
||||||
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
|
EVENT(trans, PM_TRANS_EVT_CHECKDEPS_DONE, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
@ -582,9 +582,7 @@ const char *_alpm_filecache_setup(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* we didn't find a valid cache directory. use /tmp. */
|
/* we didn't find a valid cache directory. use /tmp. */
|
||||||
i = alpm_option_get_cachedirs();
|
|
||||||
tmp = alpm_list_add(NULL, strdup("/tmp/"));
|
tmp = alpm_list_add(NULL, strdup("/tmp/"));
|
||||||
FREELIST(i);
|
|
||||||
alpm_option_set_cachedirs(tmp);
|
alpm_option_set_cachedirs(tmp);
|
||||||
_alpm_log(PM_LOG_DEBUG, "using cachedir: %s", "/tmp/\n");
|
_alpm_log(PM_LOG_DEBUG, "using cachedir: %s", "/tmp/\n");
|
||||||
_alpm_log(PM_LOG_WARNING, _("couldn't create package cache, using /tmp instead\n"));
|
_alpm_log(PM_LOG_WARNING, _("couldn't create package cache, using /tmp instead\n"));
|
||||||
|
@ -130,13 +130,13 @@ for file in $(find "$rootdir"/* -name "$BUILDSCRIPT"); do
|
|||||||
CARCH='any'
|
CARCH='any'
|
||||||
fi
|
fi
|
||||||
if [ "$pkgdir" != "" ]; then
|
if [ "$pkgdir" != "" ]; then
|
||||||
pkgfile="$pkgdir/$pkgname-$pkgver-$pkgrel-$CARCH.$PKGEXT"
|
pkgfile="$pkgdir/$pkgname-$pkgver-$pkgrel-${CARCH}${PKGEXT}"
|
||||||
else
|
else
|
||||||
pkgfile="$destdir/$pkgname-$pkgver-$pkgrel-$CARCH.$PKGEXT"
|
pkgfile="$destdir/$pkgname-$pkgver-$pkgrel-${CARCH}${PKGEXT}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$pkgfile" ]; then
|
if [ ! -f "$pkgfile" ]; then
|
||||||
error "$(gettext "could not find %s-%s-%s-%s.%s - skipping")" $pkgname $pkgver $pkgrel $CARCH $PKGEXT
|
error "$(gettext "could not find %s-%s-%s-%s%s - skipping")" $pkgname $pkgver $pkgrel $CARCH $PKGEXT
|
||||||
else
|
else
|
||||||
if check_force; then
|
if check_force; then
|
||||||
forcepkgs="$forcepkgs $pkgfile"
|
forcepkgs="$forcepkgs $pkgfile"
|
||||||
|
@ -127,10 +127,10 @@ if [ "$action" = "upd" ]; then # INSERT / UPDATE
|
|||||||
if [ "$arch" = 'any' ]; then
|
if [ "$arch" = 'any' ]; then
|
||||||
CARCH='any'
|
CARCH='any'
|
||||||
fi
|
fi
|
||||||
pkgfile="$pkgdir/$pkgname-$pkgver-$pkgrel-$CARCH.$PKGEXT"
|
pkgfile="$pkgdir/$pkgname-$pkgver-$pkgrel-${CARCH}${PKGEXT}"
|
||||||
|
|
||||||
if [ ! -f "$pkgfile" ]; then
|
if [ ! -f "$pkgfile" ]; then
|
||||||
die "$(gettext "could not find %s-%s-%s-%s.%s - aborting")" $pkgname $pkgver $pkgrel $CARCH $PKGEXT
|
die "$(gettext "could not find %s-%s-%s-%s%s - aborting")" $pkgname $pkgver $pkgrel $CARCH $PKGEXT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if check_force; then
|
if check_force; then
|
||||||
|
@ -278,11 +278,19 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
|
|||||||
*response = yesno(str);
|
*response = yesno(str);
|
||||||
break;
|
break;
|
||||||
case PM_TRANS_CONV_REPLACE_PKG:
|
case PM_TRANS_CONV_REPLACE_PKG:
|
||||||
|
if(!config->noconfirm) {
|
||||||
snprintf(str, LOG_STR_LEN, _(":: Replace %s with %s/%s? [Y/n] "),
|
snprintf(str, LOG_STR_LEN, _(":: Replace %s with %s/%s? [Y/n] "),
|
||||||
alpm_pkg_get_name(data1),
|
alpm_pkg_get_name(data1),
|
||||||
(char *)data3,
|
(char *)data3,
|
||||||
alpm_pkg_get_name(data2));
|
alpm_pkg_get_name(data2));
|
||||||
*response = yesno(str);
|
*response = yesno(str);
|
||||||
|
} else {
|
||||||
|
printf(_("Replacing %s with %s/%s\n."),
|
||||||
|
alpm_pkg_get_name(data1),
|
||||||
|
(char *)data3,
|
||||||
|
alpm_pkg_get_name(data2));
|
||||||
|
*response = 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PM_TRANS_CONV_CONFLICT_PKG:
|
case PM_TRANS_CONV_CONFLICT_PKG:
|
||||||
snprintf(str, LOG_STR_LEN, _(":: %s conflicts with %s. Remove %s? [Y/n] "),
|
snprintf(str, LOG_STR_LEN, _(":: %s conflicts with %s. Remove %s? [Y/n] "),
|
||||||
|
Loading…
Reference in New Issue
Block a user