| @@ -1,17 +1,17 @@ | | | @@ -1,17 +1,17 @@ |
1 | #!@AWK@ -f | | 1 | #!@AWK@ -f |
2 | # $NetBSD: compute-packages.awk,v 1.3 2008/09/14 18:59:02 joerg Exp $ | | 2 | # $NetBSD: compute-packages.awk,v 1.3.30.1 2012/05/21 09:48:29 tron Exp $ |
3 | # | | 3 | # |
4 | # Copyright (c) 2007 Joerg Sonnenberger <joerg@NetBSD.org>. | | 4 | # Copyright (c) 2007, 2012 Joerg Sonnenberger <joerg@NetBSD.org>. |
5 | # All rights reserved. | | 5 | # All rights reserved. |
6 | # | | 6 | # |
7 | # This code was developed as part of Google's Summer of Code 2007 program. | | 7 | # This code was developed as part of Google's Summer of Code 2007 program. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # | | 12 | # |
13 | # 1. Redistributions of source code must retain the above copyright | | 13 | # 1. Redistributions of source code must retain the above copyright |
14 | # notice, this list of conditions and the following disclaimer. | | 14 | # notice, this list of conditions and the following disclaimer. |
15 | # 2. Redistributions in binary form must reproduce the above copyright | | 15 | # 2. Redistributions in binary form must reproduce the above copyright |
16 | # notice, this list of conditions and the following disclaimer in | | 16 | # notice, this list of conditions and the following disclaimer in |
17 | # the documentation and/or other materials provided with the | | 17 | # the documentation and/or other materials provided with the |
| @@ -60,27 +60,27 @@ BEGIN { | | | @@ -60,27 +60,27 @@ BEGIN { |
60 | | | 60 | |
61 | if ($0 ~ "^NO_BIN_ON_FTP=.") | | 61 | if ($0 ~ "^NO_BIN_ON_FTP=.") |
62 | initial_restricted[cur] = 1 | | 62 | initial_restricted[cur] = 1 |
63 | | | 63 | |
64 | if ($0 ~ "^DEPENDS=") | | 64 | if ($0 ~ "^DEPENDS=") |
65 | depends[cur] = substr($0, 9) | | 65 | depends[cur] = substr($0, 9) |
66 | } | | 66 | } |
67 | close(presolve_file) | | 67 | close(presolve_file) |
68 | | | 68 | |
69 | for (pkg in depends) { | | 69 | for (pkg in depends) { |
70 | split(depends[pkg], depend_list, "[ \t]+") | | 70 | split(depends[pkg], depend_list, "[ \t]+") |
71 | for (dep in depend_list) { | | 71 | for (dep in depend_list) { |
72 | cur_dep = depend_list[dep] | | 72 | cur_dep = depend_list[dep] |
73 | reverse_depends[cur_dep] = pkg " " cur_dep | | 73 | reverse_depends[cur_dep] = pkg " " reverse_depends[cur_dep] |
74 | } | | 74 | } |
75 | } | | 75 | } |
76 | | | 76 | |
77 | for (pkg in initial_restricted) | | 77 | for (pkg in initial_restricted) |
78 | mark_restricted(pkg) | | 78 | mark_restricted(pkg) |
79 | | | 79 | |
80 | while ((getline pkg < success_file) > 0) { | | 80 | while ((getline pkg < success_file) > 0) { |
81 | # skip restricted packages | | 81 | # skip restricted packages |
82 | if (pkg in restricted) | | 82 | if (pkg in restricted) |
83 | continue; | | 83 | continue; |
84 | # build category/file list | | 84 | # build category/file list |
85 | split(categories[pkg], cats, "[ \t]+") | | 85 | split(categories[pkg], cats, "[ \t]+") |
86 | cats[0] = "All" | | 86 | cats[0] = "All" |