pkg

Check-in [3040b54a22]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:pkgdb_get_pattern_query: Fix regex handling when '-' used by not using SPLIT_VERSION Error: # pkg info -x 'pkg(-devel)?$' pkg: sqlite error while executing iterator in file pkgdb.c:1548: Invalid regex Expected: # pkg info -x 'pkg(-devel)?$' pkg-devel-1.3.0.b2 Partial revert from fa815ff62
Timelines: family | ancestors | descendants | both | trunk | gsoc2013
Files: files | file ages | folders
SHA1: 3040b54a22b5505bc264ea8243dbbc0be114efc3
User & Date: bryan@shatow.net 2014-06-12 20:11:50
Context
2014-06-13
23:45
Remove some dead code Leaf check-in: 4231fd98f0 user: bapt@FreeBSD.org tags: trunk, gsoc2013
2014-06-12
20:11
pkgdb_get_pattern_query: Fix regex handling when '-' used by not using SPLIT_VERSION Error: # pkg info -x 'pkg(-devel)?$' pkg: sqlite error while executing iterator in file pkgdb.c:1548: Invalid regex Expected: # pkg info -x 'pkg(-devel)?$' pkg-devel-1.3.0.b2 Partial revert from fa815ff62 check-in: 3040b54a22 user: bryan@shatow.net tags: trunk, gsoc2013
17:28
pkg-add.8: Add missing period check-in: 6ccfbe9e8f user: bryan@shatow.net tags: trunk, gsoc2013
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to libpkg/pkgdb.c.

1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
					"origin = SPLIT_UID('origin', ?1)";
		}
		break;
	case MATCH_REGEX:
		if (checkuid == NULL) {
			if (checkorigin == NULL)
				comp = " WHERE name REGEXP ?1 "
					"OR (name REGEXP SPLIT_VERSION('name', ?1) AND "
					" version REGEXP SPLIT_VERSION('version', ?1))";
			else
				comp = " WHERE origin REGEXP ?1";
		} else {
			comp = " WHERE name = SPLIT_UID('name', ?1) AND "
					"origin = SPLIT_UID('origin', ?1)";
		}
		break;







<
|







1647
1648
1649
1650
1651
1652
1653

1654
1655
1656
1657
1658
1659
1660
1661
					"origin = SPLIT_UID('origin', ?1)";
		}
		break;
	case MATCH_REGEX:
		if (checkuid == NULL) {
			if (checkorigin == NULL)
				comp = " WHERE name REGEXP ?1 "

				    "OR name || '-' || version REGEXP ?1";
			else
				comp = " WHERE origin REGEXP ?1";
		} else {
			comp = " WHERE name = SPLIT_UID('name', ?1) AND "
					"origin = SPLIT_UID('origin', ?1)";
		}
		break;