FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 07-01-2008, 07:23 PM
Nagy Gabor
 
Default Don't duplicate packages in requiredby list

>From 0320ac5dabb67813dfe64fddf31a371ec8934126 Mon Sep 17 00:00:00 2001
From: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Date: Tue, 1 Jul 2008 21:06:32 +0200
Subject: [PATCH] Don't duplicate packages in requiredby list

This is a "fix" for FS#10226.
I think that multiple versioned dependencies are quite common now, and the old behavior is quite annoying there.
This patch won't cause any slow-down (but 1 ns speed-up instead;-)

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
---
lib/libalpm/package.c | 5 ++---
pactest/vercmptest.sh | 1 +
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 3708a58..79cc64e 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -537,9 +537,7 @@ unsigned short SYMEXPORT alpm_pkg_has_scriptlet(pmpkg_t *pkg)
* @brief Compute the packages requiring a given package.
* @param pkg a package
* @return the list of packages requiring pkg
- *
- * A depends on B through n depends <=> A listed in B's requiredby n times
- * n == 0 or 1 in almost all cases */
+ */
alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(pmpkg_t *pkg)
{
const alpm_list_t *i, *j;
@@ -560,6 +558,7 @@ alpm_list_t SYMEXPORT *alpm_pkg_compute_requiredby(pmpkg_t *pkg)
_alpm_log(PM_LOG_DEBUG, "adding '%s' in requiredby field for '%s'
",
cachepkgname, pkg->name);
reqs = alpm_list_add(reqs, strdup(cachepkgname));
+ break;
}
}
}
--
1.5.6.1


_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 07:04 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org