瀏覽代碼

Handle # in regexs correctly

Markus Hennecke 5 年之前
父節點
當前提交
968b4fb53e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      autoupdate.pl

+ 2 - 2
autoupdate.pl

@@ -348,12 +348,12 @@ sub read_update_package_list {
 		chomp;
 		my $pkg = $_;
 		$pkg =~ s/ +#.*$//g;
-		if ($_ =~ m/#\s+->/) {
+		if ($_ =~ m/\#\s+->/) {
 			# Ignore ports that show up every time in pkg_outdated
 			print STDERR 'Ignoring ' . $pkg . "\n";
 			next;
 		}
-		if ($_ =~ m/#\ always-update -> 0,/x && !$always_update) {
+		if ($_ =~ m/\#\s+always-update\s+->\s+0,/x && !$always_update) {
 			print STDERR "Ignoring $pkg (always update)\n";
 			next;
 		}