Commit graph

238 commits

Author SHA1 Message Date
Daniel Martí
d5ec039dec checkupdates: Make RepoManifest change subdir too 2015-10-25 12:09:01 +01:00
Daniel Martí
af947809b5 checkupdates: let Tags detect subdir changes
Up until now, this was done only if no overall version could be found. But in
tags, we would get stuck with an old version from an old tag and not see
subdir changes in new tags.
2015-10-25 12:00:02 +01:00
Daniel Martí
fa55ec0e87 Be consistent about root_dir/build_dir naming 2015-10-25 11:41:46 +01:00
Daniel Martí
7e7d67f0d7 Fix a small indentation issue 2015-10-25 11:32:18 +01:00
Daniel Martí
aa3ca80ae6 write_metadata fixes 2015-10-04 18:01:23 +02:00
Daniel Martí
911994fc99 Make write_metadata take a writer
This will let rewritemeta report format issues without writing to disk.
2015-09-24 22:38:33 -07:00
Daniel Martí
5cb47203b3 Replace some hard-coded paths with os.path.join 2015-09-14 18:12:15 -07:00
Daniel Martí
576da1d048 all: deduplicate -v/-q setup 2015-09-11 23:42:50 -07:00
Daniel Martí
3638acddc4 checkupdates: Avoid variable/string names as CV 2015-09-11 23:17:46 -07:00
Daniel Martí
9489e80f09 Merge branch 'replace_optparse_with_argparse' into 'master'
replace deprecated optparse with argparse

squashed and rebased merge request fdroid/fdroidserver!74

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

See merge request !75
2015-09-10 02:08:24 +00:00
Daniel Martí
b07e6c343c checkupdates: log vercode operation activity 2015-09-09 10:26:33 -07:00
Daniel Martí
2fe0327beb checkupdates: don't auto update to older versions
If for whatever reason the update check results in an older version that we
didn't package, don't "update" to that version if we already packaged newer
versions.
2015-09-09 09:27:18 -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
Hans-Christoph Steiner
6f334558df metadata: rename metafile to metadatapath when it is a path
To keep the code clear, change the code to use separate variables for the
path to the metadata file, and for the file object of the opened metadata.
2015-09-01 11:39:51 +02:00
Daniel Martí
0fb7acdd1d checkupdates: be more verbose with tags 2015-08-24 16:24:05 -07:00
Daniel Martí
bb2598d358 Add "Update Check Name:Ignore" 2015-08-14 10:27:16 -07:00
Daniel Martí
5aa9e2289d Improve xml string extracting support
* Shield ourselves from newlines that would break metadata files
* Properly use string resources for version names
2015-06-18 17:54:56 +02:00
Daniel Martí
87d409a55c Revert back to always updating Auto Name 2015-06-03 14:35:31 +02:00
Ciaran Gultnieks
fe7f6cfe50 Remove shell option from FDroidPopen 2015-01-26 18:30:01 +00:00
Ciaran Gultnieks
12f65953e6 Correction to 5b868c8a4 2015-01-13 08:25:27 +00:00
Ciaran Gultnieks
5b868c8a4c Only set Auto Name if one isn't set already 2015-01-12 18:58:21 +00:00
Ciaran Gultnieks
52de223435 Documentation fix 2015-01-11 15:33:52 +00:00
Ciaran Gultnieks
38f975dd49 More detail for package ID mismatches 2015-01-11 08:20:14 +00:00
Daniel Martí
8d1c4c1d60 Fix a few remaining gradle flavour crashes 2014-09-15 11:52:12 +02:00
Daniel Martí
34a3405208 Centralise handling of default gradle flavours 2014-09-13 13:04:24 +02:00
Daniel Martí
a195556378 Make gradle and antcommands (previously antcommand) proper lists 2014-09-13 13:01:08 +02: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í
ff06694adc Don't use generic Exception raises
That hides bugs, since all exceptions (including bugs that cause raises that
weren't our doing) fall under the "Exception" except
2014-07-07 15:41:50 +02:00
Daniel Martí
801f10c86f checkupdates: don't print traces independently 2014-07-04 09:55:06 +02:00
Daniel Martí
3dbf99a7f2 Use shorter and non-redundant 'or' clauses for 'if True else' assignments 2014-07-03 17:35:28 +02:00
Daniel Martí
eaf3216e40 Recognise changes in subdirs in Tags and RepoManifest 2014-07-03 17:25:31 +02:00
Daniel Martí
d9d5f30d7b vcs_* stuff should not raise BuildExceptions 2014-07-03 13:54:23 +02:00
Daniel Martí
ee99d55e30 Also make the Tags UCM complain about unknown package id 2014-07-03 13:44:27 +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í
4e153cc60d Error if UCM:Tags is used with git-svn without tags set up 2014-06-26 12:41:50 +02:00
Daniel Martí
3690b89e0a Fix crash in checkupdates with auto-updates 2014-06-04 13:29:01 +02:00
Daniel Martí
3d72c30fe5 Use ordered dicts for defaults in apps and builds 2014-05-31 23:54:50 +02:00
Hans-Christoph Steiner
2f3022ff65 fix PEP8 E128 continuation line under-indented for visual indent 2014-05-29 13:10:28 -04:00
Daniel Martí
0f0ccdb1e1 Fix some more pep8 warnings 2014-05-28 09:33:14 +02:00
Daniel Martí
5bbbda71a3 Also use srclibs in checkupdates
Needed when Repo Type is srclib
2014-05-27 09:53:58 +02:00
Ciaran Gultnieks
277d95f57d Fix several read_metadata-related issues
Various calls with the wrong parameters, and also an unused parameter on
the function itself.
2014-05-20 17:48:45 +01:00
Ciaran Gultnieks
0113f85448 Add ability to ignore updates based on version name matching 2014-05-13 20:04:22 +01:00
Hans-Christoph Steiner
37d6d87ff7 fix PEP8 "E226 missing whitespace around arithmetic operator" 2014-05-06 14:36:33 -04: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
16dc3b27d6 fix PEP8 "E303 too many blank lines (2)" 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