SOURCES: poldek-completion.patch (NEW) - tab-completion fix from cvs
qboosh
qboosh at pld-linux.org
Wed Nov 30 09:48:40 CET 2005
Author: qboosh Date: Wed Nov 30 08:48:40 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- tab-completion fix from cvs
---- Files affected:
SOURCES:
poldek-completion.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/poldek-completion.patch
diff -u /dev/null SOURCES/poldek-completion.patch:1.1
--- /dev/null Wed Nov 30 09:48:40 2005
+++ SOURCES/poldek-completion.patch Wed Nov 30 09:48:35 2005
@@ -0,0 +1,52 @@
+===================================================================
+RCS file: /cvsroot/installer/poldek/cli/shell.c,v
+retrieving revision 1.27
+retrieving revision 1.28
+diff -u -r1.27 -r1.28
+--- installer/poldek/cli/shell.c 2005/11/06 19:26:27 1.27
++++ installer/poldek/cli/shell.c 2005/11/10 19:21:04 1.28
+@@ -11,7 +11,7 @@
+ */
+
+ /*
+- $Id$
++ $Id$
+ */
+
+ #ifdef HAVE_CONFIG_H
+@@ -76,13 +76,13 @@
+ struct pkg *ipkg = NULL;
+ tn_array *dents;
+ char name[256];
+- int n;
++ int n, name_len;
+
+ dents = poclidek_get_dent_ents(cctx, POCLIDEK_INSTALLEDDIR);
+ if (dents == NULL)
+ return 1;
+
+- snprintf(name, sizeof(name), "%s-", pkg->name);
++ name_len = snprintf(name, sizeof(name), "%s-", pkg->name);
+ n = n_array_bsearch_idx_ex(dents, name, (tn_fn_cmp)pkg_dent_strncmp);
+
+ if (n == -1)
+@@ -90,14 +90,15 @@
+
+ while (n < n_array_size(dents)) {
+ struct pkg_dent *ent = n_array_nth(dents, n++);
++
+ if (pkg_dent_isdir(ent))
+ continue;
++
++ if (strncmp(name, ent->name, name_len) != 0)
++ break;
+
+ ipkg = ent->pkg_dent_pkg;
+- if (strcmp(pkg->name, ipkg->name) != 0)
+- break;
+-
+- if (pkg_cmp_evr(pkg, ipkg) > 0)
++ if (strcmp(pkg->name, ipkg->name) == 0 && pkg_cmp_evr(pkg, ipkg) > 0)
+ return 1;
+
+ }
================================================================
More information about the pld-cvs-commit
mailing list