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

Added info about version pinning #2131

Merged
merged 9 commits into from
Nov 19, 2023
Merged

Conversation

spacemanspiff2007
Copy link
Contributor

Added version pinning

@netlify
Copy link

netlify bot commented Sep 6, 2023

Thanks for your pull request to the openHAB documentation! The result can be previewed at the URL below (this comment and the preview will be updated if you add more commits).

Name Link
🔨 Latest commit 775553b
🔍 Latest deploy log https://app.netlify.com/sites/openhab-docs-preview/deploys/655a8e97c019fd0008eed67b
😎 Deploy Preview https://deploy-preview-2131--openhab-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@stefan-hoehn
Copy link
Contributor

Nice addition (happened to me more than often...)
Do you mind adding how to unpin the version again?

@jimtng
Copy link
Contributor

jimtng commented Sep 17, 2023

The command didn't work for me

root@bd5ad9a07dd5:/# apt install openhab=4.0.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package openhab is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Version '4.0.1' for 'openhab' was not found

It worked without specifying the version

root@bd5ad9a07dd5:/# cat /etc/apt/sources.list.d/openhab.list
deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main
root@bd5ad9a07dd5:/# apt install openhab
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  unzip zip
Suggested packages:
  openjdk-17-jre | java17-runtime | java17-runtime-headless | zulu17-jdk | temurin-17-jdk
The following NEW packages will be installed:
  openhab unzip zip
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 104 MB of archives.
After this operation, 116 MB of additional disk space will be used.
Do you want to continue? [Y/n] ^C

This works though:

root@bd5ad9a07dd5:/# apt-get install openhab=4.0.1-1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  unzip zip
Suggested packages:
  openjdk-17-jre | java17-runtime | java17-runtime-headless | zulu17-jdk | temurin-17-jdk
The following NEW packages will be installed:
  openhab unzip zip
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 104 MB of archives.
After this operation, 116 MB of additional disk space will be used.
Do you want to continue? [Y/n] ^C

@spacemanspiff2007
Copy link
Contributor Author

The command didn't work for me

That's why I added the command to list all available versions.
How can I make it more clear that you have to check the version before pinning?

@stefan-hoehn
Copy link
Contributor

Btw, I guess I misunderstood it, sorry. Is it really about pinning a version or retrieving a particular version?

sudo apt install openhab=4.0.1

installs openHAB 4.0.1

and what happens if I go for the following afterwards?

sudo apt install openhab

Would it still install 4.0.1 (that is what I would understand with "pin") or just get the latest version?

@spacemanspiff2007
Copy link
Contributor Author

@stefan-hoehn
I am 100% sure any more that my example works as expected. I rephrased to use apt-mark.
If you specify openHAB manually apt should always do the installation.
The idea is to prevent an unexpected upgrade when running apt upgrade.

@spacemanspiff2007
Copy link
Contributor Author

Build fails unrelated

@stefan-hoehn
Copy link
Contributor

@spacemanspiff2007 Unfortunately I was off for quite some time. Sorry for that delay!

I finally fixed the related file. Do you mind rebasing and pushing again?

Copy link
Contributor

@stefan-hoehn stefan-hoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but please rebase due to the related issue.

Edit: I was able to do the rebase myself.

@stefan-hoehn stefan-hoehn added this to the 4.1 milestone Nov 19, 2023
@stefan-hoehn stefan-hoehn merged commit 12677ea into openhab:main Nov 19, 2023
5 checks passed
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