Page 1 of 1

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

Posted: June 15th, 2016, 8:26 am
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
.

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

Posted: June 15th, 2016, 10:31 am
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.

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

Posted: June 15th, 2016, 1:07 pm
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

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

Posted: June 15th, 2016, 2:09 pm
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

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

Posted: June 15th, 2016, 2:33 pm
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!

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

Posted: June 16th, 2016, 1:53 am
by safihre
Is this something we should put on the new Wiki?
Seems like a good thing to have a stable and beta branch :)

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

Posted: June 16th, 2016, 3:11 am
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!

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

Posted: June 16th, 2016, 4:17 am
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 :)

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

Posted: June 17th, 2016, 9:17 am
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).

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

Posted: August 24th, 2016, 10:29 pm
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

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

Posted: August 25th, 2016, 1:56 am
by safihre
You are completely right! Fixed it.
Thank you :)