You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/09/21 21:30:06 UTC

[mynewt-newt] branch master updated: build: Skip config and transient packages

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git


The following commit(s) were added to refs/heads/master by this push:
     new 438d9b5  build: Skip config and transient packages
438d9b5 is described below

commit 438d9b57ed323a1114663f21d60bf95390db1200
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Wed Sep 21 10:46:22 2022 +0200

    build: Skip config and transient packages
    
    config and transient packages do not have any code by design, so there's
    no need to include them in build. This should fix the problem when
    package becomes transient at some point but .a for that package is
    present in build folder from an old build and is still included when
    linking image.
---
 newt/builder/buildutil.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/newt/builder/buildutil.go b/newt/builder/buildutil.go
index 599cec3..0610235 100644
--- a/newt/builder/buildutil.go
+++ b/newt/builder/buildutil.go
@@ -84,6 +84,9 @@ func (b *Builder) sortedBuildPackages() []*BuildPackage {
 	}
 
 	for _, bpkg := range b.PkgMap {
+		if bpkg.rpkg.Lpkg.Type() == pkg.PACKAGE_TYPE_CONFIG || bpkg.rpkg.Lpkg.Type() == pkg.PACKAGE_TYPE_TRANSIENT {
+			continue
+		}
 		sorter.bpkgs = append(sorter.bpkgs, bpkg)
 	}