Verified Commit 697bf9e4 authored by Mattia Rizzolo's avatar Mattia Rizzolo

Merge branch 'fix-worker-crash' of salsa.debian.org:lyknode-guest/debexpo into live

MR: !55Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parents 88946597 59b9c05a
Pipeline #42527 passed with stage
in 4 minutes and 31 seconds
......@@ -607,6 +607,7 @@ class Importer(object):
self._reject('{} dsc reference {}, but the file was not found'
'.\nPlease, include it in your upload'
'.'.format(upload.name, dsc_file.get('name')))
return False
checksum = sha256sum(filename)
if dsc_file.get('sha256') != checksum:
......@@ -617,6 +618,9 @@ class Importer(object):
' file.'.format(upload.name,
dsc_file.get('name'),
dsc_file.get('sha256'), checksum))
return False
return True
def main(self, no_env=False):
"""
......@@ -795,7 +799,8 @@ class Importer(object):
return 1
# Validates orig files from the uploaded dsc
self._validate_orig_files(self.changes.get_dsc())
if not self._validate_orig_files(self.changes.get_dsc()):
return 1
# Check whether the debexpo.repository variable is set
if 'debexpo.repository' not in pylons.config:
......
../sources/hello_1.0-1.debian.tar.xz
\ No newline at end of file
../sources/hello_1.0-1.dsc-mismatch-orig
\ No newline at end of file
../sources/hello_1.0-1_amd64.buildinfo-signed
\ No newline at end of file
../sources/hello_1.0-1_amd64.changes-mismatch-orig
\ No newline at end of file
../sources/hello_1.0-1_amd64.deb
\ No newline at end of file
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 3.0 (quilt)
Source: hello
Binary: hello
Architecture: any
Version: 1.0-1
Maintainer: Baptiste BEAUPLAT <lyknode@cilg.org>
Homepage: <insert the upstream URL, if relevant>
Standards-Version: 4.1.3
Build-Depends: debhelper (>= 11)
Package-List:
hello deb unknown optional arch=any
Checksums-Sha1:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 168 hello_1.0.orig.tar.xz
1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz
Checksums-Sha256:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 168 hello_1.0.orig.tar.xz
9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz
Files:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 168 hello_1.0.orig.tar.xz
8b4cae66eaf956a2b39b7d3d5482580a 7808 hello_1.0-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXKjARwAKCRDENHgc6HHz
32rPAPsHiTjO0c/dmfxkydLXXTyDMDCLifngLtN4VNfVZTgFfgEA10qilpcHYlv4
0n6AaJKBaE3EO5QXP9vM+YrIcFGfkw0=
=TjB7
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Sun, 02 Dec 2018 22:38:11 +0100
Source: hello
Binary: hello
Architecture: source amd64
Version: 1.0-1
Distribution: unstable
Urgency: medium
Maintainer: Baptiste BEAUPLAT <lyknode@cilg.org>
Changed-By: Baptiste BEAUPLAT <lyknode@cilg.org>
Description:
hello - <insert up to 60 chars description>
Changes:
hello (1.0-1) unstable; urgency=medium
.
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
Checksums-Sha1:
da35e1bb445a4d870d253afe474582e8247a2f89 1062 hello_1.0-1.dsc
1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz
3ec1a101d4cff4e81d05afcf7a7eefe23e6eb1bd 4626 hello_1.0-1_amd64.buildinfo
4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb
Checksums-Sha256:
429d66114e3756c42feae39ab4c66192ec7b106890de22f6de28e5a8ce178b25 1062 hello_1.0-1.dsc
9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz
24a6cecc76acf84e71f715fa555dc34a8c83ff3f616edaea192ab8c7eca5bb48 4626 hello_1.0-1_amd64.buildinfo
c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb
Files:
cbe008e9f7d90183bf5f967a0f94999a 1062 unknown optional hello_1.0-1.dsc
8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz
1f3c5eee601718afb1407994c4fcbe4b 4626 unknown optional hello_1.0-1_amd64.buildinfo
4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb
-----BEGIN PGP SIGNATURE-----
iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXKjCngAKCRDENHgc6HHz
38NPAQCB6z8ImlAoyOVN/uYDHhN/tOn/kSEGCbgEbbUZf/KnuwD/YB4qSyEP5TKI
9Nu3hWTV5oog6y3Vqj4zySafbjjAaQQ=
=DXGt
-----END PGP SIGNATURE-----
......@@ -175,6 +175,25 @@ r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw==
self.assert_package_info('hello', 'debianqa',
'Package is already in Debian')
def test_import_package_mismatch_orig_uploaded(self):
self.import_package('hello')
self.assert_importer_succeeded()
self.assert_email_with("Your upload of the package 'hello' to "
+ pylonsapp.config['debexpo.sitename']
+ " was\nsuccessful.")
self.assert_package_count('hello', '1.0-1', 1)
self.assert_package_in_repo('hello', '1.0-1')
self.import_package('hello-mismatch-orig')
self.assert_importer_failed()
self.assert_email_with("hello dsc reference hello_1.0.orig.tar.xz, but "
"the file differs:\nin dsc: aaaaaaaaaaaaaaaaaaaa"
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\nf"
"ound: 622d2165e0ae0aee8b3dac5fbf07f471db2205c4c"
"b60d1c3ce3762a12fbe62bf")
self.assert_package_count('hello', '1.0-1', 1)
self.assert_package_in_repo('hello', '1.0-1')
def test_import_package_hello(self):
self.import_package('hello')
self.assert_importer_succeeded()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment