History log of /haikuporter/HaikuPorter/Main.py
Revision Date Author Comments
# f197120d 18-Sep-2023 jurgenwigg <53076001+jurgenwigg@users.noreply.github.com>

Import statements sorted with isort and fixed MockBuilder.py (#266)

* Fixed missing closing bracket in the MockBuilder.py

* Import statements sorted with isort


# adc25c23 11-Mar-2023 Peter van Dijk <peter@7bits.nl>

respect --quiet flag in repository commands (#246)


# 5b68eec0 12-Jun-2021 Panagiotis Vasilopoulos <hello@alwayslivid.com>

python3: Use input instead of raw_input

- Fixes https://github.com/haikuports/haikuporter/issues/215
- raw_input() has been deprecated and replaced with input()


# 61901115 31-Jan-2020 Alexander von Gluck IV <kallisti5@unixzen.com>

python3: Fix missed itervalues -> values


# 8d5c14b6 31-Jan-2020 Michael Lotz <mmlr@mlotz.ch>

python3: Finish python3 change. python2 breaking

* Based on mmlr's 2017 work to use Python3 with
changes and adjustments for the current codebase


# e2012a3d 31-Jan-2020 Alexander von Gluck IV <kallisti5@unixzen.com>

python3: begin python3 fixes. print -> print()


# 22416339 21-Jan-2020 François Revol <revol@free.fr>

Add a --check-ports-releases option to check for new upstream releases

This should help monitoring releases from upstream projects,
and make sure to test and update the recipes accordingly.

For now it only checks releases/tags at GitHub, maybe we should check
at repology.org instead.

Also it doesn't attempt to sort the tags, but only checks for the first one,
so in some cases it doesn't work (like with cronie-crond/cronie).

At least it works for qtkeychains which are a bit reluctant to merge Haiku
support in fear it might bitrot in the future.


# b88dc4a9 30-Mar-2018 Michael Lotz <mmlr@mlotz.ch>

Rename --list-build-dependencies option to --list-dependencies.

Print out test dependencies when combined with --test, otherwise print
build dependencies as before.


# 5a6e650b 30-Mar-2018 Michael Lotz <mmlr@mlotz.ch>

Main: Build unbuilt ports before testing.

Build the port automatically instead of just instructing the user to
do so before testing.


# 3d118f80 17-Mar-2018 Michael Lotz <mmlr@mlotz.ch>

Introduce TEST_REQUIRES for test-only requires.

This lets recipes specify dependencies that are only needed for the test
phase. Separating them out from BUILD_[PRE]REQUIRES allows for
situations that could otherwise result in cyclic dependencies.

Note that this bumps the repository format version, causing a repository
rebuild (re-parsing of all recipes, flushing of all caches). This is
required because the dependency info files and various caches need to be
regenerated to cope with the added test requires keys.

Fixes #151.


# 06e0fbc4 17-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Repository: Add --check-repository-consistency.

It dependency solves all active ports and prints out the problems found.


# 89af82b6 10-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Cleanup: Remove unused imports.


# 269954fb 10-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Cleanup: Make some constructs more idiomatic.

* Change 'not x in y' to 'x not in y'.
* Use 'is' to compare None singleton.
* Use 'instanceof(x, y)' instead of 'type(x) == y'.
* Replace map builtin with list comprehension.
* Rename self argument to cls for static method.


# 14652091 10-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Cleanup: Remove trailing semicolons and a unneeded pass.


# 9836ce60 10-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Cleanup: Whitespace and line length cleanup.


# 383a886f 06-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Main: BuildMaster mode implies --all-dependencies.


# 71659df0 06-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Main: Only import DisplayContext when needed.

When used in a bootstrap environment, ncurses may not be available.


# 4a28ff6c 05-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

PackageRepository: Implement repository consistency checking.

It runs dependency resolution for each package and prints the problems
found.


# 23dd81c2 02-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Repository/Port: Force allow unstable if explicitly requested.

When an unstable port is explicitly requested, a prompt allows to
continue. Since the port is unstable, the actual generation of the
dependency info was still skipped however.

Force allowing unstable ports when an explicit version was requested.
Since the port packages are filtered by their status as well, also
force reparsing (and therefore recreating the package list) of the
port recipe.


# 9f89104f 02-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Repository/Main: Rework handling of obsolete port building.

Repository: The method supportBackwardsCompatibility was a near 100%
duplicate of the original _updateRepository (with all of it's
shortcomings) except that it skipped everything that didn't match the
port/version parameters. Remove it completely and port over the explicit
port version selection into an optional parameter of _updateRepository.

Main: Factor out a _setupForPossiblyObsoletePort method and use it from
_buildMainPort and _buildPort. This ensures that the package redirection
happens in all cases and make the warning message reflect that
redirection.

This has the nice side effect that built dependencies that are actually
the latest version will not be put into the obsolete directory anymore
and therefore fixes the initial part of #22.

Also only call supportBackwardsCompatibility if the version actually
isn't the active one, since the operation is somewhat expensive and
produces otherwise confusing output.


# e0451507 02-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

BuildPlatformUnix: Add B_SYSTEM_PACKAGES_DIRECTORY override.

This allows --analyze-dependencies to work also on this platform when
given a --system-packages-directory.

Shallow init is also enough for --analyze-dependencies.


# 9ba99080 02-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Main: Shallow init is enough for --why.


# 25319489 02-Dec-2017 Michael Lotz <mmlr@mlotz.ch>

Port: Rework configuration of repository dir.

Use a class variable and a setter to make the repository dir known to
Port and add a context manager for temporarily adjusting the repository
dir of specific ports.

This removes the need to hand in the repository dir to various methods,
which makes things more consistent. Some methods were previously using
the repository dir given to the constructor while others needed it as
argument.

The Repository now makes itself known to Port and can change the current
repository dir for the purpose of populating a new repository at a
different path.

With this, the ugly manual adjustment of the recipe cache of the Port by
the Repository can be removed. It was directly changing internals of
Port but used slightly different logic than within Port which lead to
two different filenames being used for the recipe cache file. This
caused recipes to be parsed once unnecessarily.


# 66bb5613 26-Nov-2017 Michael Lotz <mmlr@mlotz.ch>

Main: Fix typo: The printed list are build deps, not built ones.


# 73d1fd7b 19-Nov-2017 Michael Lotz <mmlr@mlotz.ch>

Main: Fix wrong port being recorded as skipped in buildmaster.


# 00a1c0ca 19-Nov-2017 Michael Lotz <mmlr@mlotz.ch>

Main: Exit buildmaster when instructed to build obsolete ports.

This can happen when dependencies require specific versions that are
not active.

For example this may happen when already present packages were built
against a version of a port that is later deactivated. In such a case,
these packages need to be rebuilt to not depend on the unavailable
port anymore. They would otherwise be uninstallable in any case.


# 9764f8f1 16-Nov-2017 Michael Lotz <mmlr@mlotz.ch>

Main: Shallow init is enough for --create-package-repository.


# f8773d23 09-Nov-2017 Michael Lotz <mmlr@mlotz.ch>

BuildMaster: Make skip reason include unresolved dependencies.

Also drop the verbose debug output of used repositories.


# fa7b047f 08-Nov-2017 Michael Lotz <mmlr@mlotz.ch>

BuildMaster: Collect and expose skipped builds.

Builds that cannot be run due to some error condition are now displayed
in the frontend with the respective reason.


# 331ee925 08-Nov-2017 Michael Lotz <mmlr@mlotz.ch>

Main: Sort the package list output of --list-build-dependencies.

This makes it easier to read.


# 7679634f 07-Nov-2017 Michael Lotz <mmlr@mlotz.ch>

PackageRepository: Implement repository creation.


# 86abd0a3 04-Nov-2017 Michael Lotz <mmlr@mlotz.ch>

PackageRepository: Add class to manage the packages directory.

Initially it allows pruning packages, which does:

* Obsolete packages that are newer than the active port version, with
the assumption that the active version was downgraded.
* Obsolete packages that have newer version packages available.

This is slightly different from normal package obsoletion in that it
does keep older versions of packages as long as no newer ones are
available.

The use case for this is to prepare a packages directory to be usable
for repo creation and continuous updates.


# 53bb5133 04-Nov-2017 Michael Lotz <mmlr@mlotz.ch>

Main: Fix explicit repository update to not expect search arg.

The repository update would still happen, but an error about the
expected search string was printed.


# 979203f5 20-Oct-2017 Michael Lotz <mmlr@mlotz.ch>

Add option --ports-for-packages to find port of resulting HPKG.


# d3584445 20-Oct-2017 Michael Lotz <mmlr@mlotz.ch>

Add --purge option to clean the work dir and remove downloads.


# d9653cd0 15-Oct-2017 Michael Lotz <mmlr@mlotz.ch>

Main: Print reason for build dependency resolution error.


# 97bd83c5 08-Aug-2017 Michael Lotz <mmlr@mlotz.ch>

BuildMaster: Fix TODO about hardcoded ports tree URL.

Determine the local ports tree origin and use that.


# ee18ae06 05-Aug-2017 Michael Lotz <mmlr@mlotz.ch>

Main: Use both packagesPath and systemPackagesDirectory if set.

This allows to consider a separate set of packages in dependency
resolution and therefore avoids the need to put such dependencies into
the packagesPath.


# f61547f2 05-Aug-2017 Michael Lotz <mmlr@mlotz.ch>

BuildMaster: Use paths, not names, of present packages.

This allows to source them from multiple package directories.


# 6397ae2a 20-Jun-2017 Jerome Duval <jerome.duval@gmail.com>

Main: --list now also supports --print-filenames.

Easier to find the active recipe for a port.


# ff67e409 13-May-2017 Sergei Reznikov <diver@gelios.net>

Fix initial ports tree checkout


# 7aef5fe1 01-Apr-2017 Alexander von Gluck IV <kallisti5@unixzen.com>

haikuporter: no-dependencies now default behaviour

* Inverse --all-dependencies added which will
build all outdated dependencies of a port.
* Your fingers will thank me.


# 180b2367 06-Feb-2017 fbrosson <fbrosson@users.noreply.github.com>

Configuration: new optional REPOSITORY_PATH parameter (#115)

to allow relocation/specification of the repository directory.

While at it, drop the suffix ('-' + $targetArchitecture) that
was added to the default path for the repository directory in
the previous commit. The default path is therefore restored:
$OUTPUT_DIRECTORY/repository/

Reminder: the default OUTPUT_DIRECTORY is $TREE_PATH.


# 3a5b9d7f 27-Oct-2016 Jerome Duval <jerome.duval@gmail.com>

Add a console mode.


# 68e3958c 23-Oct-2016 Jérôme Duval <jerome.duval@gmail.com>

Implement local builders.

* provide info(), warn() to be used instead of print. By default outputs to stdout.
For builders, outputs to files.
* replace most calls to check_call by check_output, and log with info(). Also outputs
the outputs an eventual CalledProcessError output attribute.
* add option --local-builders to be used with --build-master: indicates how many
local builders to use instead of remote builders. If paramiko isn't available,
defaults to 1, otherwise 0.
* rename Builder to RemoteBuilder.
* remove changes of current directory: this doesn't work in a
multithreaded environnement. Policy.py is the most affected as it
expected to run in the packaging directory.


# 71a83f90 18-Dec-2016 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Use Unicode strings for warn() & sysExit().


# 00262596 15-Nov-2016 Jérôme Duval <jerome.duval@gmail.com>

Avoid using git when noGitRepo option is given. (#100)


# 2d014abd 23-Jul-2016 waddlesplash <waddlesplash@gmail.com>

Main: Replace another instance of str.lower with unicode.lower.

Another instance of #82. I didn't test this very well, I'm mostly going off of @ed-dismantle's comment that this is the right thing to do.


# 636eba12 25-Jan-2016 DarkmatterVale <valetolpegin@gmail.com>

Fix error where --get doesn't work


# 6fdfb661 20-Jan-2016 DarkmatterVale <valetolpegin@gmail.com>

Fix support for building older versions of packages


# fdbcc2f2 19-Dec-2015 Michael Lotz <mmlr@mlotz.ch>

Add option to explicitly request repository update only.


# ed96b570 16-Dec-2015 Michael Lotz <mmlr@mlotz.ch>

Add option to print ports affected by file list.

It checks all [active] ports and prints those that reference at least
one of the supplied files.


# f8d9efc6 16-Dec-2015 Michael Lotz <mmlr@mlotz.ch>

Source: Rename and generalize additional file extraction.

This is now used to populate the work dir with referenced additional
files in additon to populating them in the source package.

Additional files are now populated into the chroot at
/additional-files[-<index>] analogous to source directories.


# c0bfbec5 05-Dec-2015 Michael Lotz <mmlr@mlotz.ch>

Main: Allow non-fatal validation of ports in build master mode.

Return a result instead of prompting/exiting when building obsolete
packages. Ports that do not validate are then skipped.


# cd49a48d 05-Dec-2015 Michael Lotz <mmlr@mlotz.ch>

Add option --ignore-messages to avoid message prompts.

This option is also implied by build master mode.


# 0b9c9f36 30-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Add --print-filenames option to resolve package names.

Package listings and searches then resolve and return the package file
names instead of the package names. Note that this is horribly
inefficient due to the way the current version of packages is currently
determined.


# 52a0d80c 25-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Add option to suppress obsoletion of packages.

While the dependency info should be purged when a new version becomes
available, the packages should stay available in buildmaster mode and
on builders where no system dependencies may be used.


# a24c6b19 25-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Main: Make build failure more expressive.

Also catch some of the failures in buildmaster mode and make them
non-fatal. As there may be a whole list of other ports to build it
doesn't make sense to abort early.


# cec0d561 25-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Main: Make non-buildability non-fatal in buildmaster mode.


# f4125332 25-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Add --print-raw option to make some outputs machine readable.


# 4c3b52f7 25-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Main: Apply search to all supplied args.


# 7057280b 25-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

BuildMaster: Sync builder portstree with the one of the master.


# fb621e7f 22-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Add BuildMaster mode and class.

Instead of building itself it distributes builds to builders via SSH
and coordinates pushing the dependencies around as needed.


# e6fd31f1 22-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Add option --list-build-dependencies to list all dependencies.

This includes the list of already present packages as well as the list
of packages that need to be built and their corresponding port.


# e71b6cf9 22-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Allow shallow init for the about option.


# 97961375 21-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Add option --no-system-packages to constrain used packages.

If supplied the system packages directory will not be added to the
list of package repositories used to resolve dependencies.

This means that only local packages from the packages path will be used
for the search of all dependency packages, including the search for the
main Haiku package itself. It therefore requires one to provide all
needed packages as part of the local packages but allows for more
control over what exact packages are visible.


# e16e5898 21-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Update documentation to refer to git instead of svn.


# dfbb7bf2 21-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Allow specifying multiple ports to operate on.

All remaining arguments are treated as port specifications.


# 07cc637c 21-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Add options to search/list packages in addition to ports.


# e7dc6377 21-Nov-2015 Michael Lotz <mmlr@mlotz.ch>

Configuration: Allow relocation/specification of packages path.


# 0d2c9714 02-Jul-2015 Augustin Cavalier <waddlesplash@gmail.com>

Main: Fix printing output of SystemExit when "code" is not an "int".


# def221af 01-Jul-2015 Augustin Cavalier <waddlesplash@gmail.com>

When linting recipes, exit with 1 if one or more of the lints failed.

This also fixes the main exception handler to not print the exception
if the exception is a "SystemExit".


# ff5f53eb 07-Jun-2015 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Add --get-dependencies option to haikuporter.

This will automatically search for packages with pkgman,
which get installed to your system. Use with caution!

Using --get-dependencies automatically sets --no-dependencies,
so you'll still need to manually build packages which aren't
available using pkgman.


# eea1453e 06-Jan-2015 Oliver Tappe <zooey@hirschkaefer.de>

Fix #56: --lint not working on non-Haiku platform.

* Suppress platform check for all options that only require a shallow
initialization.


# 35a5732b 14-Dec-2014 Oliver Tappe <zooey@hirschkaefer.de>

Drop support for $haikuVersion.

* Referring the current haiku version explicitly is not needed, since
the RequiresUpdater takes care of setting the version of Haiku used
for building a package.


# 964fcd9d 03-Dec-2014 Oliver Tappe <zooey@hirschkaefer.de>

Fix #43: output for --location is missing the category.

* Additionally, improve output for --list (sorted) and --search (show
category), too.


# c2da0935 27-Nov-2014 Oliver Tappe <zooey@hirschkaefer.de>

Minor optimization: use set instead of list.


# 797d2b92 21-Nov-2014 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup imports.


# 476dbcbe 20-Nov-2014 Oliver Tappe <zooey@hirschkaefer.de>

Refactoring: use properties where it seems fit.

* Trying to be somewhat more Pythonic.


# fc1d58c6 29-Oct-2014 Charlie Clark <charlie.clark@clark-consulting.eu>

Revert to tab spacing for Pe's sake.


# a5f922e3 27-Oct-2014 Charlie Clark <charlie.clark@clark-consulting.eu>

Try again with whitespace.


# 558fbdb0 27-Oct-2014 Charlie Clark <charlie.clark@clark-consulting.eu>

Second attempt to fix whitespace. Options are different on OS X.


# 429ec015 27-Oct-2014 Charlie Clark <charlie.clark@clark-consulting.eu>

Convert tabs to spaces.


# 7e66536b 15-Jun-2014 Oliver Tappe <zooey@hirschkaefer.de>

Minor improvements of output, suggested by Diver.

* Show full recipe path in output header for a specific port.
* Show full path of resulting packages in output footer.


# 706a6695 31-May-2014 Oliver Tappe <zooey@hirschkaefer.de>

Automatic whitespace cleanup - no functional change intended.


# e0963638 31-May-2014 Oliver Tappe <zooey@hirschkaefer.de>

Simplify conversion from package-name/ID to port-name/ID.

* adjust getPortIdForPackageId() and getPortNameForPackageName()
to check if the given parameter is already valid, simplifying
the loop, too
* drop explicit checks before invocation of getPortIdForPackageId()


# a7a38f1e 24-Apr-2014 Oliver Tappe <zooey@hirschkaefer.de>

Minor cleanup: avoid use of os._exit().

* os._exit() doesn't invoked cleanup handlers, so it should be avoided.
* Additionally, replace invocations of sys.exit() by return as the
former doesn't seem to yield a exit code of 0.


# 98cfa6f0 24-Apr-2014 Oliver Tappe <zooey@hirschkaefer.de>

Only require LICENSES_DIRECTORY when it is needed.

* The only informational command that needs it is --lint.


# b80783df 24-Apr-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

lint: Accept full recipe name / version, or just name

* If user specifies the full recipe name / version, we
return a proper return code to detect issues.


# 13acea28 24-Apr-2014 Oliver Tappe <zooey@hirschkaefer.de>

Allow informational commands (e.g. --lint) to run on Linux.

* Introduce support for shallow initialization to Main and
BuildPlatform classes and make use of that for the informational
commands.


# 0a724667 21-Apr-2014 Oliver Tappe <zooey@hirschkaefer.de>

Introduce explicit recipe format version.

* Added support for reading the recipe format version used by a ports
tree from the file 'FormatVersions'.
* Added check that ensures that the recipe format version of a given
ports tree matches the one supported by haikuporter.


# 54bad928 17-Apr-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

lint: Language cleanup


# a58e5be5 17-Apr-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

lint: Allow users to scan port names

* You can now specify a port name with --lint
to lint scan a single port.
* You have to pass the basename for this to work
(you can't pass recipe versions yet)
* Example: ./haikuporter --lint llvm
* --lint with no package name results in a full
tree scan as before.
* Improvements welcome


# 38ab1ad0 22-Feb-2014 Oliver Tappe <zooey@hirschkaefer.de>

Revert "Allow fixing of the port versions put into the repository."

* due to to way the build system works, this is an incomplete
solution to the problem, so it makes no sense

This reverts commit 939d630b79c96c00fe3adb5791ff2be252ec5d22.


# 939d630b 15-Feb-2014 Oliver Tappe <zooey@hirschkaefer.de>

Allow fixing of the port versions put into the repository.

* explicit port versions specified via a portsfile are now respected
when the repository is being populated


# a2c3f20c 24-Dec-2013 Puck Meerburg <puck@puckipedia.nl>

Add Verbose option


# a40440df 16-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Adjust behaviour of --clean to only clean, but not build.

* --clean now only removes the work-dir of the port(s) given via cmdline,
none of them will be built


# c11e2b73 16-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Refactor setup of chroot and reactivate port testing

* refactor setup of chroot such that it can be used for more than building
* re-add support for testing a port (--test)


# 1953531f 16-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add --debug option for showing Python stacktraces on errors.

* by default, Python stack traces are no longer printed, use --debug when
you want to see them


# dd22b56e 15-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix use of non-existing function in implementation of --why


# 0682f553 01-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Print summary for policy violations when done.


# 5a8e0228 01-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

During bootstrap, skip all existing packages.

* before, only existing packages with cyclic dependencies were
being skipped, which doesn't make much sense


# 5243956e 27-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Extend --do-bootstrap to build all available ports.

* after building ports with circular dependencies, --do-bootstrap will
trigger a build of all available ports, too
* additionally: take notice of the ports built in a haikuporter session
and avoid building them again


# 971fbd6e 25-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix error when using --lint.


# a695da08 24-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Improve implementation of --why option.

* no longer require full port specs (name+version) as argument to --why,
but use the active version if only a name is given
* instead of showing a (confusing) error message, just show the output
from pkgman as to what problems are caused when the given port is
not available


# 09f72a55 22-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add option --create-source-packages

It builds (only) the regular source packages.


# d1d926cb 16-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

In --do-bootstrap mode skip already built ports


# 459c4977 07-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add option --no-dependencies.

* --no-dependencies will tell haikuporter to ignore any dependencies
and just build the port(s) given


# 80b35d56 07-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add option --do-bootstrap

* --do-bootstrap takes care of building the ports with cyclic
dependencies in a working order


# 029ccfaf 06-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Restructure DependencyAnalyzer a bit.

* let __init__ only compute the different groups of nodes and print
them in printDependencies()
* keep full set of ports with cyclic dependencies (i.e. do not leave
out ports required by HaikuPorter directly)


# fa6312f4 06-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Adjust creation and handling of source packages
* rename option 'only-source-packages' to
'create-source-packages-for-bootstrap', as it does a bit more than
just limit to creation of source packages
* rename option 'nosrcpackage' to 'no-source-packages' and adjust the
behaviour to never create source packages in this case (instead of
only avoiding default source packages)
* source packages that are being created for the bootstrap image now
contain the source with all patches applied (as git isn't available
in the bootstrap image), standard source packages contain pristine
sources


# 61b6b41f 06-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't try to build source package for ports that don't have one


# 04a0180d 06-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Also allow specifying a package name/ID on the command line


# b564eb23 04-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Implement strict separation of buildhost and target packages.

* REQUIRES and BUILD_REQUIRES refer to target architecture packages,
while BUILD_PREREQUIRES refers to buildhost architecture packages
* added support for building prerequired packages when needed
* add a separate set of implicit target packages to BuildPlatformUnix,
which only contains the 'haiku' package


# 412b5b2d 03-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Minor cleanup.


# 5eff433f 01-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Whitespace cleanup


# dca66113 29-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add support for meta-ports, specifically 'meta_portsfile'

* a meta-port is a port that just builds other (non-meta) ports, but it
doesn't provide any sources or build actions of its own
* when building a list of ports specified via --portsfile, the meta-
port 'meta_portsfile' is now being used to group all the required
ports (pulling in any runtime requirements, too)
* when building only source packages, consider all packages stable, as
otherwise sources for not-yet-stable packages could not be collected
(one would have to mark them as stable manually)
* add more missing implicit build provides to Unix build platform


# 41f59d9f 29-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup: reduce code duplication a bit.

* add Port.isBuildableOnTargetArchitecture() as well as
Package.isBuildableOnArchitecture() and make use of them
* introduce Repository.getActiveVersionOf() for determining
the currently active version of a port in the repository


# 5c36471c 28-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

More work on building only source packages.

* building source packages for a list of ports is now basically
possible, but the current limits of dependency resolution have
the effect that not all required ports are being pulled in


# a8ebbdd1 28-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix order when searching for a buildable version.


# 4f75ade5 21-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix import-related warnings and errors.


# 036f703c 19-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add support for separate output directory

* Add configuration file value OUTPUT_DIRECTORY specifying the directory
where haikuporter shall write files. It mirrors the ports repository
directory layout. The default value is the repository path.
* Add configuration file value DOWNLOAD_IN_PORT_DIRECTORY. Only
meaningful, if OUTPUT_DIRECTORY is specified. In that case a value of
"yes" will still cause the download directory to be placed in the port
directory. This may be useful when building for different target
architectures in separate output directories -- the downloads can thus
be shared.


# 99a61dae 19-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Unifiy the Options and GlobalConfig somewhat

* Module GlobalConfig is replaced with new module Configuration. The
global variable globalConfiguration is gone. Instead Configuration
provides getter methods.
* For several of the (newer) command line options there are now optional
configuration file entries. If given the command line values override
the configuration file values. Configuration also provides getter
methods for these options, which should be used instead of
getOption().


# e5266aef 19-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Clean up trailing whitespace


# dc3ed0f7 17-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix crossSysrootDir for non-Haiku build platforms

* BuildPlatform: Determine target architecture and cross sysroot dir.
Add respective getTargetArchitecture() and getCrossSysrootDirectory()
method.
* BuildPlatformUnix: Make getInstallDestDir() synonymous with
getCrossSysrootDirectory().
* Set the crossSysrootDir shell variable in
Port._updateShellVariables() instead of in Main. This way it gets
adjusted depending on whether we're in a chroot or not.


# c7c29d1f 14-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BuildPlatform*: move more initialization to init()


# 2b8a58d5 13-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Start with a build platform abstraction

* Add '--cross-devel-package' option to specify the path to the cross
development package. Can be used for cross-compiling.
* Add module BuildPlatform which exports a buildPlatform variable, which
is initialized to an instance of BuildPlatformHaiku or
BuildPlatformUnix as appropriate.
* Move findDirectory() to BuildPlatformHaiku. BuildPlatformUnix has a
version with some hard-coded mappings.
* Add PackageInfo class. Very simple ATM. It only extracts the version
and the architecture from a package file.
* Rework Main._initGlobalShellVariables() somewhat: Extracting the Haiku
version from the build platform's system haiku package is obviously
not correct when cross-building. Also add support for non-Haiku build
platforms.
* Remove no longer needed MachineArchitecture.getBuildTripleFor().


# f64bc093 07-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Improve handling of multiple available versions of a port:

* instead of always using the port with the highest version, now we
explicitly search for the newest version of a port that is buildable
on the requested target architecture


# 8acb4df0 07-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Minor cleanup:

* rename Port.getStatusOnCurrentArchitecture to
Port.getStatusOnTargetArchitecture() for clarification


# 5cd4c218 07-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix --location, --search and --about.

* additionally: make use of the repository info when searching/locating
ports


# 95fd6a8b 17-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add license header (MIT)

* additionally: uppercase copyright notices and separate them from the
top by a single line


# 8c38228c 10-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix contents of source packages.

* instead of putting the patched sources into the source packages, we
now export the unchanged sources
* instead of adding only the patches that were used for the build, we
now export every patch that could be relevant, i.e. patches for other
architectures, too
* Re-add lost ReadMe and extend it to include the haikuports-URL, the
haikuports-revision that was used and the haikuporter-URL
* move haikuportsRepoUrl from Main to Utils
* add haikuporterRepoUrl to Utils


# 92cd88a8 08-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Always use faked build machine if build-arch matches target-arch.

* we need to always use e.g. x86_gcc2_build as build machine triple
when building for x86_gcc2, as otherwise it wouldn't be a cross build.


# b11404b7 08-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup: unused imports, let classes inherit from object by default.


# 154a2976 08-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Drop HOST_ARCHITECTURE from general settings.

* Building for a host that's different from the build machine doesn't
seem to work reliably after all. Since it wouldn't be helping us much
anyway, we drop that idea.


# 560a87c1 07-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Rename cross-build sysroot folder and fix contents.


# 99cdb4d5 05-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add support for cross-sysroot in /boot/cross/<target-arch>

* pass environment variables isCrossRepository and targetArchitecture
to scriptlets that set up / tear down the chroot
* extend chroot-setup scriptlet to symlink the sysroot package into
a separate packages folder under /boot/cross/<target-arch> and
mount that folder
* extend chroot-tear-down scriptlet to unmount /boot/cross/<target-arch>


# 97248f4c 02-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Define explicit support for build, host and target architecture.

* added global configuration option HOST_ARCHITECTURE which defines the
architecture the resulting packages will be running on
* instead of TARGET_ARCHITECTURE, HOST_ARCHITECTURE has to be specified
for the cross-build repsository, TARGET_ARCHITECTURE needs only to be
set when it is different (e.g. when building gcc4 packages for a
x86_gcc2 Haiku)
* drop option '--target-arch', it doesn't make sense to switch the
target architecture on-the-fly, as the repository needs to be
repopulated after switching the architecture
* added boolean recipe type (YesNo)
* added global configuration option ALLOW_UNTESTED
* implement support for automatically accepting allowing untested ports
(via ALLOW_UNTESTED)


# b247776d 30-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add option -D for analyzing port dependencies

Currently it only prints the required system packages, the
self-depending ports, and the ports with cyclic dependencies.


# 8fb6d31b 29-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Main -> Repository: Move shutil import


# 7b2ae794 30-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup imports

* drop unneded imports
* add missing import to Repository


# a3bbcca6 29-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Move repository code from Main to new class Repository


# 9296f225 27-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

For cross-build repo, try to find target-arch specific port

* instead of having to give the target architecture explicitly as part
of the port name, one can now just give the base name (e.g.
'gcc_cross') and haikuporter will automatically append the current
target architecture and try to find the corresponding port this way.


# 5a01fb18 25-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Beginning of packaging policy checking

* Add class Policy which contains the checks. Currently only a few.
* Add command line option -S/--strict-policy to enable strict policy
checking. Instead of printing warnings, the packaging will be
aborted.


# 4b676be0 24-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Implement improved patch handling via implicit git repository

* unless the port already uses a git repository, automatically create
an empty git repository and import the sources of a port into it
* when applying patches, support both application of individual patches
(old style) and git patchsets
* automatically apply changes introduced by the patch function as
separate commit
* add new option --extract-patchset which can be used to (re-)create
a patchset (git format-patch) for a port from its git repo, taking
care to temporarily filter out the changes done by the patch function
* add new option --init-git that can be used to force importing of the
source into a new git repository (that's only done automatically when
there are already patches available for a port)


# 7f98685f 21-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

When no version has been given for a port, automatically pick the
most recent one in the repository.


# cf1cc9ad 19-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Pass on target architecture as environment variable


# e15a4b1f 15-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Work on support for cross-building

* add detection of cross-build repository (via file .cross in root)
* add support for specifying target architecture via --target-arch
or via TARGET_ARCHITECTURE in haikuports.conf
* pull MachineArchitecture out of Architectures.


# cd2b033f 08-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix problems when a port depends on a sub-package of another port.


# 4cfe75b1 08-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add new option --why

* this can be used to ask haikuporter which port pulls in the port
given via --why as a dependency of the main port


# c696d18e 05-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Print category of dependent ports, too.


# 9ef16dd0 05-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Implement support for building a list of ports read from a file.


# b744a876 04-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Implement support for more than one source per port.

* pull new class Source out of Port, which encapsulates download,
checksum-validation, checkout, unpacking and patching of a source
* adjust (and simplify) handling of source


# 66f3a316 28-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add shell variable jobArgs

There's already jobs, but that isn't that handy to use. jobArgs is
undefined in case of one job and defined to "-j<jobs>" otherwise.


# 8a3b8c4f 27-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Switch checkout of haikuports-tree to git


# 4c0e7d86 27-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Make sure that touching a file really bumps the modification date.


# 643478bd 26-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix cleanup of broken recipes.

* when a recipe used to work, but is broken now, remove corresponding
package-info and obsolete any corresponding packages, too


# d811dfd6 25-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix "-b" option

It wouldn't do anything.


# e8ebc145 24-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Automatically unset the build flag when recipe is newer


# e9a1459d 24-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Whitespace-related cleanup


# 8c70b85e 24-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Treat building of obsolete packages more explicitly

* give warning when an obsolete package is being built and put the
resulting package(s) into the '.obsolete'-subfolder of the packages
directory


# 36797feb 24-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Improve repository management.

* consistently maintain only a single version of a port in the
repository (the one with the highest version number that can be
parsed and is stable)
* automatically adjust the port version in the repository to any
recipe changes/additions/removals


# 0058f4fc 23-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Unbreak automatic detection of dependencies to update first

* the last commit changed the folder where dependent packages will
be found, so the corresponding filter has to be adjusted, too
* drop debug output


# aeb28cc2 22-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Implement automatic selection of newest version of each port

* this may have to be changed later, but it should for now avoid the
need to declare recipes as 'untested' on all architectures to avoid
them being added to the repository


# 9e0ea34a 22-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Update regexps for port name and version

Also change error output in _getAllPorts() from "Error:..." to
"Warning:...". There are quite a few recipe names that don't match
anymore.


# be9a76d3 21-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Avoid show duplicate name during repository update

* as there can be more than a single package per port now, we better
show the packageID instead of the portID


# 3b7d2ca4 19-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

* improved indication of progress when populating the repository


# 1794893b 18-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Switch name-internal separator from '-' (dash) to '_' (underline), as otherwise the package naming scheme exhibits potential collisions for parsers


# 062828ae 17-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

* pulled 'Package' out of 'Port' and adjusted everything to support creating multiple
packages from a single recipe file
Not many new features have been implemented yet, but building packages seems to work again.


# 3199e8eb 16-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

* remove reference to no longer existing option


# b143c59f 15-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix the fix: restore missing svnPath, too


# 993b1401 15-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

* restore implementation for --get (fetching/updating of haikuports-tree)
* drop --archive option, as we will provide source packages for that purpose


# df75ebb7 15-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Refactoring: rip haikuporter apart into separate modules


# ff5f53ebcb1b5a5216f89bd078d54675ded57f7e 07-Jun-2015 Jessica Hamilton <jessica.l.hamilton@gmail.com>

Add --get-dependencies option to haikuporter.

This will automatically search for packages with pkgman,
which get installed to your system. Use with caution!

Using --get-dependencies automatically sets --no-dependencies,
so you'll still need to manually build packages which aren't
available using pkgman.


# eea1453e76ef1cec8652de8c10bc7375dfa9148f 06-Jan-2015 Oliver Tappe <zooey@hirschkaefer.de>

Fix #56: --lint not working on non-Haiku platform.

* Suppress platform check for all options that only require a shallow
initialization.


# 35a5732b0cccd2441230c24a8b7ec3d158097f9e 14-Dec-2014 Oliver Tappe <zooey@hirschkaefer.de>

Drop support for $haikuVersion.

* Referring the current haiku version explicitly is not needed, since
the RequiresUpdater takes care of setting the version of Haiku used
for building a package.


# 964fcd9dad8aa711d4c36ff8eda4d87dd70bd753 03-Dec-2014 Oliver Tappe <zooey@hirschkaefer.de>

Fix #43: output for --location is missing the category.

* Additionally, improve output for --list (sorted) and --search (show
category), too.


# c2da09356af4a3b70d080ca54ab122f9d8c76b8a 27-Nov-2014 Oliver Tappe <zooey@hirschkaefer.de>

Minor optimization: use set instead of list.


# 797d2b925aa61ce548f35f9d3b255356c83f5936 21-Nov-2014 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup imports.


# 476dbcbe3fe6d63d35a2ac5db1b789f2434e04a4 20-Nov-2014 Oliver Tappe <zooey@hirschkaefer.de>

Refactoring: use properties where it seems fit.

* Trying to be somewhat more Pythonic.


# fc1d58c6abe57c99c11ec02b27be40844fb53572 29-Oct-2014 Charlie Clark <charlie.clark@clark-consulting.eu>

Revert to tab spacing for Pe's sake.


# a5f922e3fded4460be5a3c717862e7e588772487 27-Oct-2014 Charlie Clark <charlie.clark@clark-consulting.eu>

Try again with whitespace.


# 558fbdb04ff6cb063a4afba7f15b6f1bd0343af2 27-Oct-2014 Charlie Clark <charlie.clark@clark-consulting.eu>

Second attempt to fix whitespace. Options are different on OS X.


# 429ec015d0c47da50e302537ed33bc3f80d035a8 27-Oct-2014 Charlie Clark <charlie.clark@clark-consulting.eu>

Convert tabs to spaces.


# 7e66536bb9c30df73da9964601d8e4529af6c0b6 15-Jun-2014 Oliver Tappe <zooey@hirschkaefer.de>

Minor improvements of output, suggested by Diver.

* Show full recipe path in output header for a specific port.
* Show full path of resulting packages in output footer.


# 706a669517034546d39d83d92bc6386c26793071 31-May-2014 Oliver Tappe <zooey@hirschkaefer.de>

Automatic whitespace cleanup - no functional change intended.


# e096363865bb3704eff0d30ff701ffd3271d7ed2 31-May-2014 Oliver Tappe <zooey@hirschkaefer.de>

Simplify conversion from package-name/ID to port-name/ID.

* adjust getPortIdForPackageId() and getPortNameForPackageName()
to check if the given parameter is already valid, simplifying
the loop, too
* drop explicit checks before invocation of getPortIdForPackageId()


# a7a38f1eae98396807db2e519ea91f24621fd25a 24-Apr-2014 Oliver Tappe <zooey@hirschkaefer.de>

Minor cleanup: avoid use of os._exit().

* os._exit() doesn't invoked cleanup handlers, so it should be avoided.
* Additionally, replace invocations of sys.exit() by return as the
former doesn't seem to yield a exit code of 0.


# 98cfa6f03a91184fb4d3b6072685a4c050e13374 24-Apr-2014 Oliver Tappe <zooey@hirschkaefer.de>

Only require LICENSES_DIRECTORY when it is needed.

* The only informational command that needs it is --lint.


# b80783dfd086e78bcf69b98f7a7cd593ae665e76 24-Apr-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

lint: Accept full recipe name / version, or just name

* If user specifies the full recipe name / version, we
return a proper return code to detect issues.


# 13acea28e5d129c28fb09e2e2275c2373b4ce52c 24-Apr-2014 Oliver Tappe <zooey@hirschkaefer.de>

Allow informational commands (e.g. --lint) to run on Linux.

* Introduce support for shallow initialization to Main and
BuildPlatform classes and make use of that for the informational
commands.


# 0a7246673ab949f89489ddf5155bd7a09f112f3e 21-Apr-2014 Oliver Tappe <zooey@hirschkaefer.de>

Introduce explicit recipe format version.

* Added support for reading the recipe format version used by a ports
tree from the file 'FormatVersions'.
* Added check that ensures that the recipe format version of a given
ports tree matches the one supported by haikuporter.


# 54bad928a25a228ebb1a7605fd2ba3f9ba65a24f 17-Apr-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

lint: Language cleanup


# a58e5be5a8fea96ef4185233c0a0c144e65ad299 17-Apr-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

lint: Allow users to scan port names

* You can now specify a port name with --lint
to lint scan a single port.
* You have to pass the basename for this to work
(you can't pass recipe versions yet)
* Example: ./haikuporter --lint llvm
* --lint with no package name results in a full
tree scan as before.
* Improvements welcome


# 38ab1ad0ccc6280bd6862c4497eaf47512d85cf8 22-Feb-2014 Oliver Tappe <zooey@hirschkaefer.de>

Revert "Allow fixing of the port versions put into the repository."

* due to to way the build system works, this is an incomplete
solution to the problem, so it makes no sense

This reverts commit 939d630b79c96c00fe3adb5791ff2be252ec5d22.


# 939d630b79c96c00fe3adb5791ff2be252ec5d22 15-Feb-2014 Oliver Tappe <zooey@hirschkaefer.de>

Allow fixing of the port versions put into the repository.

* explicit port versions specified via a portsfile are now respected
when the repository is being populated


# a2c3f20cf55bc9703c841a47ef334c9b39d430ff 24-Dec-2013 Puck Meerburg <puck@puckipedia.nl>

Add Verbose option


# a40440dfaee1688c5f300ed5bb8ea5f14136f6fe 16-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Adjust behaviour of --clean to only clean, but not build.

* --clean now only removes the work-dir of the port(s) given via cmdline,
none of them will be built


# c11e2b73c1e33050c551b65e0ca4b64bef615628 16-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Refactor setup of chroot and reactivate port testing

* refactor setup of chroot such that it can be used for more than building
* re-add support for testing a port (--test)


# 1953531fac4d150b262bbdacab0e3e1b15a2d742 16-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add --debug option for showing Python stacktraces on errors.

* by default, Python stack traces are no longer printed, use --debug when
you want to see them


# dd22b56eaa291f5e0b7e2f5b517dea0c5155fabf 15-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix use of non-existing function in implementation of --why


# 0682f553df3d035e2b9fbcd537d1bb489b805150 01-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

Print summary for policy violations when done.


# 5a8e0228e90db2089ba22ae4a6945ed25eb3885d 01-Sep-2013 Oliver Tappe <zooey@hirschkaefer.de>

During bootstrap, skip all existing packages.

* before, only existing packages with cyclic dependencies were
being skipped, which doesn't make much sense


# 5243956e87f07809507623181cd6f53dc2e267ef 27-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Extend --do-bootstrap to build all available ports.

* after building ports with circular dependencies, --do-bootstrap will
trigger a build of all available ports, too
* additionally: take notice of the ports built in a haikuporter session
and avoid building them again


# 971fbd6edb653d95e0e136058e06d27c44acac56 25-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix error when using --lint.


# a695da08b3090ac71b5e080ba61df92fa12c5e29 24-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Improve implementation of --why option.

* no longer require full port specs (name+version) as argument to --why,
but use the active version if only a name is given
* instead of showing a (confusing) error message, just show the output
from pkgman as to what problems are caused when the given port is
not available


# 09f72a5570fb6e5b6cddb6463d58241fbd845604 22-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add option --create-source-packages

It builds (only) the regular source packages.


# d1d926cb3ddc2869f24f2054b5c2b10879ce7b5d 16-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

In --do-bootstrap mode skip already built ports


# 459c497718508fe6aa850e41200d47e27a74f158 07-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add option --no-dependencies.

* --no-dependencies will tell haikuporter to ignore any dependencies
and just build the port(s) given


# 80b35d569f1aeb3bafdfeaf30a228d031f676b9c 07-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add option --do-bootstrap

* --do-bootstrap takes care of building the ports with cyclic
dependencies in a working order


# 029ccfafc8afe02b844c7243d8962966ace9ae49 06-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Restructure DependencyAnalyzer a bit.

* let __init__ only compute the different groups of nodes and print
them in printDependencies()
* keep full set of ports with cyclic dependencies (i.e. do not leave
out ports required by HaikuPorter directly)


# fa6312f453eb9ae1a4d33a87aa5cf93d06029481 06-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Adjust creation and handling of source packages
* rename option 'only-source-packages' to
'create-source-packages-for-bootstrap', as it does a bit more than
just limit to creation of source packages
* rename option 'nosrcpackage' to 'no-source-packages' and adjust the
behaviour to never create source packages in this case (instead of
only avoiding default source packages)
* source packages that are being created for the bootstrap image now
contain the source with all patches applied (as git isn't available
in the bootstrap image), standard source packages contain pristine
sources


# 61b6b41f83dafd4db6087e34b8a1fa9267c085b4 06-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Don't try to build source package for ports that don't have one


# 04a0180d9db951aa04a5e93dcac40bbd027b4d28 06-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Also allow specifying a package name/ID on the command line


# b564eb2389381cff3b2adffaa775d92530220f59 04-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Implement strict separation of buildhost and target packages.

* REQUIRES and BUILD_REQUIRES refer to target architecture packages,
while BUILD_PREREQUIRES refers to buildhost architecture packages
* added support for building prerequired packages when needed
* add a separate set of implicit target packages to BuildPlatformUnix,
which only contains the 'haiku' package


# 412b5b2d9e3bb4e8c54a9383a14fa3809936a7a1 03-Aug-2013 Oliver Tappe <zooey@hirschkaefer.de>

Minor cleanup.


# 5eff433fb012c56441eeb321250193474da264b6 01-Aug-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Whitespace cleanup


# dca66113fe25cff7181c0df0226274dd3aeb273d 29-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add support for meta-ports, specifically 'meta_portsfile'

* a meta-port is a port that just builds other (non-meta) ports, but it
doesn't provide any sources or build actions of its own
* when building a list of ports specified via --portsfile, the meta-
port 'meta_portsfile' is now being used to group all the required
ports (pulling in any runtime requirements, too)
* when building only source packages, consider all packages stable, as
otherwise sources for not-yet-stable packages could not be collected
(one would have to mark them as stable manually)
* add more missing implicit build provides to Unix build platform


# 41f59d9f0f05cb2a8647a78069ea5ac282b79056 29-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup: reduce code duplication a bit.

* add Port.isBuildableOnTargetArchitecture() as well as
Package.isBuildableOnArchitecture() and make use of them
* introduce Repository.getActiveVersionOf() for determining
the currently active version of a port in the repository


# 5c36471c5d1cc377ae9021e3d5ca3e308e2c48cd 28-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

More work on building only source packages.

* building source packages for a list of ports is now basically
possible, but the current limits of dependency resolution have
the effect that not all required ports are being pulled in


# a8ebbdd1694240830179b08c1dd7e6d2b0bdff57 28-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix order when searching for a buildable version.


# 4f75ade5939a7c0f91c73e2b94e68611e6060d93 21-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix import-related warnings and errors.


# 036f703cba4efe93ccea4c5babcda5e195589019 19-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add support for separate output directory

* Add configuration file value OUTPUT_DIRECTORY specifying the directory
where haikuporter shall write files. It mirrors the ports repository
directory layout. The default value is the repository path.
* Add configuration file value DOWNLOAD_IN_PORT_DIRECTORY. Only
meaningful, if OUTPUT_DIRECTORY is specified. In that case a value of
"yes" will still cause the download directory to be placed in the port
directory. This may be useful when building for different target
architectures in separate output directories -- the downloads can thus
be shared.


# 99a61dae85929042affb1fe60e038aa4149261d5 19-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Unifiy the Options and GlobalConfig somewhat

* Module GlobalConfig is replaced with new module Configuration. The
global variable globalConfiguration is gone. Instead Configuration
provides getter methods.
* For several of the (newer) command line options there are now optional
configuration file entries. If given the command line values override
the configuration file values. Configuration also provides getter
methods for these options, which should be used instead of
getOption().


# e5266aef3a8b81f9e6d29e00fecd9da40aafa23b 19-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Clean up trailing whitespace


# dc3ed0f7ffb5329a3d8e96b7b920aca52ecc23a9 17-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix crossSysrootDir for non-Haiku build platforms

* BuildPlatform: Determine target architecture and cross sysroot dir.
Add respective getTargetArchitecture() and getCrossSysrootDirectory()
method.
* BuildPlatformUnix: Make getInstallDestDir() synonymous with
getCrossSysrootDirectory().
* Set the crossSysrootDir shell variable in
Port._updateShellVariables() instead of in Main. This way it gets
adjusted depending on whether we're in a chroot or not.


# c7c29d1f4903be58b233775bf732174ea6780f2d 14-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

BuildPlatform*: move more initialization to init()


# 2b8a58d5a6e9e88c974dc5a9600d9c769b47d8fd 13-Jul-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Start with a build platform abstraction

* Add '--cross-devel-package' option to specify the path to the cross
development package. Can be used for cross-compiling.
* Add module BuildPlatform which exports a buildPlatform variable, which
is initialized to an instance of BuildPlatformHaiku or
BuildPlatformUnix as appropriate.
* Move findDirectory() to BuildPlatformHaiku. BuildPlatformUnix has a
version with some hard-coded mappings.
* Add PackageInfo class. Very simple ATM. It only extracts the version
and the architecture from a package file.
* Rework Main._initGlobalShellVariables() somewhat: Extracting the Haiku
version from the build platform's system haiku package is obviously
not correct when cross-building. Also add support for non-Haiku build
platforms.
* Remove no longer needed MachineArchitecture.getBuildTripleFor().


# f64bc0930fbeef27f5c6ef105f64ff5634e4d1ba 07-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Improve handling of multiple available versions of a port:

* instead of always using the port with the highest version, now we
explicitly search for the newest version of a port that is buildable
on the requested target architecture


# 8acb4df0f1d0ae92c1b7f5d927636d6e4cdc5be9 07-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Minor cleanup:

* rename Port.getStatusOnCurrentArchitecture to
Port.getStatusOnTargetArchitecture() for clarification


# 5cd4c2184d8c21b5267bec05d1bf02b08cc02f4f 07-Jul-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix --location, --search and --about.

* additionally: make use of the repository info when searching/locating
ports


# 95fd6a8bd4d47186696c722b6717b2b073e799a1 17-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add license header (MIT)

* additionally: uppercase copyright notices and separate them from the
top by a single line


# 8c38228c4aeca34a4fa703e19788919ca91fdc39 10-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix contents of source packages.

* instead of putting the patched sources into the source packages, we
now export the unchanged sources
* instead of adding only the patches that were used for the build, we
now export every patch that could be relevant, i.e. patches for other
architectures, too
* Re-add lost ReadMe and extend it to include the haikuports-URL, the
haikuports-revision that was used and the haikuporter-URL
* move haikuportsRepoUrl from Main to Utils
* add haikuporterRepoUrl to Utils


# 92cd88a89b7ae7827afe0d336d4d1bde7de4bb5a 08-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Always use faked build machine if build-arch matches target-arch.

* we need to always use e.g. x86_gcc2_build as build machine triple
when building for x86_gcc2, as otherwise it wouldn't be a cross build.


# b11404b7d93a360dea4c1f3cf20b87a6986059ba 08-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup: unused imports, let classes inherit from object by default.


# 154a2976c5ee3f6e85c9a3d808875786ec206ade 08-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Drop HOST_ARCHITECTURE from general settings.

* Building for a host that's different from the build machine doesn't
seem to work reliably after all. Since it wouldn't be helping us much
anyway, we drop that idea.


# 560a87c12e42f67c3904267f17d907b511c36c60 07-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Rename cross-build sysroot folder and fix contents.


# 99cdb4d55c0432ffafd05d562333668a960a53f4 05-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add support for cross-sysroot in /boot/cross/<target-arch>

* pass environment variables isCrossRepository and targetArchitecture
to scriptlets that set up / tear down the chroot
* extend chroot-setup scriptlet to symlink the sysroot package into
a separate packages folder under /boot/cross/<target-arch> and
mount that folder
* extend chroot-tear-down scriptlet to unmount /boot/cross/<target-arch>


# 97248f4cda626f11d40259042c02497c51b09834 02-Jun-2013 Oliver Tappe <zooey@hirschkaefer.de>

Define explicit support for build, host and target architecture.

* added global configuration option HOST_ARCHITECTURE which defines the
architecture the resulting packages will be running on
* instead of TARGET_ARCHITECTURE, HOST_ARCHITECTURE has to be specified
for the cross-build repsository, TARGET_ARCHITECTURE needs only to be
set when it is different (e.g. when building gcc4 packages for a
x86_gcc2 Haiku)
* drop option '--target-arch', it doesn't make sense to switch the
target architecture on-the-fly, as the repository needs to be
repopulated after switching the architecture
* added boolean recipe type (YesNo)
* added global configuration option ALLOW_UNTESTED
* implement support for automatically accepting allowing untested ports
(via ALLOW_UNTESTED)


# b247776d23f290443e0b0e4f49608d974c7dda7f 30-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add option -D for analyzing port dependencies

Currently it only prints the required system packages, the
self-depending ports, and the ports with cyclic dependencies.


# 8fb6d31bcae09e70f415c06e27c2abc60ca62f48 29-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Main -> Repository: Move shutil import


# 7b2ae7946f722c6c483dbf9a7163196ac3079527 30-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Cleanup imports

* drop unneded imports
* add missing import to Repository


# a3bbcca6286b76cd7bfe93eea0ce256e8f8d215e 29-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Move repository code from Main to new class Repository


# 9296f225663f7cfd675f96b87ab97d51fb57f58c 27-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

For cross-build repo, try to find target-arch specific port

* instead of having to give the target architecture explicitly as part
of the port name, one can now just give the base name (e.g.
'gcc_cross') and haikuporter will automatically append the current
target architecture and try to find the corresponding port this way.


# 5a01fb18cf3173725fea0f26497863bdfb3846de 25-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Beginning of packaging policy checking

* Add class Policy which contains the checks. Currently only a few.
* Add command line option -S/--strict-policy to enable strict policy
checking. Instead of printing warnings, the packaging will be
aborted.


# 4b676be0e334bf72804d255310d326536ba0b9f4 24-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Implement improved patch handling via implicit git repository

* unless the port already uses a git repository, automatically create
an empty git repository and import the sources of a port into it
* when applying patches, support both application of individual patches
(old style) and git patchsets
* automatically apply changes introduced by the patch function as
separate commit
* add new option --extract-patchset which can be used to (re-)create
a patchset (git format-patch) for a port from its git repo, taking
care to temporarily filter out the changes done by the patch function
* add new option --init-git that can be used to force importing of the
source into a new git repository (that's only done automatically when
there are already patches available for a port)


# 7f98685f07f4c793d1b10cc0ae9e72ae993f5a58 21-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

When no version has been given for a port, automatically pick the
most recent one in the repository.


# cf1cc9ad25de517e18e2f1912b73d5f4587131a7 19-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Pass on target architecture as environment variable


# e15a4b1f28bac93ba0309a2b05b47a3f3f3296e5 15-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Work on support for cross-building

* add detection of cross-build repository (via file .cross in root)
* add support for specifying target architecture via --target-arch
or via TARGET_ARCHITECTURE in haikuports.conf
* pull MachineArchitecture out of Architectures.


# cd2b033f0304bef1e792540bfbc7df557e1daa87 08-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix problems when a port depends on a sub-package of another port.


# 4cfe75b1b0fd56c4b968374cd8840bce82d44ed9 08-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Add new option --why

* this can be used to ask haikuporter which port pulls in the port
given via --why as a dependency of the main port


# c696d18e69cf60b645a73c3d4719660f2848f4e3 05-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Print category of dependent ports, too.


# 9ef16dd0ab7cca1122d4c007bdac626a35384264 05-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Implement support for building a list of ports read from a file.


# b744a87694c856c779a62dacf0e8f18d848712e3 04-May-2013 Oliver Tappe <zooey@hirschkaefer.de>

Implement support for more than one source per port.

* pull new class Source out of Port, which encapsulates download,
checksum-validation, checkout, unpacking and patching of a source
* adjust (and simplify) handling of source


# 66f3a3169d30d5ac808b7bd2273229e3fc136564 28-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Add shell variable jobArgs

There's already jobs, but that isn't that handy to use. jobArgs is
undefined in case of one job and defined to "-j<jobs>" otherwise.


# 8a3b8c4f0706e6bcaad9153e9fbd3b5b844ce184 27-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Switch checkout of haikuports-tree to git


# 4c0e7d864ab6c28001866cef4eb028bce80da5a0 27-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Make sure that touching a file really bumps the modification date.


# 643478bd548bba269c6d3f852a82c97d4c377ec9 26-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix cleanup of broken recipes.

* when a recipe used to work, but is broken now, remove corresponding
package-info and obsolete any corresponding packages, too


# d811dfd66894d79bb653116c97c59e022d2728f5 25-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Fix "-b" option

It wouldn't do anything.


# e8ebc14529b8f63dce44d34b969e9abd9949c3a7 24-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Automatically unset the build flag when recipe is newer


# e9a1459db0ac13cedca985e8512284ba8b1a8ed9 24-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Whitespace-related cleanup


# 8c70b85edd403599aca9443ceb86bc4eca2479df 24-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Treat building of obsolete packages more explicitly

* give warning when an obsolete package is being built and put the
resulting package(s) into the '.obsolete'-subfolder of the packages
directory


# 36797febd5b6d5f449c55ffa350781db35a2a1b9 24-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Improve repository management.

* consistently maintain only a single version of a port in the
repository (the one with the highest version number that can be
parsed and is stable)
* automatically adjust the port version in the repository to any
recipe changes/additions/removals


# 0058f4fcd3883a94006172b05e1a64dce255710f 23-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Unbreak automatic detection of dependencies to update first

* the last commit changed the folder where dependent packages will
be found, so the corresponding filter has to be adjusted, too
* drop debug output


# aeb28cc24f64f82e91e5681a4e4576c2df4ae1ae 22-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Implement automatic selection of newest version of each port

* this may have to be changed later, but it should for now avoid the
need to declare recipes as 'untested' on all architectures to avoid
them being added to the repository


# 9e0ea34a3054dcbf080013d73c1e62d91784f851 22-Apr-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

Update regexps for port name and version

Also change error output in _getAllPorts() from "Error:..." to
"Warning:...". There are quite a few recipe names that don't match
anymore.


# be9a76d3d2d2c3a07a61bd471534556324147cb2 21-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Avoid show duplicate name during repository update

* as there can be more than a single package per port now, we better
show the packageID instead of the portID


# 3b7d2ca46bd24c573caefd1aa7a8190c1789277b 19-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

* improved indication of progress when populating the repository


# 1794893b089d147711be3efa15287b2db6ad2609 18-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Switch name-internal separator from '-' (dash) to '_' (underline), as otherwise the package naming scheme exhibits potential collisions for parsers


# 062828ae60e1d6b6a8b6a8d0f2be53294ac6f25b 17-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

* pulled 'Package' out of 'Port' and adjusted everything to support creating multiple
packages from a single recipe file
Not many new features have been implemented yet, but building packages seems to work again.


# 3199e8eba587b80d5d9199724fcde8264e0edd84 16-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

* remove reference to no longer existing option


# b143c59f596fe921973427f29187c8e4ed7b88df 15-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Fix the fix: restore missing svnPath, too


# 993b1401e7dfcccc2e81808ca0d2958821c87af1 15-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

* restore implementation for --get (fetching/updating of haikuports-tree)
* drop --archive option, as we will provide source packages for that purpose


# df75ebb7e7074e47c811442973afefed0360521d 15-Apr-2013 Oliver Tappe <zooey@hirschkaefer.de>

Refactoring: rip haikuporter apart into separate modules