cassava / repoctl

Make it easy to manage your local Arch Linux repository.
MIT License
125 stars 14 forks source link

'repoctl down -u' throwing panic and no packages are being downloaded #46

Closed PedroHLC closed 4 years ago

PedroHLC commented 5 years ago

I'm not sure when it started and I'm a little lost:

Console log:

main-builder@aur-builder /t/lab2> repoctl down -u
panic: value method github.com/cassava/repoctl/vendor/github.com/goulash/pacman/aur.NotFoundError.Error called using nil *NotFoundError pointer

goroutine 1 [running]:
github.com/cassava/repoctl/vendor/github.com/goulash/pacman/aur.(*NotFoundError).Error(0x0, 0x3fe, 0x438)
        <autogenerated>:1 +0x71
github.com/cassava/repoctl.(*Repo).FindUpgrades(0xc0001ec0b0, 0xc00000c0a0, 0xc000179a30, 0x0, 0x1, 0xc00011bbd0, 0x5453f7, 0xc0001cc280, 0xc0001b81c0,
 0xe)
        /home/main-builder/pkgwork/src/src/github.com/cassava/repoctl/find.go:81 +0x129
main.glob..func2(0xb89b60, 0xc000179a30, 0x0, 0x1, 0x0, 0x0)
        /home/main-builder/pkgwork/src/src/github.com/cassava/repoctl/cmd/repoctl/down.go:60 +0x4b4
github.com/cassava/repoctl/vendor/github.com/spf13/cobra.(*Command).execute(0xb89b60, 0xc000179a10, 0x1, 0x1, 0xb89b60, 0xc000179a10)
        /home/main-builder/pkgwork/src/src/github.com/cassava/repoctl/vendor/github.com/spf13/cobra/command.go:746 +0x473
github.com/cassava/repoctl/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xb8a220, 0x879462, 0x22, 0x2c)
        /home/main-builder/pkgwork/src/src/github.com/cassava/repoctl/vendor/github.com/spf13/cobra/command.go:831 +0x2dc
github.com/cassava/repoctl/vendor/github.com/spf13/cobra.(*Command).Execute(0xb8a220, 0x0, 0x0)
        /home/main-builder/pkgwork/src/src/github.com/cassava/repoctl/vendor/github.com/spf13/cobra/command.go:784 +0x2b
main.main()
        /home/main-builder/pkgwork/src/src/github.com/cassava/repoctl/cmd/repoctl/main.go:129 +0xdf

Database is the one available at: http://lonewolf-builder.duckdns.org/chaotic-aur/x86_64 Dotfiles are these: https://github.com/PedroHLC/chaotic-aur/tree/master/home/main-builder/.config/repoctl Note: using 0.18 release EDIT: Tested and throwing the same output with latest master commit Also: repoctl status shows Everything up-to-date., and repoctl status -a works great

cassava commented 5 years ago

Hey @PedroHLC, thanks for the bug report! I'll have a look at probably Monday and see if I can find a fix. The information you provided looks helpful.

PedroHLC commented 4 years ago

You can close this if you want, I'm unable to reproduce it anymore...

peshane commented 4 years ago

shoud be reopen, get exactly the same error with v0.19:

~/tmp/pkgbuild » repoctl down -u                                                                                                                                                                 1 ↵
panic: value method github.com/cassava/repoctl/vendor/github.com/goulash/pacman/aur.NotFoundError.Error called using nil *NotFoundError pointer

goroutine 1 [running]:
github.com/cassava/repoctl/vendor/github.com/goulash/pacman/aur.(*NotFoundError).Error(0x0, 0x13d, 0x13d)
        <autogenerated>:1 +0x71
github.com/cassava/repoctl.(*Repo).FindUpgrades(0xc0001d80b0, 0xc0000a6040, 0xc0001809d0, 0x0, 0x1, 0xe, 0xd, 0xc0001c8070, 0xc000105d20, 0x5cbba7)
        /home/peshane/tmp/pkgbuild/repoctl/src/src/github.com/cassava/repoctl/find.go:81 +0x113
main.glob..func2(0xce94e0, 0xc0001809d0, 0x0, 0x1, 0x0, 0x0)
        /home/peshane/tmp/pkgbuild/repoctl/src/src/github.com/cassava/repoctl/cmd/repoctl/down.go:60 +0x4a7
github.com/cassava/repoctl/vendor/github.com/spf13/cobra.(*Command).execute(0xce94e0, 0xc0001809b0, 0x1, 0x1, 0xce94e0, 0xc0001809b0)
        /home/peshane/tmp/pkgbuild/repoctl/src/src/github.com/cassava/repoctl/vendor/github.com/spf13/cobra/command.go:829 +0x453
github.com/cassava/repoctl/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xce9c60, 0x0, 0x0, 0xc0001aa700)
        /home/peshane/tmp/pkgbuild/repoctl/src/src/github.com/cassava/repoctl/vendor/github.com/spf13/cobra/command.go:917 +0x2fb
github.com/cassava/repoctl/vendor/github.com/spf13/cobra.(*Command).Execute(...)
        /home/peshane/tmp/pkgbuild/repoctl/src/src/github.com/cassava/repoctl/vendor/github.com/spf13/cobra/command.go:867
main.main()
        /home/peshane/tmp/pkgbuild/repoctl/src/src/github.com/cassava/repoctl/cmd/repoctl/main.go:129 +0xd3
cassava commented 4 years ago

Thanks for the report!

cassava commented 4 years ago

Hi @peshane, do you have more than 200 packages in your repository?

peshane commented 4 years ago

Hello, 322 packages. May be I should clean this.

cassava commented 4 years ago

Hey @peshane, no that's fine. The function where the problem occurs in has two paths that can be taken: one for less than 200 and one for more. This is because if there are more than 200 packages, I have to use multiple queries to get all the data.

Now, I wasn't able to completely reproduce the problem, but I think I've found a solution to it anyway. That's currently in the devel branch, so if you care to try that out it'd be useful to know if that solves the issue.

cassava commented 4 years ago

I am going to assume that this issue is resolved. Feel free to re-open otherwise.