summaryrefslogtreecommitdiff
path: root/baserockimport/mainloop.py
Commit message (Collapse)AuthorAgeFilesLines
* Add build system detectionRichard Ipsum2015-10-171-0/+6
| | | | Change-Id: Iaa1572cf3d5fd7baf96d2084f7194953bede634c
* Clone source repo into tempdirRichard Ipsum2015-08-251-30/+33
| | | | | | | | | | | Extensions will now be given a path to a clone of the checkout rather than a path to the checkout itself. This prevents untracked modifications and protects any data the user might have in the checkout dirs from the extensions themselves. It also helps prevent a possible bug where the extension corrupts a checkout so that on the second import the result differs from the first import. Change-Id: I95d551a02aa77d665ba07fb7ed5b01be330e24d4
* Add an ignore_version_field option to PackageRichard Ipsum2015-08-251-3/+6
| | | | | | | If we're using an external tool to resolve dependencies then we may be want to ignore the version field. Change-Id: Ic41f5b5ac080a5e9a0b4e1b0607464faabb1ec94
* Let parent packages pass metadata to their childrenRichard Ipsum2015-08-251-14/+47
| | | | | | | | | With this packages can pass metadata to their dependencies (children) by putting the path to the parent's foreign-dependencies file into the child's environment. This provides a flexible means for extensions to pass around extra data where necessary. Change-Id: I6446d02abd1a8d703c8ff88fe12b92345a0ee461
* Rework tag searchRichard Ipsum2015-08-251-12/+13
| | | | | | This should make it easier to search through a wider range of tag formats. Change-Id: Ie124a054d55b4a8800f11479e0389c16c97c53a8
* Rename lambda parametersRichard Ipsum2015-08-251-6/+8
| | | | Change-Id: I6ee07010fad5164c9a3a3d40f0b951a6c9d676f1
* Show errors encountered during import at the endRichard Ipsum2015-08-251-0/+5
| | | | Change-Id: I86d38e0116fc8b95dcd20c1d52b1b801cf16466c
* Simplify accessors in packageRichard Ipsum2015-08-241-3/+3
| | | | Change-Id: I38dc72c2348883abea56bd58a3195df4dc197c8a
* Make to_chunk stage optionalRichard Ipsum2015-08-241-46/+44
| | | | | | | | | Most CPAN distributions can be installed with a standard set of commands so we don't want to generate chunk morphs for each chunk. This also fixes stratum build dependency generation Change-Id: Ica51721b9b3809f91b8016c959202694d4bc6ea7
* Allow import tool to run as non-rootRichard Ipsum2015-06-031-1/+2
| | | | | | | | | Morph runs extensions in a separate mount namespace by default, but constructing this namespace requires root privileges. The import tool has no need for a separate mount namespace, so this commit disables it. Change-Id: I952885860100453e4a531589b6acca7e5dc31435
* Don't put "build-depends: []" in strataRichard Ipsum2015-05-291-1/+4
| | | | Change-Id: I53d655e09726b57abb69e04264ef685f26519356
* Add more possible namesbaserock/richardipsum/add-more-possible-namesRichard Ipsum2015-01-141-5/+8
| | | | | | This fixes the tool so that it can find refs such as foobar-1.4.0 when the version has been passed as 1.4 and refs such as foobar-1.4 when the version has been passed 1.4.0
* Make import tool pass version to to_lorry extRichard Ipsum2015-01-121-5/+9
|
* Add package name comparison callbackRichard Ipsum2015-01-121-1/+8
| | | | | | This lets the importer specify how package names will be compared, to do this the importer optionally supplies a callback, if no callback is supplied then the tool will default to == for string comparison.
* Log when we receive a msg on stderrRichard Ipsum2014-12-051-0/+1
| | | | | | This is helpful for discovering when messages are being put on stderr, we're collecting messages on stderr, but these could come from different subprocesses leading to a confusing mixture of error messages.
* Make stratum build-depends be set by importerRichard Ipsum2014-12-051-6/+11
|
* Fix % interpolation crashSam Thursfield2014-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | Previously if we got a BaserockImportException which contained a '%' in the message, you'd see this... Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/cliapp/app.py", line 190, in _run self.process_args(args) File "/src/import/baserockimport/app.py", line 102, in process_args super(BaserockImportApplication, self).process_args(args) File "/usr/lib/python2.7/site-packages/cliapp/app.py", line 539, in process_args method(args[1:]) File "/src/import/baserockimport/app.py", line 185, in import_rubygems loop.run() File "/src/import/baserockimport/mainloop.py", line 176, in run self.app.status(str(e), error=True) File "/src/import/baserockimport/app.py", line 105, in status text = msg % args TypeError: not enough arguments for format string
* Fix potential issue where two packages of different kinds share a nameSam Thursfield2014-12-011-16/+15
| | | | | | | This isn't a perfect fix. If this situation occurs the tool will generate an invalid stratum and the user will need to rename one of the chunks. But this is a better than what would have happened before: one of the chunks would have been silently ignored.
* Don't re-enqueue packages that already failedSam Thursfield2014-12-011-5/+12
|
* Prepend name and version of current package to each status messageSam Thursfield2014-11-201-9/+10
| | | | | I think this makes the output a bit clearer to follow. Maybe. It's hard to know these things until it's too late.
* Report what ref and commit is being used for each componentSam Thursfield2014-11-201-0/+7
| | | | | | I think this makes it clearer what the tool is actually doing, and hopefully makes it clearer what the user should do in cases where the tool couldn't determine which ref to use and reports an error.
* Print out what requires a package when we can't find its refSam Thursfield2014-11-201-4/+6
| | | | | Sometimes this is due to weird version requirements caused by some other package which isn't actually needed.
* Add --force-stratum-generation optionSam Thursfield2014-11-201-16/+26
| | | | | This should be useful when a couple of components raise errors but you know that you don't need them anyway.
* Fix stratum generation to work for all kinds of dependenciesSam Thursfield2014-11-181-1/+8
| | | | | | Previously it was hardcoded to just look for rubygems deps, which has an obvious flaw. It now looks for all types of dependencies that were enabled with enable_importer().
* Fix error in stratum generationSam Thursfield2014-11-181-1/+1
| | | | | | | | | | | | This was caused by a mistake in: commit c8e156fe181c8e62fda9f9a999af1f0a0980a0ce Author: Sam Thursfield <sam.thursfield@codethink.co.uk> Date: Mon Nov 17 17:20:00 2014 +0000 Don't force the generated stratum through morphloader validation We should be able to trust it, since we literally just generated it.
* Don't force the generated stratum through morphloader validationSam Thursfield2014-11-171-3/+2
| | | | We should be able to trust it, since we literally just generated it.
* Clean up use of a temporary file slightlySam Thursfield2014-11-171-5/+2
|
* Fix some file locating and move data/ inside the baserockimport packageSam Thursfield2014-11-111-1/+1
| | | | Now data/ actually gets installed too.
* Be more consistent that definitions-dir must be a Git repoSam Thursfield2014-11-111-2/+2
| | | | | | | If we create the definitions-dir we also initialise it as a Git repo, now. I also deleted a no-longer-needed hack.
* Some code has been merged with morphlibSam Thursfield2014-11-061-27/+1
| | | | | This version of the import tool requires morph.git commit 6779e46e880eec757a6923441accef2442007677 or newer.
* Document and clarify code of main import loopSam Thursfield2014-10-211-49/+90
|
* Organise import extensions and data into subdirectoriesSam Thursfield2014-10-211-3/+5
| | | | Finally the repo starts to look a little more tidy!
* Reorganise, tidy and document code of main applicationSam Thursfield2014-10-211-0/+563