Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=gfpm.git;a=commitdiff;h=2fd6116cd65745caf54ffbde0ce2aeb30a621bee
commit 2fd6116cd65745caf54ffbde0ce2aeb30a621bee
Author: Priyank <[EMAIL PROTECTED]>
Date: Mon Sep 10 19:12:36 2007 +0530
gfpm-interface: cb_gfpm_refresh_button_clicked(): on sync, ask the user to
update his pacman-g2 version only if a newer pacman-g2 is available and not
when the local pacman-g2 is newer than the one in sync.
diff --git a/src/gfpm-interface.c b/src/gfpm-interface.c
index bd80c5d..4375650 100644
--- a/src/gfpm-interface.c
+++ b/src/gfpm-interface.c
@@ -988,8 +988,9 @@ cb_gfpm_refresh_button_clicked (GtkButton *button, gpointer
data)
pm_spkg = pacman_db_readpkg (sync_db, "pacman-g2");
if (pm_lpkg && pm_spkg)
{
- if (strcmp((char*)pacman_pkg_getinfo(pm_lpkg, PM_PKG_VERSION),
- (char*)pacman_pkg_getinfo(pm_spkg,
PM_PKG_VERSION)))
+ char *v1 = (char*)pacman_pkg_getinfo (pm_spkg, PM_PKG_VERSION);
+ char *v2 = (char*)pacman_pkg_getinfo (pm_lpkg, PM_PKG_VERSION);
+ if (pacman_pkg_vercmp(v1,v2)==1)
{
if (gfpm_question (_("Update pacman-g2"), updatestr) == GTK_RESPONSE_YES)
{
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git