Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/usr.sbin/pkg_install/lib Pull up revision 1.31 (request...



details:   https://anonhg.NetBSD.org/src/rev/db7276350144
branches:  netbsd-1-5
changeset: 491493:db7276350144
user:      he <he%NetBSD.org@localhost>
date:      Tue May 01 11:01:41 2001 +0000

description:
Pull up revision 1.31 (requested by hubertf):
  Fix pkg_add so that it works via ftp for >= dependencies.

diffstat:

 usr.sbin/pkg_install/lib/ftpio.c |  19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r c48435c88acc -r db7276350144 usr.sbin/pkg_install/lib/ftpio.c
--- a/usr.sbin/pkg_install/lib/ftpio.c  Tue May 01 11:01:25 2001 +0000
+++ b/usr.sbin/pkg_install/lib/ftpio.c  Tue May 01 11:01:41 2001 +0000
@@ -1,8 +1,8 @@
-/*     $NetBSD: ftpio.c,v 1.20.2.10 2001/05/01 10:56:33 he Exp $       */
+/*     $NetBSD: ftpio.c,v 1.20.2.11 2001/05/01 11:01:41 he Exp $       */
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ftpio.c,v 1.20.2.10 2001/05/01 10:56:33 he Exp $");
+__RCSID("$NetBSD: ftpio.c,v 1.20.2.11 2001/05/01 11:01:41 he Exp $");
 #endif
 
 /*
@@ -559,8 +559,21 @@
                /* The following loop is basically the same as the readdir() loop
                 * in findmatchingname() */
                while (fgets(filename, sizeof(buf), f)) {
+
+                       /*
+                        * We need to stripp of any .t[bg]z etc.
+                        * suffix here
+                        */
+
+                       char s_filename[FILENAME_MAX];
+                       char s_pkg[FILENAME_MAX];
+                       
                        filename[strlen(filename)-1] = '\0';
-                       if (pmatch(pkg, filename)) {
+
+                       strip_txz(s_filename, filename);
+                       strip_txz(s_pkg, pkg);
+                       
+                       if (pmatch(s_pkg, s_filename)) {
                                matches++;
 
                                /* compare findbestmatchingname() */



Home | Main Index | Thread Index | Old Index