Commit graph

138 commits

Author SHA1 Message Date
Daniel Martí
1a3816acfb scanner: support apps using srclib repo type 2015-09-13 22:05:41 -07:00
Daniel Martí
576da1d048 all: deduplicate -v/-q setup 2015-09-11 23:42:50 -07:00
nero-tux
d23ecf1b35 replace deprecated optparse with argparse
following guidelines from:
https://docs.python.org/2/library/argparse.html#upgrading-optparse-code
except, still using option = parse.parse_args() instead of args = ...

- using the following script in folder fdroidserver:
	for i in *.py; do
		sed -i -e 's/optparse/argparse/' \
			-e 's/OptionParser/ArgumentParser/' \
			-e 's/OptionError/ArgumentError/' \
			-e 's/add_option/add_argument/' \
			-e 's/(options, args) = parser/options = parser/' \
			-e 's/options, args = parser/options = parser/' \
			-e 's/Usage: %prog/%(prog)s/' $i;
	done
- use ArgumentParser argument to replace (option, args) = parser.parse()
  call
- use parser.error(msg) instead of raise ArgumentException as suggested
  in https://docs.python.org/2/library/argparse.html#exiting-methods
- in fdroid catch ArgumentError instead of OptionError
2015-09-06 10:34:50 +02:00
Daniel Martí
120be4334d Move scan_source into scanner.py
Not really a common.py thing.
2015-08-28 19:20:39 -07:00
Daniel Martí
2edddda234 scanner: adapt to new scan_source format (fixes #59) 2015-01-10 13:49:54 +01:00
Daniel Martí
94c29f9c37 Map apps in memory from appid to appinfo
Instead of storing them in a list and doing linear searches by appinfo['id']
2014-08-16 12:46:02 +02:00
Daniel Martí
78ff22d952 Drop svn support in favour of git-svn
Reasons:

* Cloning a svn repo via svn doesn't fetch the entire history
* Svn checkout is incredibly slow
* Svn doesn't have important features such as a 'clean' command

The only reason why we kept svn was for anonymous logins to repositories. This
is no longer a reason since git-svn also supports them.
2014-07-18 12:39:24 +02:00
Daniel Martí
d132adf63c Exception handling improvements
* Replace some prints with proper logging messages
* Make VCSException as verbose as BuildException, including error output
2014-07-02 15:44:46 +02:00
Daniel Martí
49208b257d Always run read_srclibs as part of read_metadata 2014-06-30 14:39:52 +02:00
Daniel Martí
3d72c30fe5 Use ordered dicts for defaults in apps and builds 2014-05-31 23:54:50 +02:00
Ciaran Gultnieks
3a73654d49 Centralise management of srclib metadata 2014-05-20 22:44:47 +01:00
Hans-Christoph Steiner
0e00b36db5 fix PEP8 E124/E125/126/127/128 indentation issues
* E124 closing bracket does not match visual indentation
* E125 continuation line does not distinguish itself from next logical line
* E126 continuation line over-indented for hanging indent
* E127 continuation line over-indented for visual indent
* E128 continuation line under-indented for visual indent
2014-05-06 14:36:33 -04:00
Hans-Christoph Steiner
aa5f317c26 fix PEP8 "W391 blank line at end of file" 2014-05-06 11:45:03 -04:00
Hans-Christoph Steiner
3f4f7a544b fix PEP8 "E302 expected 2 blank lines, found 1" 2014-05-06 11:45:03 -04:00
Hans-Christoph Steiner
2f2618e06c fix PEP8 "E401 multiple imports on one line" 2014-05-06 11:45:03 -04:00
Ciaran Gultnieks
37dda9414c Add --quiet option, restricting output to warnings/errors 2014-02-22 09:46:24 +00:00
Daniel Martí
e20fa9d7f4 Half-way done switching prints for logs 2014-01-27 21:49:01 +01:00
Daniel Martí
0765f14c9d Remove trailing spaces and tabs 2013-12-30 17:05:25 +01:00
Daniel Martí
8f3a2d4355 Add some remaining help strings 2013-12-19 23:18:27 +01:00
Daniel Martí
c4236ba761 Remove some unnecessary stuff 2013-12-19 23:14:51 +01:00
Daniel Martí
0a770cf4bc Adapt scanner, fix some other issues 2013-12-19 23:06:57 +01:00
Daniel Martí
fb38eb6b8c First metadata checks rewrite; New metadata.py module 2013-11-19 15:35:16 +01:00
Daniel Martí
6e0ad365d0 Don't pass config variables as arguments - much simpler code 2013-11-08 20:44:27 +01:00
Daniel Martí
c3be06fb1d Start rewriting options and config as common.py globals 2013-11-01 13:55:38 +01:00
Ciaran Gultnieks
a762a0cb04 Tidied up some unused junk 2013-10-31 15:46:32 +00:00
Ciaran Gultnieks
08287a1fa8 Handle repo config in a more sensible way 2013-10-31 15:37:39 +00:00
Daniel Martí
2c804ef88a Switch all shebangs to 'env python2' 2013-10-31 13:27:24 +01:00
Ciaran Gultnieks
dd427ef5f0 Fix standalone scanner bug 2013-10-29 12:23:42 +00:00
Ciaran Gultnieks
ccdea798fc Don't need legacy disabled build handling everywhere now 2013-10-27 14:40:02 +00:00
Ciaran Gultnieks
715035a707 Introduce disable= as a better way of disabling a build
Prefixing commit ID with ! and a message will still work, but that's
very silly. Using disable= is now the correct way.
2013-10-26 10:28:12 +01:00
Daniel Martí
76d3b56ff5 Remove a bunch of unused imports 2013-08-22 16:42:57 +02:00
Ciaran Gultnieks
64729ba9fe Add extra build commands that can run after scan/tarball
Commands used in the 'build' section are for actual building that
produces binary output. Some existing stuff will need to move from
'prebuild' to this. See manual for more information.
2013-03-20 09:30:56 +00:00
Ciaran Gultnieks
d302c669bd Make maven executable path accessible in prebuild/init 2012-10-01 13:19:00 +01:00
Ciaran Gultnieks
7a0df25525 Made maven executable configurable 2012-09-13 08:23:12 +01:00
Ciaran Gultnieks
09e296d2de Lots of build system improvements and fixes 2012-09-08 09:56:20 +01:00
Tias Guns
1c0dfcbab9 common.prepare_source: add verbose option and use it
The prepare_source method runs commands and everything, but the -v
option gives no insight into what is happening in this method.
This patch adds some verbose output, useful to discover why/where a scan
fails
2012-03-12 23:07:41 +00:00
Tias Guns
fc621a8ad6 scanner: use -p check like in build.py, give error if package does not exist 2012-03-11 23:17:46 +00:00
Ciaran Gultnieks
f643b0498c Make the server tools an installable package (with distutils) - wip 2012-03-11 11:59:19 +00:00
Renamed from scanner.py (Browse further)