Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1884 - hardcode a version number for Debian's testing/unstable suites #351

Closed

Conversation

olasd
Copy link
Contributor

@olasd olasd commented Jan 4, 2013

Here's the patch as attached to http://theforeman.org/issues/1884

@ohadlevy
Copy link
Member

ohadlevy commented Jan 6, 2013

thanks @olasd!, @GregSutcliffe mind having a look?

@skottler
Copy link

skottler commented Jan 6, 2013

@olasd I just tested this by running lsb_release -r -s and on unstable, for example, I get unstable as the output.

Since unstable and testing are always in that state (i.e. unstable never directly turns into sid), I think this will cause some confusion once sid final is shipped.

@domcleal
Copy link
Contributor

domcleal commented Jan 6, 2013

The -r flag is lsbdistrelease, not lsbdistcodename (used in the patch), but that said, lsbdistrelease appears to return the version number 7.0 on Debian testing currently, which is what we need (without a lookup table). unstable will always be sid, which can always be 99.

How about:

if os_name == "Debian"
  case orel
    when "testing"
      orel = facts[:lsbdistrelease]
    when "unstable"
      orel = "99"
  end
end

@olasd
Copy link
Contributor Author

olasd commented Jan 6, 2013

On dim., janv. 06 2013, Dominic Cleal wrote:

The -r flag is lsbdistrelease, not lsbdistcodename (used in the
patch), but that said, lsbdistrelease appears to return the version
number 7.0 on Debian testing currently, which is what we need
(without a lookup table). unstable will always be sid, which can
always be 99.

Hmm. It seems that wheezy only got this number a few days ago (in
base-files version 7.1, migrated to testing on 2012-12-26). Before that,
lsbdistrelease was "testing". AFAICT, the version number is always set
at the very end of the release cycle (at least it has been for the past
few cycles).

How about:

if os_name == "Debian"
  case orel
    when "testing"
      orel = facts[:lsbdistrelease]
    when "unstable"
      orel = "99"
  end
end

Hmm, orel is set to lsbdistrelease already, so the testing case is a
noop. In fact, right now my patch is a noop for up-to-date wheezy, as it
only looks for testing or unstable in lsbdistrelease.

I'm not sure what to do next. The bug report is moot for current
testing, but will show up again as soon as wheezy is released (and
someone want to install testing).

Thoughts?

Ever heard of .cshrc?
That's a city in Bosnia. Right?
(Discussion in comp.os.linux.misc on the intuitiveness of commands.)

@domcleal
Copy link
Contributor

domcleal commented Jan 7, 2013

On 06/01/13 23:59, Nicolas Dandrimont wrote:

On dim., janv. 06 2013, Dominic Cleal wrote:

The -r flag is lsbdistrelease, not lsbdistcodename (used in the
patch), but that said, lsbdistrelease appears to return the version
number 7.0 on Debian testing currently, which is what we need
(without a lookup table). unstable will always be sid, which can
always be 99.

Hmm. It seems that wheezy only got this number a few days ago (in
base-files version 7.1, migrated to testing on 2012-12-26). Before that,
lsbdistrelease was "testing". AFAICT, the version number is always set
at the very end of the release cycle (at least it has been for the past
few cycles).

Ack, bad time for me to test.

How about:

if os_name == "Debian"
case orel
when "testing"
orel = facts[:lsbdistrelease]
when "unstable"
orel = "99"
end
end

Hmm, orel is set to lsbdistrelease already, so the testing case is a
noop. In fact, right now my patch is a noop for up-to-date wheezy, as it
only looks for testing or unstable in lsbdistrelease.

Oh, you're right - I thought it was just operatingsystemrelease.

Sorry for the noise!

Dominic Cleal
Red Hat Engineering

@GregSutcliffe
Copy link
Member

@skottler sid is never released. It's the equivalent of rawhide. Once a package has been in sid for a while it moves to the current testing release.

@olasd looks pretty awesome to me. I agree that we can;t really avoid a lookup table, since the version number only appears at the end of the release cycle. It's not too much work to maintain it, given Debian's release cycle :)

@ohadlevy not tested, but looks fine to me 👍

@skottler
Copy link

skottler commented Jan 7, 2013

@GregSutcliffe makes sense. Since Debian releases relatively rarely I don't think this will become a maintenance burden; just would have been nice to avoid maintenance altogether.

Anyhow, looks good style and code-wise to me in it's current state so 👍

@ohadlevy
Copy link
Member

ohadlevy commented Jan 8, 2013

merged - thanks @olasd!

@ohadlevy ohadlevy closed this Jan 8, 2013
h0jeZvgoxFepBQ2C pushed a commit to h0jeZvgoxFepBQ2C/foreman that referenced this pull request Jul 26, 2018
Remove posix-spawn dependency for JRuby
ekohl pushed a commit to ekohl/foreman that referenced this pull request Mar 24, 2021
LiorKGOW pushed a commit to LiorKGOW/foreman that referenced this pull request Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants