[haiku-commits] Change in haiku[master]: Move source packages to a _sources_ directory.

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 25 Jan 2020 21:28:31 +0000

From Adrien Destugues <pulkomandy@xxxxxxxxx>:

Adrien Destugues has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/2157 ;)


Change subject: Move source packages to a _sources_ directory.
......................................................................

Move source packages to a _sources_ directory.

Installer already knows how to ignore that directory.

Fixes #15621.
---
M build/jam/ImageRules
M build/jam/OptionalPackages
2 files changed, 26 insertions(+), 2 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/57/2157/1

diff --git a/build/jam/ImageRules b/build/jam/ImageRules
index e182d87..3917ae1 100644
--- a/build/jam/ImageRules
+++ b/build/jam/ImageRules
@@ -1135,7 +1135,31 @@
        # Adds the given source packages for <packages> to the image.
 
        if $(HAIKU_INCLUDE_SOURCES) = 1 {
-               AddHaikuImagePackages $(packages)_source ;
+               packages = [ FFilterByBuildFeatures $(packages) ] ;
+
+               local package ;
+               for package in $(packages) {
+                       local resolvedPackage = [ IsPackageAvailable $(package) 
] ;
+                       if ! $(resolvedPackage) {
+                               Echo "AddHaikuImagePackages: package" $(package)
+                                       "not available!" ;
+                               continue ;
+                       }
+
+                       if ! [ on $(resolvedPackage) return 
$(HAIKU_PACKAGE_ADDED) ] {
+                               HAIKU_PACKAGE_ADDED on $(resolvedPackage) = 1 ;
+                               HAIKU_ADDED_PACKAGES += $(resolvedPackage) ;
+
+                               # download the package file and add it to the 
image
+                               local file = [ FetchPackage $(package) ] ;
+
+                               if $(HAIKU_UPDATE_ALL_PACKAGES) {
+                                       HAIKU_INCLUDE_IN_IMAGE on $(file) = 1 ;
+                               }
+
+                               AddPackageFilesToHaikuImage _sources_ : $(file) 
;
+                       }
+               }
        }
 }

diff --git a/build/jam/OptionalPackages b/build/jam/OptionalPackages
index 1853e0c..355d3cf 100644
--- a/build/jam/OptionalPackages
+++ b/build/jam/OptionalPackages
@@ -21,7 +21,7 @@

 # Haiku sources
 if $(HAIKU_INCLUDE_SOURCES) = 1 {
-       AddPackageFilesToHaikuImage system
+       AddHaikuImageSourcePackages _sources_
                :
                haiku_source.hpkg
                :

--
To view, visit https://review.haiku-os.org/c/haiku/+/2157
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Ibfac14c43dbe708316a0d82ca1c9d49b5cba2aef
Gerrit-Change-Number: 2157
Gerrit-PatchSet: 1
Gerrit-Owner: Adrien Destugues <pulkomandy@xxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: Move source packages to a _sources_ directory. - Gerrit