Fix up logic again for udebs without findable source

This commit is contained in:
Steve McIntyre 2013-01-30 19:40:01 +00:00
parent 4b512541d8
commit 9d50fdb6f1
1 changed files with 27 additions and 24 deletions

View File

@ -65,6 +65,7 @@ if [ $source = "yes" ] ; then
/^Package:/ { /^Package:/ {
srcname=$2 srcname=$2
srcs_done++ srcs_done++
num_sources = 0
} }
/^Binary:/ { /^Binary:/ {
@ -122,37 +123,39 @@ if [ $source = "yes" ] ; then
pkg=fields[3] pkg=fields[3]
pkgsize=fields[4] pkgsize=fields[4]
srcpkg=bin2src[pkg] srcpkg=bin2src[pkg]
built_using=fields[5]
if ("" != built_using) {
num_sources = split(built_using, sources, ",")
}
if ("" == srcpkg) { if ("" == srcpkg) {
if ("main-installer" == component) { if ("main-installer" == component) {
printf("# Ignoring source for udeb %s\n", pkg) printf("# Ignoring source for udeb %s\n", pkg)
} else { } else {
printf("# Source for pkg %s is UNKNOWN!\n", pkg) printf("# Source for pkg %s is UNKNOWN!\n", pkg)
} }
} else {
sources[++num_sources] = srcpkg
} }
built_using=fields[5] if (num_sources) {
if ("" != built_using) { for(i = 1; i <= num_sources; i++) {
num_sources = split(built_using,sources,",") source = sources[i]
} if (!included[source]) {
num_sources++ printf("# Adding source %s at %d because of %s:%s (%s)\n",
sources[num_sources] = srcpkg source, FNR, arch, pkg, (i == num_sources ? "dep" : "b-u"))
for(i = 1; i <= num_sources; i++) { included[source] = pkg
source = sources[i] incarch[source] = arch
if (!included[source]) { indexnr[source] = FNR
printf("# Adding source %s at %d because of %s:%s (%s)\n", sourcecomp[source] = component
source, FNR, arch, pkg, (i == num_sources ? "dep" : "b-u")) } else {
included[source] = pkg if (FNR < indexnr[source]) {
incarch[source] = arch printf("# Updating source %s: was due to %d:%s:%s, now moved earlier because of %d:%s:%s (%s)\n",
indexnr[source] = FNR source, indexnr[source],
sourcecomp[source] = component incarch[source], included[source],
} else { FNR, arch, pkg, (i == num_sources ? "dep" : "b-u"))
if (FNR < indexnr[source]) { included[source] = pkg
printf("# Updating source %s: was due to %d:%s:%s, now moved earlier because of %d:%s:%s (%s)\n", incarch[source] = arch
source, indexnr[source], indexnr[source] = FNR
incarch[source], included[source], }
FNR, arch, pkg, (i == num_sources ? "dep" : "b-u"))
included[source] = pkg
incarch[source] = arch
indexnr[source] = FNR
} }
} }
} }