question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make os packages mutually exclusive

See original GitHub issue

Last week I started experimenting with using rez on linux and osx, and quickly discovered that OS packages are not mutually exclusive (I think I may be the first person actually using rez on two operating systems at the same site). There is nothing stopping a resolve on osx from pulling in packages that require Linux. Making Linux and Darwin anti-packages of each other only protects against bad resolves by aborting the resolution.

My plan is to create an “os” package, with versions per os: os-darwin, os-linux, os-windows. Versions are inherently mutually exclusive, so it will prevent os-darwin and os-linux from being loaded simultaneously, and thus allow packages that require or vary on these to resolve properly.

To achieve this, we will first need to implement a new type of Version subclass that supports a string label.

name: os
version: linux
name: os
version: darwin
name: os
version: windows

similarly, architectures can be implemented with arch-i386 and arch-x86_64 packages.

name: arch
version: x86_64
name: arch
version: i386

lastly, specific versions of an operating system can be implemented as their own packages. e.g. osx-10.8.1, fedora-19, etc. Here are some complete examples from windows, with numeric versions taken from wikipedia.

name : windows
version: 7  # technically, this is version 6.1
requires:
- os-windows
variants:
- [arch-x86_64]
- [arch-i386]
name : windows
version: 6.0
version_alias: Vista
requires:
- os-windows
variants:
- [arch-x86_64]
- [arch-i386]
name : windows
version: 5.1
version_alias: XP
requires:
- os-windows
variants:
- [arch-x86_64]
- [arch-i386]
name : windows
version: 5.0
version_alias: 2000
requires:
- os-windows
- arch-i386

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:26 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
nerdvegascommented, Apr 22, 2019

Yes, we’ve standardized on platform/arch/os packages for a long time now. That’s juts default behavior though, you’re free to do this as you’d like. Note this entry in rezconfig.py:

implicit_packages = [ “~platform=={system.platform}”, “~arch=={system.arch}”, “~os=={system.os}”, ]

https://github.com/nerdvegas/rez/wiki/Basic-Concepts#weak-references Some packages may not be platform dependent, hence the weak references.

Hth A

On Mon, Apr 22, 2019 at 11:41 PM Marcus Ottosson notifications@github.com wrote:

Is this implemented? 😃

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nerdvegas/rez/issues/40#issuecomment-485421438, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMOUSQD33XHAKAK3ZJXRE3PRW6BTANCNFSM4AJW7BSQ .

0reactions
mottossocommented, Apr 22, 2019

Is this implemented? 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

7. Declaring relationships between packages - Debian
This is done using the · These seven fields are used to declare a dependency relationship by one package on another. · A...
Read more >
How do I make buildroot packages mutually exclusive?
As the error shows, it is not possible for two Kconfig symbols to refer to each other with depends , select or if...
Read more >
Operands - IBM
BYPASS(ACCEPTCHECK APPLYCHECK) is mutually exclusive with ZONEGROUP. ... should use to create the software inventory on which the resulting PTF package will ...
Read more >
systemd support for toggling mutually exclusive services?
You can do this by adding the Conflicts= directive to the [Unit] section of your two unit files ( Conflicts= in just one...
Read more >
Mutually Exclusive Software Components - Packaging and ...
One example of a mutually exclusive component is system architecture. Actions can contain multiple tags for different variant names. For example, a package...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found