PPA: two channels (stable, beta) instead of one?

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

PPA: two channels (stable, beta) instead of one?

Post by sander »

@jcfp

My Ubuntu 14.04 LTS server just updated SABnzbd to "sabnzbdplus:all 1.1.0~beta1a-0ubuntu1~jcfp1~trusty", thanks to the PPA setting. So that is a beta version on my server.

I love beta's (on my laptop for example), but sometimes I prefer the recent stable versions (on a stable server).

So my preferred setup:
SAB 1.0.3 on my 14.04 Server
SAB 1.1.0 beta on my laptop.

Is there a way I can achieve that with PPA?

If not, would a "stable channel" and a "beta channel" PPA solve it, and would it be feasible? A bit like http://www.ubuntuupdates.org/ppa/google_chrome

Code: Select all

Date	Package	Version
2016-06-09 22:08:06 UTC	google-chrome-unstable	53.0.2763.0-1
2016-06-08 18:07:55 UTC	google-chrome-beta	52.0.2743.33-1
2016-06-06 19:07:48 UTC	google-chrome-stable	51.0.2704.84-1
.
User avatar
jcfp
Release Testers
Release Testers
Posts: 986
Joined: February 7th, 2008, 12:45 pm

Re: PPA: two channels (stable, beta) instead of one?

Post by jcfp »

From my end, the only way to do this would be two seperate ppas. As a user, you could probably get away with apt pinning.

Try something like this, in some file in /etc/apt/preferences.d/:

Code: Select all

Package: sabnzbdplus
#Pin: origin ppa.launchpad.net
Pin: origin lp-ppa-jcfp
Pin: version /~alpha|~beta|~rc/
Pin-Priority: -1
This should set prio to -1 (= don't install) for the sab package from the ppa, if the version matches the given expression (i.e. any non-final release). See man apt_preferences for the details.
Result:
$ apt-cache policy sabnzbdplus
sabnzbdplus:
Installed: (none)
Candidate: 0.7.20+dfsg-1
Version table:
1.1.0~beta1a-0ubuntu1~jcfp1~xenial -1
500 http://ppa.launchpad.net/jcfp/ppa/ubuntu xenial/main amd64 Packages
500 http://ppa.launchpad.net/jcfp/ppa/ubuntu xenial/main i386 Packages
100 /var/lib/dpkg/status
0.7.20+dfsg-1 500
500 http://nl.archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages
500 http://nl.archive.ubuntu.com/ubuntu xenial/multiverse i386 Packages
Your only issue with pinning would be the starting time of right now, given that there's a beta on the ppa and thus the only package considered for install is the one from the "slightly behind" standard repo.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: PPA: two channels (stable, beta) instead of one?

Post by sander »

OK, that solution would be great.

Result so far:

Code: Select all

$ apt-cache policy sabnzbdplus
sabnzbdplus:
  Installed: 1.0.3-0ubuntu1~jcfp1~trusty
  Candidate: 1.1.0~beta1a-0ubuntu1~jcfp1~trusty
  Version table:
     1.1.0~beta1a-0ubuntu1~jcfp1~trusty 0
        500 http://ppa.launchpad.net/jcfp/ppa/ubuntu/ trusty/main amd64 Packages
 *** 1.0.3-0ubuntu1~jcfp1~trusty 0
        100 /var/lib/dpkg/status
     0.7.16-1ubuntu1 0
        500 http://nl.archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages
N: Ignoring file 'ppa-sabnzbd-stable-only-please.txt' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension
Ouch ... that last line is not good. So I removed the extension. Result:

Code: Select all

$ apt-cache policy sabnzbdplus
sabnzbdplus:
  Installed: 1.0.3-0ubuntu1~jcfp1~trusty
  Candidate: 1.0.3-0ubuntu1~jcfp1~trusty
  Package pin: 1.1.0~beta1a-0ubuntu1~jcfp1~trusty
  Version table:
     1.1.0~beta1a-0ubuntu1~jcfp1~trusty -1
        500 http://ppa.launchpad.net/jcfp/ppa/ubuntu/ trusty/main amd64 Packages
 *** 1.0.3-0ubuntu1~jcfp1~trusty -1
        100 /var/lib/dpkg/status
     0.7.16-1ubuntu1 -1
        500 http://nl.archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages
Is this correct? I can't find documentation to verify ... https://wiki.debian.org/AptPreferences says "apt-cache policy package gives information about the selection process. Unfortunately, it is not widely known what the output means. " ... :o
User avatar
jcfp
Release Testers
Release Testers
Posts: 986
Joined: February 7th, 2008, 12:45 pm

Re: PPA: two channels (stable, beta) instead of one?

Post by jcfp »

It looks weird, as if all priorities are set to -1? Maybe changes between trusty and xenial... I dunno.

Anyway. https://launchpad.net/~jcfp/+archive/ubuntu/nobetas is born. I trust there'll be plenty of guinea pigs left on the original ;D
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: PPA: two channels (stable, beta) instead of one?

Post by sander »

I replaced the plain ppa setting with "nobetas", ran update/upgrade/etc, and:

Code: Select all

$ apt-cache policy sabnzbdplus
sabnzbdplus:
  Installed: 1.0.3-0ubuntu1~jcfp1~trusty
  Candidate: 1.0.3-0ubuntu1~jcfp1~trusty
  Version table:
 *** 1.0.3-0ubuntu1~jcfp1~trusty 0
        500 http://ppa.launchpad.net/jcfp/nobetas/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     0.7.16-1ubuntu1 0
        500 http://nl.archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages
and

Code: Select all

$ sabnzbdplus --version

sabnzbdplus-1.0.3

... seems to work!

Cool! Thank you!
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: PPA: two channels (stable, beta) instead of one?

Post by safihre »

Is this something we should put on the new Wiki?
Seems like a good thing to have a stable and beta branch :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: PPA: two channels (stable, beta) instead of one?

Post by sander »

safihre wrote:Is this something we should put on the new Wiki?
Yes.

Instead of

Code: Select all

sudo add-apt-repository ppa:jcfp/ppa
just

Code: Select all

sudo add-apt-repository ppa:jcfp/nobetas
I could change it on the Wiki http://wiki.sabnzbd.org/install-ubuntu-repo, but it says "The following part is (c) 2008 by JCF Ploemen", and thus I don't know if I'm allowed to add anything (IANAL).
safihre wrote: Seems like a good thing to have a stable and beta branch :)
Indeed!
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: PPA: two channels (stable, beta) instead of one?

Post by safihre »

Please don't change the Wiki, I just finished the monstrous process of transferring all wiki pages to the new wiki. We can make the changes there :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
jcfp
Release Testers
Release Testers
Posts: 986
Joined: February 7th, 2008, 12:45 pm

Re: PPA: two channels (stable, beta) instead of one?

Post by jcfp »

I'll soon update the forum threads detailing the use of the ppa on ubuntu and debian to include the nobetas option. Info should obviously go on the wiki too someday (or simply linked from there to the relevant forum threads).
dax
Newbie
Newbie
Posts: 1
Joined: August 24th, 2016, 10:25 pm

Re: PPA: two channels (stable, beta) instead of one?

Post by dax »

FYI, the wiki has the wrong string for the repo (https://sabnzbd.org/wiki/installation/i ... buntu-repo):

Code: Select all

sudo add-apt-repository ppa:jcfp/nobeta
and it looks like it should be

Code: Select all

sudo add-apt-repository ppa:jcfp/nobetas
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: PPA: two channels (stable, beta) instead of one?

Post by safihre »

You are completely right! Fixed it.
Thank you :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply