Actions
Issue #1853
closedpulp-puppet-module-builder should not overwrite existing module files
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
2.6.0
Platform Release:
2.11.1
OS:
RHEL 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 13
Quarter:
Description
From the downstream report:
Issue:
pulp-puppet-module-builder will overwrite existing module files in my --output-dir.
There is no option to disable this behaviour or emit a warning when it happens.
Steps to Reproduce:
1. mkdir -p /tmp/example-output
2. cd /tmp/
3. puppet module generate support-example
take the default responses to all questions
4. cd /tmp/support-example
5. pulp-puppet-module-builder --output-dir=/tmp/example-output
6. sha1sum /tmp/example-output/support-example-0.1.0.tar.gz
Alter the content of /tmp/support-example/manifests/init.pp in some valid way
7. cd /tmp/support-example
8. pulp-puppet-module-builder --output-dir=/tmp/example-output
9. sha1sum /tmp/example-output/support-example-0.1.0.tar.gz
Actual results:
The content of /tmp/example-output/support-example-0.1.0.tar.gz from Step 5 was replaced by Step 8 but no notice was provided.
Expected results:
It would be helpful if there was notice provided and a switch added to prevent overwriting existing module files.
We may need some discussion to decide what the right behavior is.
Updated by mhrivnak about 8 years ago
- Priority changed from Normal to Low
- Severity changed from 2. Medium to 1. Low
- Triaged changed from No to Yes
Updated by bmbouter over 7 years ago
If the resolution to this is to add an option, someone please notify katello.
Updated by daviddavis over 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by daviddavis over 7 years ago
- Status changed from ASSIGNED to POST
Added by daviddavis over 7 years ago
Updated by daviddavis over 7 years ago
- Status changed from POST to MODIFIED
Applied in changeset 96945c875db478303b28b111b05d8319547a1032.
Updated by pthomas@redhat.com over 7 years ago
- Status changed from 5 to 6
verified
[root@qe-blade-05 support-example]# rpm -qa pulp-puppet-tools
pulp-puppet-tools-2.11.1-0.1.beta.el7.noarch
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]# pulp-puppet-module-builder --output-dir=/tmp/example-output
cd /tmp/support-example
git status
find . -name Modulefile -o -name metadata.json
puppet module build .
mkdir -p /tmp/example-output
Skipping support-example-0.1.0.tar.gz as the file exists
cd /tmp/example-output
cd /tmp/support-example
cd /tmp/support-example
[root@qe-blade-05 support-example]# ls -l /tmp/example-output/
total 8
-rw-r--r-- 1 root root 99 Jan 13 15:00 PULP_MANIFEST
-rw-r--r-- 1 root root 3490 Jan 13 14:49 support-example-0.1.0.tar.gz
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]# sha1sum /tmp/example-output/support-example-0.1.0.tar.gz
bb934cfd2fd17a3d03beafd1846379baf1a4cabf /tmp/example-output/support-example-0.1.0.tar.gz
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]# pulp-puppet-module-builder --output-dir=/tmp/example-output -f
cd /tmp/support-example
git status
find . -name Modulefile -o -name metadata.json
puppet module build .
mkdir -p /tmp/example-output
cp ./pkg/support-example-0.1.0.tar.gz /tmp/example-output
cd /tmp/example-output
cd /tmp/support-example
cd /tmp/support-example
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]#
[root@qe-blade-05 support-example]# ls -l /tmp/example-output/
total 8
-rw-r--r-- 1 root root 99 Jan 13 15:01 PULP_MANIFEST
-rw-r--r-- 1 root root 3497 Jan 13 15:01 support-example-0.1.0.tar.gz
[root@qe-blade-05 support-example]# sha1sum /tmp/example-output/support-example-0.1.0.tar.gz
e330d939af48408bfd6c02e9fc2aebc240748856 /tmp/example-output/support-example-0.1.0.tar.gz
[root@qe-blade-05 support-example]#
Updated by semyers over 7 years ago
- Status changed from 6 to CLOSED - CURRENTRELEASE
Actions
Don't ovewrite modules unless force flag is passed
By default, no longer overwriting modules in the output dir. Also, added a force flag which can override this behavior.
fixes #1853 https://pulp.plan.io/issues/1853