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 1033568 - [RFE]: Better macros for inter-collection dependencies in scl-utils
Summary: [RFE]: Better macros for inter-collection dependencies in scl-utils
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: scl-utils
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Zeleny
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On: 1028953
Blocks: 1033566
TreeView+ depends on / blocked
 
Reported: 2013-11-22 12:01 UTC by Bohuslav "Slavek" Kabrda
Modified: 2014-04-10 08:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 1028953
Environment:
Last Closed: 2014-04-10 08:47:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bohuslav "Slavek" Kabrda 2013-11-22 12:01:40 UTC
+++ This bug was initially created as a clone of Bug #1028953 +++

Current state:
Intra- and inter- collection dependency macros are currently not consistent and the intercollection dependency macro isn't very useful. Consider this case:
Collection A has package "a", collection B has package "b" and "c". "c" requires "b" and "a". Currently, "c" specfile has this:

Requires: %{?scl_prefix}b
Requires: %{?scl:%scl_require_package A a}%{!?scl:a}

The first require (intrascl dep) is fine but the second one (interscl dep) is very inconvenient. I'd like to propose modification of %scl_prefix macro to something like this (maybe it can be written in a nicer way, but it works this way):

%scl_prefix() %(if [ "%1" = "%%1" ]; then echo "%{scl}-"; else echo "%1-"; fi)

In short, this makes %scl_prefix a macro function, which uses optional argument as the scl name, and defaults to %scl if no argument is provided. With this, we would be able to use it like this:

Requires: %{?scl_prefix}b
Requires: %{?scl:%scl_prefix A}a

The second Require is now more convenient and comprehensible.

--- Additional comment from Jan Zeleny on 2013-11-15 06:36:25 EST ---

How about the final result being something like

Requires: %{scl_requires_package mysql55 mysql}

It works well regardless if it's built for scl or not, I have just tried. Would this be acceptable for you? (note that I changed the name to keep the backwards compatibility of the original macros)

--- Additional comment from Bohuslav "Slavek" Kabrda on 2013-11-15 06:54:53 EST ---

(In reply to Jan Zeleny from comment #1)
> How about the final result being something like
> 
> Requires: %{scl_requires_package mysql55 mysql}
> 
> It works well regardless if it's built for scl or not, I have just tried.
> Would this be acceptable for you? (note that I changed the name to keep the
> backwards compatibility of the original macros)

No, because I still have to use the %{!?scl:a} part in

Requires: %{?scl:%scl_require_package A a}%{!?scl:a}

if I want to build the package in a buildroot without scl-utils-build.

Also, would this cover this use case?


%global mysql_collection mysql55
Requires: %{?scl:%scl_prefix %{?mysql_collection}}mysql # => mysql55-mysql

# now delete definition of mysql_collection macro
Requires: %{?scl:%scl_prefix %{?mysql_collection}}mysql # <current_scl>-mysql


My implementation does.

--- Additional comment from Jan Zeleny on 2013-11-15 09:56:25 EST ---

Ok, thanks for the information. I was just playing here with a few possibilities so I wanted to better understand your use case.

Comment 2 Jan Zeleny 2014-04-10 08:47:38 UTC
Leaving the Fedora tracker open but closing this one. This will be an improvement for SCL 2.0 which will likely come as a separate component in the future.


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