Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-12-30 09:41:46 -0600
committerDan McGee <dan@archlinux.org>2010-12-30 09:41:46 -0600
commit08d885fda5c9ccb3ac68faccc7c75e440ac71113 (patch)
tree3c494d8c593db3848d88a74b4e111710acfe0707
parent351250adb49bea470b88fca54dcfba789b58545c (diff)
parent6ddc115c7f52d6d172ca3879f96cc782bb526313 (diff)
Merge branch 'maint'
Conflicts: lib/libalpm/sync.c test/pacman/tests/ignore007.py
-rw-r--r--doc/Makefile.am2
-rw-r--r--lib/libalpm/sync.c50
-rw-r--r--test/pacman/tests/ignore007.py2
3 files changed, 36 insertions, 18 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 748eb5fc..6405cf01 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -52,7 +52,7 @@ EXTRA_DIST = \
$(DOXYGEN_MANS)
# Files that should be removed, but which Automake does not know.
-MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) $(HTML_DOCS) repo-remove.8
+MOSTLYCLEANFILES = *.xml $(ASCIIDOC_MANS) $(HTML_DOCS) repo-remove.8 website.tar.gz
# Ensure manpages are fresh when building a dist tarball
dist-hook:
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 9741bae0..69234cbf 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -248,29 +248,15 @@ static int sync_pkg(pmpkg_t *spkg, alpm_list_t *pkg_list)
return(0);
}
-static int sync_target(alpm_list_t *dbs_sync, const char *target)
+static int sync_group(alpm_list_t *dbs_sync, const char *target)
{
alpm_list_t *i, *j;
alpm_list_t *known_pkgs = NULL;
- pmpkg_t *spkg;
- pmdepend_t *dep; /* provisions and dependencies are also allowed */
pmgrp_t *grp;
int found = 0;
ALPM_LOG_FUNC;
- /* Sanity checks */
- ASSERT(target != NULL && strlen(target) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
- ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
-
- dep = _alpm_splitdep(target);
- spkg = _alpm_resolvedep(dep, dbs_sync, NULL, 1);
- _alpm_dep_free(dep);
-
- if(spkg != NULL) {
- return(sync_pkg(spkg, handle->trans->add));
- }
-
_alpm_log(PM_LOG_DEBUG, "%s package not found, searching for group...\n", target);
for(i = dbs_sync; i; i = i->next) {
pmdb_t *db = i->data;
@@ -279,6 +265,18 @@ static int sync_target(alpm_list_t *dbs_sync, const char *target)
found = 1;
for(j = alpm_grp_get_pkgs(grp); j; j = j->next) {
pmpkg_t *pkg = j->data;
+
+ /* check if group member is ignored */
+ if(_alpm_pkg_should_ignore(pkg)) {
+ int install = 0;
+ QUESTION(handle->trans, PM_TRANS_CONV_INSTALL_IGNOREPKG, pkg,
+ NULL, NULL, &install);
+ if(install == 0) {
+ _alpm_log(PM_LOG_WARNING, _("skipping target: %s\n"), alpm_pkg_get_name(pkg));
+ continue;
+ }
+ }
+
if(sync_pkg(pkg, known_pkgs) == -1) {
if(pm_errno == PM_ERR_TRANS_DUP_TARGET || pm_errno == PM_ERR_PKG_IGNORED) {
/* just skip duplicate or ignored targets */
@@ -305,6 +303,28 @@ static int sync_target(alpm_list_t *dbs_sync, const char *target)
return(0);
}
+static int sync_target(alpm_list_t *dbs_sync, const char *target)
+{
+ pmpkg_t *spkg;
+ pmdepend_t *dep; /* provisions and dependencies are also allowed */
+
+ ALPM_LOG_FUNC;
+
+ /* Sanity checks */
+ ASSERT(target != NULL && strlen(target) != 0, RET_ERR(PM_ERR_WRONG_ARGS, -1));
+ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+
+ dep = _alpm_splitdep(target);
+ spkg = _alpm_resolvedep(dep, dbs_sync, NULL, 1);
+ _alpm_dep_free(dep);
+
+ if(spkg != NULL) {
+ return(sync_pkg(spkg, handle->trans->add));
+ }
+
+ return(sync_group(dbs_sync, target));
+}
+
/** Add a sync target to the transaction.
* @param target the name of the sync target to add
* @return 0 on success, -1 on error (pm_errno is set accordingly)
diff --git a/test/pacman/tests/ignore007.py b/test/pacman/tests/ignore007.py
index e4be40a1..bb5efdc9 100644
--- a/test/pacman/tests/ignore007.py
+++ b/test/pacman/tests/ignore007.py
@@ -19,5 +19,3 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=%s" % pkg1.name)
self.addrule("PKG_EXIST=%s" % pkg2.name)
self.addrule("PACMAN_OUTPUT=IgnorePkg")
-
-self.expectfailure = True