Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Packaging (http://www.linux-archive.org/fedora-packaging/)
-   -   Conditionally building a sub-package? (http://www.linux-archive.org/fedora-packaging/43252-conditionally-building-sub-package.html)

James Laska 01-21-2008 04:03 PM

Conditionally building a sub-package?
 
Greetings,

Looking for a recommendation or thoughts around resolving a EPEL deps
issue noted in bug#429479.


The snake package contains a server and client utility. The client is
intended to run on distribution from FC3 and newer. The server must be
run in an environment that includes pykickstart >= 1.1. At this time,
this means anything newer than FC7.


In bug#429479 it was discussed that conditionally building the
sub-package on environments < FC7 was a good method to avoid EPEL deps
issues.


My plan was to implement something like the following:

%define has_pykickstart_version %{python -c "import
pykickstart.version;" 2>/dev/null && echo "1" || echo "0"}


%if %{has_pykickstart_version}

...

%endif

Do folks have any experience or recommendations in the realm of
conditional sub-package builds?


Thanks,
James

--
==========================================
James Laska -- jlaska@redhat.com
Quality Engineering -- Red Hat, Inc.
==========================================

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging

Jesse Keating 01-21-2008 04:52 PM

Conditionally building a sub-package?
 
On Mon, 21 Jan 2008 12:03:50 -0500
James Laska <jlaska@redhat.com> wrote:

> Do folks have any experience or recommendations in the realm of
> conditional sub-package builds?

Instead of testing python like that, you could just use the dist tag
and turn that off unless you're in a sufficiently high enough Fedora or
RHEL.

http://fedoraproject.org/wiki/Packaging/DistTag?#head-1c550109af0705ccb71329619b99428af2fd3e25

--
Jesse Keating
Fedora -- All my bits are free, are yours?
--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging

James Laska 01-21-2008 05:06 PM

Conditionally building a sub-package?
 
Jesse Keating wrote:

On Mon, 21 Jan 2008 12:03:50 -0500
James Laska <jlaska@redhat.com> wrote:

Do folks have any experience or recommendations in the realm of
conditional sub-package builds?


Instead of testing python like that, you could just use the dist tag
and turn that off unless you're in a sufficiently high enough Fedora or
RHEL.

http://fedoraproject.org/wiki/Packaging/DistTag?#head-1c550109af0705ccb71329619b99428af2fd3e25


Thanks for the suggestion!

Eeew, I just realized that I'll have to do some additional munging to
handle the conditionally unpackaged files now.


RPM build errors:
Installed (but unpackaged) file(s) found:
...

Thanks,
James

--
==========================================
James Laska -- jlaska@redhat.com
Quality Engineering -- Red Hat, Inc.
==========================================

--
Fedora-packaging mailing list
Fedora-packaging@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-packaging


All times are GMT. The time now is 09:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.