I'm stumped by this stacktrace, hopefully debug logging will help:
Unknown exception found!
Traceback (most recent call last):
File "./fdroidserver-0.4.0/fdroid", line 141, in <module>
main()
File "./fdroidserver-0.4.0/fdroid", line 119, in main
mod.main()
File "<http://localhost:18080/job/fdroidserver/ws/.testfiles/tmp.9hr9NiSmZs/fdroidserver-0.4.0/fdroidserver/update.py",> line 1146, in main
apks, cachechanged = scan_apks(apps, apkcache, repodirs[0], knownapks)
File "<http://localhost:18080/job/fdroidserver/ws/.testfiles/tmp.9hr9NiSmZs/fdroidserver-0.4.0/fdroidserver/update.py",> line 543, in scan_apks
thisinfo['sig'] = getsig(os.path.join(os.getcwd(), apkfile))
File "<http://localhost:18080/job/fdroidserver/ws/.testfiles/tmp.9hr9NiSmZs/fdroidserver-0.4.0/fdroidserver/update.py",> line 361, in getsig
with zipfile.ZipFile(apkpath, 'r') as apk:
File "/usr/lib/python2.7/zipfile.py", line 770, in __init__
self._RealGetContents()
File "/usr/lib/python2.7/zipfile.py", line 857, in _RealGetContents
x._decodeExtra()
File "/usr/lib/python2.7/zipfile.py", line 388, in _decodeExtra
tp, ln = unpack('<HH', extra[:4])
struct.error: unpack requires a string argument of length 4
cd $REPOROOT
./fdroidserver-*/fdroid init
copy_apks_into_repo $REPOROOT
cd $REPOROOT
./fdroidserver-*/fdroid init
copy_apks_into_repo $REPOROOT
-./fdroidserver-*/fdroid update --create-metadata
+./fdroidserver-*/fdroid update --create-metadata --verbose
#------------------------------------------------------------------------------#
#------------------------------------------------------------------------------#
REPOROOT=`create_test_dir`
cd $REPOROOT
$fdroid init
REPOROOT=`create_test_dir`
cd $REPOROOT
$fdroid init
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
$fdroid readmeta
$fdroid server update --local-copy-dir=/tmp/fdroid
$fdroid readmeta
$fdroid server update --local-copy-dir=/tmp/fdroid
cd $REPOROOT
$fdroid init
copy_apks_into_repo $REPOROOT
cd $REPOROOT
$fdroid init
copy_apks_into_repo $REPOROOT
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
$fdroid readmeta
grep -F '<application id=' repo/index.xml > /dev/null
$fdroid readmeta
grep -F '<application id=' repo/index.xml > /dev/null
$fdroid init --keystore $KEYSTORE --android-home $STORED_ANDROID_HOME --no-prompt
test -e $KEYSTORE
copy_apks_into_repo $REPOROOT
$fdroid init --keystore $KEYSTORE --android-home $STORED_ANDROID_HOME --no-prompt
test -e $KEYSTORE
copy_apks_into_repo $REPOROOT
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
$fdroid readmeta
grep -F '<application id=' repo/index.xml > /dev/null
test -e repo/index.xml
$fdroid readmeta
grep -F '<application id=' repo/index.xml > /dev/null
test -e repo/index.xml
mkdir repo
copy_apks_into_repo $REPOROOT
$fdroid init
mkdir repo
copy_apks_into_repo $REPOROOT
$fdroid init
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
$fdroid readmeta
grep -F '<application id=' repo/index.xml > /dev/null
$fdroid readmeta
grep -F '<application id=' repo/index.xml > /dev/null
$fdroid init --keystore $KEYSTORE
test -e $KEYSTORE
copy_apks_into_repo $REPOROOT
$fdroid init --keystore $KEYSTORE
test -e $KEYSTORE
copy_apks_into_repo $REPOROOT
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
$fdroid readmeta
test -e repo/index.xml
test -e repo/index.jar
$fdroid readmeta
test -e repo/index.xml
test -e repo/index.jar
$fdroid update --create-key
test -e $KEYSTORE
copy_apks_into_repo $REPOROOT
$fdroid update --create-key
test -e $KEYSTORE
copy_apks_into_repo $REPOROOT
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
$fdroid readmeta
test -e repo/index.xml
test -e repo/index.jar
$fdroid readmeta
test -e repo/index.xml
test -e repo/index.jar
$fdroid init --keystore $KEYSTORE
test -e $KEYSTORE
copy_apks_into_repo $REPOROOT
$fdroid init --keystore $KEYSTORE
test -e $KEYSTORE
copy_apks_into_repo $REPOROOT
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
$fdroid readmeta
test -e repo/index.xml
test -e repo/index.jar
grep -F '<application id=' repo/index.xml > /dev/null
test -e $REPOROOT/repo/info.guardianproject.urzip_100.apk || \
cp $WORKSPACE/tests/urzip.apk $REPOROOT/repo/
$fdroid readmeta
test -e repo/index.xml
test -e repo/index.jar
grep -F '<application id=' repo/index.xml > /dev/null
test -e $REPOROOT/repo/info.guardianproject.urzip_100.apk || \
cp $WORKSPACE/tests/urzip.apk $REPOROOT/repo/
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
$fdroid readmeta
test -e repo/index.xml
test -e repo/index.jar
$fdroid readmeta
test -e repo/index.xml
test -e repo/index.jar
#------------------------------------------------------------------------------#
echo_header "setup a new repo from scratch with a HSM/smartcard"
#------------------------------------------------------------------------------#
echo_header "setup a new repo from scratch with a HSM/smartcard"
REPOROOT=`create_test_dir`
cd $REPOROOT
$fdroid init --keystore NONE
REPOROOT=`create_test_dir`
cd $REPOROOT
$fdroid init --keystore NONE
mkdir repo
cp $WORKSPACE/tests/urzip.apk $REPOROOT/repo/
set +e
mkdir repo
cp $WORKSPACE/tests/urzip.apk $REPOROOT/repo/
set +e
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
if [ $? -eq 0 ]; then
echo "This should have failed because this repo has no keystore!"
exit 1
if [ $? -eq 0 ]; then
echo "This should have failed because this repo has no keystore!"
exit 1
echo 'keystorepass = "foo"' >> config.py
echo 'keypass = "foo"' >> config.py
set +e
echo 'keystorepass = "foo"' >> config.py
echo 'keypass = "foo"' >> config.py
set +e
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
if [ $? -eq 0 ]; then
echo "This should have failed because this repo has a bad/fake keystore!"
exit 1
if [ $? -eq 0 ]; then
echo "This should have failed because this repo has a bad/fake keystore!"
exit 1
$fdroid init --keystore $KEYSTORE
test -e $KEYSTORE
cp $WORKSPACE/tests/urzip.apk $REPOROOT/repo/
$fdroid init --keystore $KEYSTORE
test -e $KEYSTORE
cp $WORKSPACE/tests/urzip.apk $REPOROOT/repo/
-$fdroid update --create-metadata
+$fdroid update --create-metadata --verbose
$fdroid readmeta
test -e repo/index.xml
test -e repo/index.jar
$fdroid readmeta
test -e repo/index.xml
test -e repo/index.jar