-
Notifications
You must be signed in to change notification settings - Fork 45
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
Migrate update logic to Debian package #1076
Migrate update logic to Debian package #1076
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also like to move the config migration code to the debian package.
pkg/util/updater/updater.go
Outdated
u.log.Warnf("%v is not found in update, skipping", binary) | ||
return nil | ||
func (u *Updater) addRepo() error { | ||
if err := exec.Command("sudo", "add-apt-repository", "deb http://176.9.28.105 sid main").Run(); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the domain here? It is deb.skywire.skycoin.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mh, I used URLs in wiki page that Moses created. I'll change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
pkg/util/updater/updater.go
Outdated
|
||
if _, err := io.Copy(out, resp.Body); err != nil { | ||
return "", err | ||
func (u *Updater) restartBoard() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a restart needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I thought, based on logic of Moses Debian package. I'll check it with him again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I change it to restart service, not the board at all.
@jdknives you are referring to issue #1070? @mrpalide why are we doing repository configuration here? Configuring the repository initially is probably not desirable for users if it was not already configured. They probably downloaded it directly. the
In the second place nothing else will run after that. The function won't return anything, the process will be killed. A new instance may start but there is no way to know and not a good way to test. you are uninstalling the program that is currently executing this command. the process will be killed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good. Can't test it as I have misplaced my RPi.
Did you run
make format && make check
? YesFixes #1070
Changes:
How to test this PR:
GOOS=linux GOARCH=arm64 GOARM=6 make build BUILDTAG=linux_arm64
. (I usearm64
because of my board RPi4, you should use your own board architect)./usr/bin
:skywire-cli
skywire-visor
setup-node
apps/*