tech-pkg archive

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

pkg_install patch for testing



Hi all,
the attached patch addresses three issues raised lately:

(1) Accept upper case letters in license names as discussed here.
    If you disagree with this, discuss it in the thread.

(2) Correct a condition to detect incomplete packages, so that e.g.
    pkg_info ${RANDOM_TARBALL} doesn't crash.

(3) Invert the order for pkg_info -r. This should fix the remaining
    reported issues with make update on non-leaf packages.

Please test this carefully and report any new (or old) issues.

Joerg
Index: info/perform.c
===================================================================
RCS file: 
/home/joerg/repo/netbsd/pkgsrc/pkgtools/pkg_install/files/info/perform.c,v
retrieving revision 1.57
diff -u -p -r1.57 perform.c
--- info/perform.c      27 May 2009 20:26:03 -0000      1.57
+++ info/perform.c      30 Jun 2009 14:53:50 -0000
@@ -232,7 +232,7 @@ has_entry:
        }
 
        meta->is_installed = 0;
-       if (found_required != 0 && r != ARCHIVE_OK && r != ARCHIVE_EOF) {
+       if (found_required != 0 || (r != ARCHIVE_OK && r != ARCHIVE_EOF)) {
                free_pkg_meta(meta);
                meta = NULL;
        }
@@ -326,7 +326,7 @@ build_full_reqby(lpkg_head_t *reqby, str
                build_full_reqby(reqby, meta_dep, limit + 1);
                free_pkg_meta(meta_dep);
 
-               TAILQ_INSERT_TAIL(reqby, lpp, lp_link);
+               TAILQ_INSERT_HEAD(reqby, lpp, lp_link);
        }
 }
 
Index: lib/license.c
===================================================================
RCS file: 
/home/joerg/repo/netbsd/pkgsrc/pkgtools/pkg_install/files/lib/license.c,v
retrieving revision 1.5
diff -u -p -r1.5 license.c
--- lib/license.c       10 Jun 2009 20:15:11 -0000      1.5
+++ lib/license.c       25 Jun 2009 13:54:20 -0000
@@ -64,7 +64,8 @@ static size_t hash_collisions;
 
 static char **license_hash[HASH_SIZE];
 static const char license_spaces[] = " \t\n";
-static const char license_chars[] = "abcdefghijklmnopqrstuvwxyz0123456789_-.";
+static const char license_chars[] =
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-.";
 
 static size_t
 hash_license(const char *license, size_t len)
Index: lib/version.h
===================================================================
RCS file: 
/home/joerg/repo/netbsd/pkgsrc/pkgtools/pkg_install/files/lib/version.h,v
retrieving revision 1.131
diff -u -p -r1.131 version.h
--- lib/version.h       10 Jun 2009 20:15:11 -0000      1.131
+++ lib/version.h       30 Jun 2009 14:52:00 -0000
@@ -27,6 +27,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION "20090610"
+#define PKGTOOLS_VERSION "20090630"
 
 #endif /* _INST_LIB_VERSION_H_ */


Home | Main Index | Thread Index | Old Index