RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1660827 - curl: does not return error when downloading file and file already exists
Summary: curl: does not return error when downloading file and file already exists
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: curl
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Kamil Dudka
QA Contact: Daniel Rusek
URL:
Whiteboard:
Depends On: 1658574
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-19 10:14 UTC by Bruno Goncalves
Modified: 2019-06-14 00:02 UTC (History)
4 users (show)

Fixed In Version: curl-7.61.1-8.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-14 00:02:30 UTC
Type: Bug
Target Upstream Version:
Embargoed:
rule-engine: mirror+


Attachments (Terms of Use)

Description Bruno Goncalves 2018-12-19 10:14:01 UTC
Description of problem:
When running the command below and the file exists curl should report error saying the file already exists and not append to file as it currently does.


Version-Release number of selected component (if applicable):
curl-7.61.1-7.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. curl --retry 5 --insecure --fail --location --show-error --remote-name --remote-header-name "https://copr.fedorainfracloud.org/coprs/mvadkert/beakerlib-libraries/repo/fedora-rawhide/mvadkert-beakerlib-libraries-fedora-rawhide.repo"

2. curl --retry 5 --insecure --fail --location --show-error --remote-name --remote-header-name "https://copr.fedorainfracloud.org/coprs/mvadkert/beakerlib-libraries/repo/fedora-rawhide/mvadkert-beakerlib-libraries-fedora-rawhide.repo"

3. cat mvadkert-beakerlib-libraries.repo 
[mvadkert-beakerlib-libraries]
name=Copr repo for beakerlib-libraries owned by mvadkert
baseurl=https://copr-be.cloud.fedoraproject.org/results/mvadkert/beakerlib-libraries/fedora-rawhide-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/mvadkert/beakerlib-libraries/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1[mvadkert-beakerlib-libraries]
name=Copr repo for beakerlib-libraries owned by mvadkert
baseurl=https://copr-be.cloud.fedoraproject.org/results/mvadkert/beakerlib-libraries/fedora-rawhide-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/mvadkert/beakerlib-libraries/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1

Actual results:
the content of mvadkert-beakerlib-libraries.repo is duplicated as curl appended the file.

Expected results:
The second time the command is run it should return error informing the file already exists

Additional info:
related to Fedora BZ#1658574

Comment 1 Kamil Dudka 2018-12-19 10:58:07 UTC
Thanks!  I was about to clone this myself...


Note You need to log in before you can comment on or make changes to this bug.