Kiwi / clyde

Next-generation libalpm/makepkg wrapper.
https://kiwi.github.io/clyde
Other
63 stars 8 forks source link

Missing declaration in aur.lua #97

Closed r-vdp closed 13 years ago

r-vdp commented 13 years ago

I think there was a declaration missing in aur.lua. I'm by no means a lua guru though, so please review before pulling.

This solves a crash of clyde on running "clyde -S clyde-git", before I got:

lua: ./clydelib/aur.lua:299: attempt to index global 'alpm' (a nil value)
stack traceback:
    ./clydelib/aur.lua:299: in function <./clydelib/aur.lua:298>
    [C]: in function 'sort'
    ./clydelib/aur.lua:302: in function 'installpkg'
    ./clydelib/sync.lua:1140: in function <./clydelib/sync.lua:1070>
    (tail call): ?
    ./clydelib/sync.lua:1547: in function 'clyde_sync'
    ./clydelib/sync.lua:1553: in function <./clydelib/sync.lua:1552>
    (tail call): ?
    /usr/bin/clyde:1054: in function 'main'
    /usr/bin/clyde:1112: in main chunk
    [C]: ?
juster commented 13 years ago

For some reason that bug does not happen to me. But I would like to merge your fix anyways. I remember when I decided not to explicitly require 'alpm' but I don't remember my reasoning now. Better safe than sorry I guess... especially if it is causing you problems! Out of curiosity could you tell me what version of Lua you have installed?

I am going to reorganize your commits into a single commit. I'm not sure what you did exactly but I just wanted to let you know that you have three different pairs of author/committer names. 7180fd1 and 311b3c5 also seem to be identical. I don't know how that happened! Under author name I am going to enter RamsesDeNorre ramses.rommel@gmail.com for your commit. This seems nicer because github links it to your github account. Let me know if that is alright.

juster commented 13 years ago

Okay I went ahead and did this really quick. Let me know if you don't like anything about it and I will change the commit. This pull request doesn't know that I have merged your changes, though, because the commit has has changed. I took your change and made a patch with git format-patch. Then I applied it with git am and used --signoff to sign off on it. Very pretty!

your patch: 71666fb81cafbc7686d4b28b5f7076a4024d27ca

Thanks man!

PS You can override the git author and committer name that is assigned to your commit by using the GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_AUTHOR_DATE. There are some for committers too just replace AUTHOR with COMMITTER. I have to use those when developing on many different machines. I'm not sure but they might help you.

r-vdp commented 13 years ago

Yeah I'm trying to get to grips with git and messed something up... I also tried to correct it but I got lost in a total mess of reverts and reverts of reverts and eventually gave up. Thanks for fixing this for me :) I'll further look into all the commiter and author stuff.

I'm using the latest lua from the arch repos, 5.1.4 that is.