Skip to content

Commit

Permalink
Build the source package at a later stage.
Browse files Browse the repository at this point in the history
* The source package is now built only after a successful build - this should reduce
  waiting times considerably when working on ports with large source trees.
  • Loading branch information
olta committed Jun 15, 2014
1 parent 7e66536 commit bac7ea3
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions HaikuPorter/Port.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,13 +610,14 @@ def build(self, packagesPath, makePackages, hpkgStoragePath):

self._recreatePackageDirectories()

for package in self.packages:
if ((getOption('createSourcePackagesForBootstrap')
or getOption('createSourcePackages'))
and package.type != PackageType.SOURCE):
continue
os.mkdir(package.packagingDir)
package.prepopulatePackagingDir(self)
# populate all non-source packages
if (not getOption('createSourcePackagesForBootstrap')
and not getOption('createSourcePackages')):
for package in self.packages:
if package.type == PackageType.SOURCE:
continue
os.mkdir(package.packagingDir)
package.prepopulatePackagingDir(self)

if (getOption('createSourcePackagesForBootstrap')
or getOption('createSourcePackages')):
Expand Down Expand Up @@ -689,6 +690,16 @@ def failureFunction():
self.secondaryArchitecture, True)

if makePackages and not getOption('enterChroot'):
# create source package
for package in self.packages:
if package.type == PackageType.SOURCE:
os.makedirs(package.packagingDir)
package.prepopulatePackagingDir(self)
package.makeHpkg(self.requiresUpdater)

# cleanup packaging directory
shutil.rmtree(self.packagingBaseDir)

# move all created packages into packages folder
for package in self.packages:
if ((getOption('createSourcePackagesForBootstrap')
Expand Down Expand Up @@ -1282,9 +1293,6 @@ def _makePackages(self):
continue
package.makeHpkg(self.requiresUpdater)

# Clean up after ourselves
shutil.rmtree(self.packagingBaseDir)

def _doInstallStage(self):
"""Install the files resulting from the build into the packaging
folder"""
Expand Down

0 comments on commit bac7ea3

Please sign in to comment.