#343 Avoid to upload a file with different checksum
Merged by cqi. Opened by cqi.
cqi/rpkg fix-upload-file-with-different-checksum  into  master

Download 343.patch

The problem is, upload is able to upload a file, which is already in
sources with different checksum. This fix prevents from uploading that
file.

Fixes #204

Signed-off-by: Chenxiong Qi cqi@redhat.com

Can you change the error to ... please use new-sources or remove the file from sources file manually.? If someone needs to have multiple sources, new-sources would remove all of them, which could be confusing.

Looks good to me.

rebased onto 90973446416e14163d4bda3535d100e5d4a70dee

rebased onto 51451ab0d989850ca43c5576fa75027219ad6e9a

multiple - typo. 'are' is missing.

Quite unclear to me. Won't it work event without this second 'patch'? You have 2 files - sources and README.rst. I thought, purpose is to upload 2 different files with same name and catch exception.

I thought, purpose is to upload 2 different files with same name and catch exception.

Yes, you are right. :) The different files cause different hash calculated.

So, for the purpose, this test first writes sources directly to simulate "README.rst was uploaded and the hash is 123456". Then, write arbitrary content to README.rst and run upload actually to catch the exception.

rebased onto 4bd1e757a0ce3ef0a7cf3b841563003404a5ce01

multiple - typo. 'are' is missing.

@onosek Done.

Thanks, let's merge it when ready.

Commit 17c53739 fixes this pull-request

Pull-Request has been merged by cqi

Pull-Request has been merged by cqi

Metadata