That is, downloading /index-v1.jar instead of /index.jar.
This lets us clean up some code, as the old format was a bit more
complex and made use of some slightly weird encodings. But most
importantly, the new index format includes some extra information that
we might start using soon.
Now, install handles upgrades too. It will succeed if it can install a
new app, upgrade an existing app, or if an app is already up to date.
For the time being, this removes the "upgrade only if already installed"
and "install only if not already installed" features, but those are very
specific and likely not useful. They can be re-added as options if
necessary.
Fixes#23.
This way, we avoid linking an executable, and running the tests is also
faster. This shaves the test time by half, from ~9s to ~4s.
This also means we can use tooling better. For example, the cover tool
now works properly, reporting a coverage of nearly 60%.
The tool had very little test coverage up until this point, so end to
end tests will be the best way to add proper coverage without unit
testing every single piece.
When done, the tests will only run what they can, skipping certain
subtests if they can't connect to f-droid.org or if there is no Android
device attached.
I have been moving all github.com/mvdan/... packages to mvdan.cc/...
recently - do this one too.
basedir was only really used by these packages, so merge it in to
simplify building and packaging the tool.
When trying to uninstall an app that is not installed adb prints just
"Failure". This causes output parsing to fail and results in "panic:
runtime error: index out of range" in adb.getFailureCode().
Check whether an app is installed first and print an appropriate message
if it's not.
The new cache format didn't encode the repos properly, which lead to
crashes. Since we're modifying the cache format, introduce a version and
discard all previous caches (defaulting to version 0).
Fixes#19.
Select apps updated today (UTC):
fdroidcl search -d 1
Select apps NOT updated since a year ago:
fdroidcl search -d -365
The default value `-d 0` disables this filter.
Fixes#13
Otherwise, treat all apks as compatible. Remove all the VName matching
code as discussed on github, to stay close to what the Android client
does. We should not be using version names for anything relevant anyway.
When "-u" or "-i" option is specified we have a connected device and can
suggest particular APKs. Without those options it's "free mode" and we
cannot make any assumptions.