summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/buildhistory.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index c8fd68c39e..36e7fe13be 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -319,7 +319,11 @@ buildhistory_get_installed() {
319 list_installed_packages file | sort > $pkgcache 319 list_installed_packages file | sort > $pkgcache
320 320
321 cat $pkgcache | awk '{ print $1 }' > $1/installed-package-names.txt 321 cat $pkgcache | awk '{ print $1 }' > $1/installed-package-names.txt
322 cat $pkgcache | awk '{ print $2 }' | xargs -n1 basename > $1/installed-packages.txt 322 if [ -s $pkgcache ] ; then
323 cat $pkgcache | awk '{ print $2 }' | xargs -n1 basename > $1/installed-packages.txt
324 else
325 printf "" > $1/installed-packages.txt
326 fi
323 327
324 # Produce dependency graph 328 # Produce dependency graph
325 # First, filter out characters that cause issues for dot 329 # First, filter out characters that cause issues for dot