pkgng

Check-in [1d0a5f51c9]
Login

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

Overview
Comment:Merge pull request #592 from so14k/add-usage - Fix an error that prevents the use of `pkg add' or `pkg annotate'.
Timelines: family | ancestors | descendants | both | trunk | multi-repos | stash
Files: files | file ages | folders
SHA1: 1d0a5f51c9752b641b956cfe386c51ee276a41b7
User & Date: bapt@FreeBSD.org 2013-09-21 10:38:49
Context
2013-09-21
15:33
Factor out the script text column into a new table: 'script' Create new linking table 'pkg_script' to express the relation between packages and scripts. Drop old scripts table and repalce with view + triggers to emulate old behaviour. check-in: abbd03352b user: m.seaman@infracaninophile.co.uk tags: trunk, multi-repos, stash
10:38
Merge pull request #592 from so14k/add-usage - Fix an error that prevents the use of `pkg add' or `pkg annotate'. check-in: 1d0a5f51c9 user: bapt@FreeBSD.org tags: trunk, multi-repos, stash
06:33
- Fix an error that prevents the use of `pkg add' or `pkg annotate'. check-in: cacc790c7b user: brd@FreeBSD.org tags: trunk, multi-repos, stash
2013-09-20
18:31
Return EPKG_FATAL if any install pattern is invalid. check-in: d88c726baf user: will@firepipe.net tags: trunk, multi-repos, stash
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pkg/main.c.

683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
				errx(EX_CONFIG, "Invalid alias: %s", alias_value);
			sbuf_delete(newcmd);
			break;
		}
	}

	len = strlen(newargv[0]);
	for (i = 2; i < cmd_len; i++) {
		if (strncmp(newargv[0], cmd[i].name, len) == 0) {
			/* if we have the exact cmd */
			if (len == strlen(cmd[i].name)) {
				command = &cmd[i];
				ambiguous = 0;
				break;
			}







|







683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
				errx(EX_CONFIG, "Invalid alias: %s", alias_value);
			sbuf_delete(newcmd);
			break;
		}
	}

	len = strlen(newargv[0]);
	for (i = 0; i < cmd_len; i++) {
		if (strncmp(newargv[0], cmd[i].name, len) == 0) {
			/* if we have the exact cmd */
			if (len == strlen(cmd[i].name)) {
				command = &cmd[i];
				ambiguous = 0;
				break;
			}