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

Lock Install to Python 2.x #10

Merged
merged 5 commits into from
Jan 3, 2020
Merged

Lock Install to Python 2.x #10

merged 5 commits into from
Jan 3, 2020

Conversation

dkinon
Copy link

@dkinon dkinon commented Jan 1, 2020

Temporarily lock down apt install of mopidy and mopidy-spotify to version that support python 2.x
Add python/pip check to verify that pip exists and is from python 2.x

Temporarily lock down apt install of mopidy and mopidy-spotify to version that support python 2.x
Add python/pip check to verify that pip exists and is from python 2.x
@dkinon
Copy link
Author

dkinon commented Jan 1, 2020

I took the liberty of adding a python/pip 2.x check along with the proposed apt fixes. I figured we can just flip PYTHON_MAJOR_VERSION=3 when it's time for the python3 install script.

@docmollo
Copy link

docmollo commented Jan 1, 2020

I'm not in a place today where I can test this, but it looks good readding through it. If needed, I could test this tomorrow (Jan 2, PST).

@Gadgetoid
Copy link
Member

Gadgetoid commented Jan 2, 2020

Looks like

apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss" mopidy > /dev/null 2>&1

stomps all over your previous version-pinned install and doesn't heed "apt-hold".

I'll see if I can work around that. Although I wonder if it's truly necessary- the objective is to reset the installed config file to the distro default before appending custom config to it.

I was installing on a non-clean system, so I get to find all the edge case bugs :D

I suspect just changing that line to the following will work:

sudo apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss" mopidy=2.3.1-1

@Gadgetoid
Copy link
Member

I'm happy to merge this and make the minor change to the reinstall directive.

@docmollo if you're happy to give it a go, I'd appreciate your input too before I hit merge!

@dkinon
Copy link
Author

dkinon commented Jan 2, 2020

@Gadgetoid got it, we (@docmollo and I) didn't test an existing installation, just a fresh one. I'll hit up @docmollo and see if we can verify the conf reset with mopidy=2.3.1-1. I'm pretty sure we can figure this out but, worst case, would you be okay disabling that block until we are on python3 and unpinned?

Daniel Kinon added 4 commits January 2, 2020 09:34
…r-lite and pip check

Tokenize package versions
Add package version to mopidy conf reset
Tokenize pip bin path in prep for switch to python3 pip3
Add inform and echo lines to make output easier to eye parse.
@docmollo
Copy link

docmollo commented Jan 2, 2020

OK....after many gyrations and updates/fixes, I think we have a winner. I've tested the latest commit from a fresh Raspbian Buster Lite install and all works as expected. I say merge! Quick, before it breaks again!

@dkinon
Copy link
Author

dkinon commented Jan 2, 2020

@Gadgetoid I tested along with @docmollo. While he did a fresh install, I installed over my existing messy not-so-fresh install and everything still worked. So I think we are good! And let us know if we can help with anything else, this was fun!

@Gadgetoid Gadgetoid merged commit 6f8a757 into pimoroni:master Jan 3, 2020
@Gadgetoid
Copy link
Member

Really great stuff- it's been a pleasure having your input.

I've got the migrations for Mopidy-PiDi and Mopidy-Raspberry-GPIO to Python 3 in hand, but with Iris not updated to Python 3 yet there's not much I can do but twiddle my thumbs and wait. (I wish I had time to volunteer to help!)

Thanks all!

One thing we'd like to do long term is make this even easier for end-users to install. Maybe shipping a Pirate Audio distro based on Raspbian (since it's the most readily extensible jumping off point for users wanting to modify/enhance their project).

@docmollo
Copy link

docmollo commented Jan 3, 2020

You're welcome, @Gadgetoid. Happy I could help out!

Looking at Iris issue #356, it looks like they're making progress and he mentioned hopes to have something by the end of January. 🤞

With regard to the custom Raspbian, do you mean like what you did for the Keybows? That would be interesting and cool. I've never messed around with creating my own Raspbian (or even Linux) distro, but this sounds like an interesting thing I should mess around with.

@docmollo
Copy link

docmollo commented Jan 4, 2020

Well shoot...just found a bug. I just ran through another clean install this morning to verify and it is indeed an issue. Once everything is done, the hold on mopidy is wiped out. I suspect it's the step near the end that resets the mopidy config file.

This could be easily fixed by adding one last apt-mark at the very end of the install script....or perhaps wait until then to run that command. For what it's worth, the hold on mopidy-spotify still exists at the end of the install.

@dkinon can you push this fix? If not, I'm sure I can get an environment setup and do it.

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

Successfully merging this pull request may close these issues.

3 participants