diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 86933c57..fe6d46dd 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -95,10 +95,9 @@ python() {
     d.setVar('SRC_URI', ' '.join(new_src_uri))
     d.prependVar('SRC_APT', ' '.join(src_apt))
 
-    if d.getVar('SRC_APT').strip() == '':
-        d.setVarFlag('do_apt_fetch', 'noexec', '1')
-        d.setVarFlag('do_apt_unpack', 'noexec', '1')
-        d.setVarFlag('do_cleanall_apt', 'noexec', '1')
+    if len(d.getVar('SRC_APT').strip()) > 0:
+        bb.build.addtask('apt_unpack', 'do_patch', '', d)
+        bb.build.addtask('cleanall_apt', 'do_cleanall', '', d)
 }
 
 do_apt_fetch() {
@@ -117,11 +116,11 @@ do_apt_fetch() {
     dpkg_undo_mounts
 }
 
-addtask apt_fetch after do_unpack before do_apt_unpack
+addtask apt_fetch
 do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
 
 # Add dependency from the correct buildchroot: host or target
-do_apt_fetch[depends] = "${BUILDCHROOT_DEP}"
+do_apt_fetch[depends] += "${BUILDCHROOT_DEP}"
 
 do_apt_unpack() {
     rm -rf ${S}
@@ -142,9 +141,8 @@ do_apt_unpack() {
     dpkg_undo_mounts
 }
 
-addtask apt_unpack after do_apt_fetch before do_patch
+addtask apt_unpack after do_apt_fetch
 
-addtask cleanall_apt before do_cleanall
 do_cleanall_apt[nostamp] = "1"
 do_cleanall_apt() {
     for uri in "${SRC_APT}"; do
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 320102ba..af833536 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -26,7 +26,7 @@ do_install_builddeps() {
 }
 
 addtask install_builddeps after do_prepare_build before do_dpkg_build
-do_install_builddeps[depends] += "isar-apt:do_cache_config"
+do_install_builddeps[depends] += "${BUILDCHROOT_DEP} isar-apt:do_cache_config"
 # apt and reprepro may not run in parallel, acquire the Isar lock
 do_install_builddeps[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
 
