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