Package: sbuild
Version: 0.72.0-2
Severity: normal
Tags: patch

Dear maintainer,

Since commit 0e71b40, `--extra-repository' cannot be used with
`--no-apt-update' (i.e., the extra repositories are not being used).

I have attached a patch that fixes the above for me, but since I have no
experience with the sbuild codebase, it is only provided as an example
(for instance, it does not take into account the extra repository keys).

Thanks for maintaining sbuild.

-- 
Ilias
diff --git a/lib/Sbuild/ResolverBase.pm b/lib/Sbuild/ResolverBase.pm
index e904243..64a3709 100644
--- a/lib/Sbuild/ResolverBase.pm
+++ b/lib/Sbuild/ResolverBase.pm
@@ -193,6 +193,26 @@ sub setup {
 		return 0;
 	    }
 	}
+    $self->run_apt_command(
+        { COMMAND => [$self->get_conf('APT_GET'), 'update',
+                      '-o', 'Dir::Etc::sourcelist=' . $extra_repositories_list_file,
+                      '--no-list-cleanup'],
+          ENV => {'DEBIAN_FRONTEND' => 'noninteractive'},
+          USER => 'root',
+          DIR => '/' });
+    if ($? != 0) {
+        return 0;
+    }
+
+    $self->run_apt_command(
+        { COMMAND => [$self->get_conf('APT_CACHE'), 'gencaches'],
+          ENV => {'DEBIAN_FRONTEND' => 'noninteractive'},
+          USER => 'root',
+          DIR => '/' });
+
+    if ($? != 0) {
+    return 0;
+    }
     }
 
     # Now, we'll add in any provided OpenPGP keys into the archive, so that

Reply via email to