Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D debexpo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 42
    • Issues 42
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • mentors.debian.net
  • debexpo
  • Merge requests
  • !11

Prevent processing an upload without dsc file

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Baptiste Beauplat requested to merge lyknode/debexpo:fix-missing-orig-archive into live Nov 05, 2018
  • Overview 10
  • Commits 1
  • Pipelines 4
  • Changes 1

The debexpo importer fails to handle properly uploads without dsc files.

Currently, it will fail with the following traceback:

2018-11-05 +0000 11:31:44,898 DEBUG [debexpo.importer.12818] Importer started with arguments: ['-i', '/var/www/debexpo/live.ini', '-c', 'xplanet_1.3.0-5.1_amd64.changes']
2018-11-05 +0000 11:31:44,908 DEBUG [debexpo.importer.12818] Determining user from 'Changed-By:' field: Hugh McMaster <hugh.mcmaster@outlook.com>
2018-11-05 +0000 11:31:44,908 DEBUG [debexpo.importer.12818] Changed-By's email address is: hugh.mcmaster@outlook.com
2018-11-05 +0000 11:31:45,102 DEBUG [debexpo.importer.12818] GPG signature matches user hugh.mcmaster@outlook.com
2018-11-05 +0000 11:31:45,103 DEBUG [debexpo.importer.12818] User found in database. Has id: 14638
2018-11-05 +0000 11:31:45,103 DEBUG [debexpo.importer.12818] Upload does not contain orig.tar.gz - trying to find it elsewhere
2018-11-05 +0000 11:31:45,103 DEBUG [debexpo.importer.12818] Checking whether files are already in the repository
2018-11-05 +0000 11:31:45,104 DEBUG [debexpo.importer.12818] Pool directory: /var/cache/debexpo/uploaded/pool/main/x/xplanet
2018-11-05 +0000 11:31:45,104 DEBUG [debexpo.importer.12818] File /var/cache/debexpo/uploaded/pool/main/x/xplanet/xplanet-dbgsym_1.3.0-5.1_amd64.deb is safe to install
2018-11-05 +0000 11:31:45,104 DEBUG [debexpo.importer.12818] File /var/cache/debexpo/uploaded/pool/main/x/xplanet/xplanet-images_1.3.0-5.1_all.deb is safe to install
2018-11-05 +0000 11:31:45,104 DEBUG [debexpo.importer.12818] File /var/cache/debexpo/uploaded/pool/main/x/xplanet/xplanet_1.3.0-5.1_amd64.buildinfo is safe to install
2018-11-05 +0000 11:31:45,104 DEBUG [debexpo.importer.12818] File /var/cache/debexpo/uploaded/pool/main/x/xplanet/xplanet_1.3.0-5.1_amd64.deb is safe to install
2018-11-05 +0000 11:31:45,105 DEBUG [debexpo.plugins.getorigtarball] Checking whether an orig tarball mentioned in the dsc is missing
Traceback (most recent call last):
  File "/var/www/debexpo/bin/debexpo_importer.py", line 625, in <module>
    main()
  File "/var/www/debexpo/bin/debexpo_importer.py", line 621, in main
    i.main()
  File "/var/www/debexpo/bin/debexpo_importer.py", line 559, in main
    qa = Plugins('qa', self.changes, self.changes_file, user_id=self.user_id)
  File "/home/expo/debexpo/debexpo/lib/plugins.py", line 97, in __init__
    self.result = self._run_plugins()
  File "/home/expo/debexpo/debexpo/lib/plugins.py", line 187, in _run_plugins
    self._extract()
  File "/home/expo/debexpo/debexpo/lib/plugins.py", line 142, in _extract
    dsc = deb822.Dsc(file(self.changes.get_dsc()))
TypeError: coercing to Unicode: need string or buffer, NoneType found

This patch checks for dsc file before passing it to post-upload plugins

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix-missing-orig-archive