diff --git a/modules/steps.py b/modules/steps.py
index a6ec341..b3ec61c 100644
--- a/modules/steps.py
+++ b/modules/steps.py
@@ -36,7 +36,7 @@ def load_env(devtool, bb, git, opts, group):
     os.mkdir(group['workdir'])
     for pkg_ctx in group['pkgs']:
         pkg_ctx['env'] = bb.env(pkg_ctx['PN'])
-        pkg_ctx['recipe_dir'] = os.path.dirname(pkg_ctx['env']['FILE'])
+        pkg_ctx['recipe_dir'] = os.path.realpath(os.path.dirname(pkg_ctx['env']['FILE']))
 
 def buildhistory_init(devtool, bb, git, opts, group):
     if not opts['buildhistory']:
diff --git a/modules/utils/bitbake.py b/modules/utils/bitbake.py
index 5514c98..f6821bc 100644
--- a/modules/utils/bitbake.py
+++ b/modules/utils/bitbake.py
@@ -123,8 +123,12 @@ class Bitbake(object):
             env = "TCLIBC={}".format(libc)
         else:
             env = ""
-        bb.process.run("bitbake-config-build enable-fragment machine/{}".format(machine))
-        return self._cmd(recipe, env_var=env)
+        try:
+            bb.process.run("bitbake-config-build enable-fragment machine/{}".format(machine))
+        except bb.process.ExecutionError:
+            # bitbake-config-build not available (e.g. scarthgap), use MACHINE env var
+            env = "MACHINE={} {}".format(machine, env).strip()
+        return self._cmd(recipe, env_var=env if env else None)
 
     def dependency_graph(self, package_list):
         return self._cmd(package_list, "-g")
diff --git a/upgrade-helper.py b/upgrade-helper.py
index 40f31c4..aef7ed1 100755
--- a/upgrade-helper.py
+++ b/upgrade-helper.py
@@ -714,6 +714,15 @@ class UniverseUpdater(Updater):
             pkggroups = oe.recipeutils.get_recipe_upgrade_status(layer_recipes)
 
             for group in pkggroups:
+
+                # Scarthgap returns flat tuples; normalize to list-of-dicts
+                # so the existing loop handles both formats.
+                if not isinstance(group, (list, tuple)) or not group or not isinstance(group[0], dict):
+                    pn, status, cur_ver, next_ver, maintainer, revision, no_upgrade_reason = group
+                    group = [{'pn': pn, 'status': status, 'cur_ver': cur_ver,
+                              'next_ver': next_ver, 'maintainer': maintainer,
+                              'revision': revision, 'no_upgrade_reason': no_upgrade_reason}]
+
                 upgrade_group = []
                 for pkg in group:
                     maintainer = pkg['maintainer']
