Bug 1125379

Summary: RFE: Better support in --scm-enable for repositories with a depth greater than 1
Product: [Fedora] Fedora Reporter: Eric Schnoebelen <eric>
Component: mockAssignee: Copr Team <copr-team>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: jdisnard, mebrown, msuchy, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to add the desired features to mock none

Description Eric Schnoebelen 2014-07-31 17:14:48 UTC
Created attachment 923009 [details]
Patch to add the desired features to mock

Description of problem:

The SCM integration within mock makes some specific assumptions about the nature of the SCM repository.  Unfortunately, the product repository I am building out of does not follow the assumption that all buildable elements of a repository are at level one.

Version-Release number of selected component (if applicable):
1.1.41

How reproducible:
Using SCM integration, attempt to check out and build an item two more levels below the top of the SCM tree.

Steps to Reproduce:
1. enable SCM integration
2. use a source repository more than two levels deep (we use CVS as the VCS)
   mock -r <> --scm-enable --scm-option branch=branch --scm-option package=Products/Group-A/product-a

Actual results:
mock starts by complaining it cannot create it's work directory, based on the SCM_PKG name (--scm-option package)

Expected results:
 Desired Results:
  A clean build, using the SCM integration


Additional info:
The attached patch resolves the issue for us, converting the multi-level path in to a single directory element for the temporary directory (in get_sources()); correcting an assumption about how to rename the checked out directory later in the same routine.  And finally, it adds a feature to trim the SCM_PKG down to the last element of the path, for use as in the specification file name

Comment 1 Eric Schnoebelen 2015-03-13 23:42:32 UTC
This issue still exists in 1.2.7, and the patch continues to  apply cleanly.

Comment 2 Miroslav Suchý 2019-10-15 11:13:48 UTC
Is this still needed? Git supports cloning recursively submodules. Do you still use CVS nowadays?

Comment 3 Fedora Admin XMLRPC Client 2020-03-17 04:42:55 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.