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

"Incorrect" /etc/debian_version #18

Closed
stem opened this issue Oct 21, 2013 · 2 comments
Closed

"Incorrect" /etc/debian_version #18

stem opened this issue Oct 21, 2013 · 2 comments

Comments

@stem
Copy link

stem commented Oct 21, 2013

Hi,

I just did a fresh debian wheezy net install, and my /etc/debian_version looks wrong :

git@pkgr:/tmp/buildpacks$ cat /etc/debian_version 
7.2

When I do a pkgr package with a puts distribution.inspect inside builder.rb, I get :

git@pkgr:~$ pkgr package /tmp/buildpacks/blu-server/
#<Pkgr::Distributions::Debian:0x00000001de4738 @version="7.2\n">
/var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/builder.rb:192:in `buildpack_for_app': undefined method `find' for nil:NilClass (NoMethodError)
    from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/builder.rb:63:in `compile'
    from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/builder.rb:23:in `call'
    from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/dispatcher.rb:35:in `call'
    from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/cli.rb:36:in `package'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/bin/pkgr:8:in `<top (required)>'
    from /usr/local/bin/pkgr:23:in `load'
    from /usr/local/bin/pkgr:23:in `<main>'

I've patched the debian_version file to be wheezy/7.2 and everything works fine now.

Any idea why the file is not like this from the beginning ?

@crohr
Copy link
Owner

crohr commented Oct 21, 2013

Thanks for the bug report. I may have made too big of an assumption here. I'll have a look at what are the possible values for that file.

On 21 Oct 2013, at 18:42, stem notifications@github.com wrote:

Hi,

I just did a fresh debian wheezy net install, and my /etc/debian_version looks wrong :

git@pkgr:/tmp/buildpacks$ cat /etc/debian_version
7.2
When I do a pkgr package with a puts distribution.inspect inside builder.rb, I get :

git@pkgr:~$ pkgr package /tmp/buildpacks/blu-server/
#<Pkgr::Distributions::Debian:0x00000001de4738 @Version="7.2\n">
/var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/builder.rb:192:in buildpack_for_app': undefined methodfind' for nil:NilClass (NoMethodError)
from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/builder.rb:63:in compile' from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/builder.rb:23:incall'
from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/dispatcher.rb:35:in call' from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/lib/pkgr/cli.rb:36:inpackage'
from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in run' from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:ininvoke_command'
from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in dispatch' from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:instart'
from /var/lib/gems/1.9.1/gems/pkgr-1.1.0/bin/pkgr:8:in <top (required)>' from /usr/local/bin/pkgr:23:inload'
from /usr/local/bin/pkgr:23:in `

'
I've patched the debian_version file to be wheezy/7.2 and everything works fine now.

Any idea why the file is not like this from the beginning ?


Reply to this email directly or view it on GitHub.

@crohr
Copy link
Owner

crohr commented Nov 25, 2013

Forgot to comment here, but this is now taken care of by using the facter gem to fetch the distro version.

@crohr crohr closed this as completed Nov 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants