#573 import fails with sources already imported
Closed: Fixed 3 years ago by onosek. Opened 3 years ago by lsedlar.

Running rhpkg import for an SRPM that already has the sources uploaded to lookaside fails with an error. This starts with python3-rpkg-1.63-1.fc33.noarch

Traceback (most recent call last):
  File "/usr/bin/rhpkg", line 16, in <module>
    main()
  File "/usr/lib/python3.9/site-packages/rhpkg/__main__.py", line 104, in main
    sys.exit(client.args.command())
  File "/usr/lib/python3.9/site-packages/pyrpkg/cli.py", line 2147, in import_srpm
    self.cmd.upload(uploadfiles, replace=True, offline=self.args.offline)
  File "/usr/lib/python3.9/site-packages/pyrpkg/__init__.py", line 2908, in upload
    raise AlreadyUploadedError('File already uploaded')
pyrpkg.errors.AlreadyUploadedError: File already uploaded

I would expect a message to be printed about it, but not that whole import would be aborted.


Caused by pull request #569
It even adds a test case to ensure that this really happens.
So an exception handler should be added
and the test case modified to check that import can be run twice?

Metadata Update from @onosek:
- Issue set to the milestone: 1.64

3 years ago

Log in to comment on this ticket.

Metadata
Related Pull Requests
  • #579 Merged 3 years ago