Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
We are getting closer to detect all the cases for dirrmtry
Baptiste Daroussin committed 14 years ago
commit 4a2c6163f0bd4945e86e7b349db64e5af3abb44e
parent efb817edee59bdac180e0c1b70b69086ea006ec2
1 file changed +16 -12
modified libpkg/pkg_ports.c
@@ -107,22 +107,24 @@ ports_parse_plist(struct pkg *pkg, char *plist)
						comment[1] = '\0';
					}
					/* remove the glob if any */
-
					if (strchr(cmd, '*'))
+
					if (comment[0] == '#') {
+
						if (strchr(cmd, '*'))
						comment[0] = '\0';

-
					buf = cmd;
+
						buf = cmd;

-
					/* start remove mkdir -? */
-
					/* remove the command */
-
					while (!isspace(buf[0]))
-
						buf++;
+
						/* start remove mkdir -? */
+
						/* remove the command */
+
						while (!isspace(buf[0]))
+
							buf++;

-
					while (isspace(buf[0]))
-
						buf++;
+
						while (isspace(buf[0]))
+
							buf++;

-
					if (buf[0] == '-')
-
						comment[0] = '\0';
-
					/* end remove mkdir -? */
+
						if (buf[0] == '-')
+
							comment[0] = '\0';
+
						/* end remove mkdir -? */
+
					}

					if (filestarted) {
						if (sbuf_len(unexec_scripts) == 0)
@@ -143,7 +145,9 @@ ports_parse_plist(struct pkg *pkg, char *plist)
						while (!isspace(buf[0]))
							buf++;

-
						if (strchr(buf, '"')) {
+
						split_chr(buf, '|');
+

+
						if (strstr(buf, "\"/")) {
							while (regexec(&preg1, buf, 2, pmatch, 0) == 0) {
								strlcpy(path, &buf[pmatch[1].rm_so], pmatch[1].rm_eo - pmatch[1].rm_so + 1);
								buf+=pmatch[1].rm_eo;