ubuntu-helpers: New script "enable-proposed"

Bryce Harrington bryce.harrington at canonical.com
Wed Jul 22 19:39:50 UTC 2020

On Wed, Jul 22, 2020 at 08:57:05AM -0500, Simon Quigley wrote:
> Hello,
> On 7/22/20 8:22 AM, Dan Streetman wrote:
> > Since it's related to this topic, the add-apt-repository in this ppa
> > has support for adding/enabling deb-src and arbitrary pockets as well
> > as private ppas and more:
> > https://launchpad.net/~ubuntu-support-team/+archive/ubuntu/add-apt-repository

If that makes it easy to enable -proposed, that would indeed be very

Googling "how to enable -proposed from CLI" returns too many results
that have people either hand edit sources.list or simply append
hand-written deb strings.  If those docs can give a simple-to-run
invocation of add-apt-repository it would help eliminate user error and

> > I need to find some time to push the changes into the upstream repo.
> > https://code.launchpad.net/~ubuntu-support-team/software-properties/+git/software-properties/+ref/devel
> Merged, here you go:
> https://launchpad.net/ubuntu/+source/software-properties/0.99.0
> (We're still a little bit away from Feature Freeze and we just released
> an LTS. Now is the time to test major updates to software.)
> On 7/21/20 8:37 PM, Bryce Harrington wrote:> I've also added an
> 'enable-proposed' script, similar to enable-debsrc,
> > which adds DIST-proposed entries (deb and deb-src) for components
> > currently enabled.  IOW, if you don't have
> > universe/restricted/multiverse components enabled for anything, it won't
> > add them for -proposed, but if you do, it will.
> > 
> > The script also strives to use the same archive URI you are using for
> > the main component, so if you're using a mirror it will also pull
> > -proposed from that mirror too.
> > 
> > https://git.launchpad.net/~ubuntu-server/ubuntu-helpers/tree/bryce/enable-proposed
> Thanks for your work here! How much of this is now in Groovy with the
> above changes, and what can be merged into software-properties?

Not sure, but I did notice a couple things I wished were in the API.

First, a way to easily fuzzy search for a given entry, such as the one
for the main component.  I ended up just iterating through all the
components and examining their props, but it feels a bit brittle.  A
sp.sourceslist.search() or similar would have given a cleaner solution.

Second, I'm not sure whether it's expected that users should access the
internals of entries (e.g. entry.dist, entry.file).  If so, the docs
don't document them and would make them more convenient to use.  If not,
then getter/setter routines or similar might be appropriate.

> Thanks Dan and Bryce, this definitely makes things a lot easier.

Hey and thanks for maintaining SoftwareProperties.  Going into this task
I was anticipating needing to parse sources.list myself, so in examining
add-apt-repository's code was pleased to discover SoftwareProperties and
find that it did most of the work for me, and let me make very short
scripts.  :-)


More information about the ubuntu-server mailing list