Really easy branching of Ubuntu packages

Bug #609186 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Barry Warsaw
Ubuntu Distributed Development
Triaged
High
Unassigned

Bug Description

We talked about this at the Platform Rally in Prague.

You know what would be really cool? bzr branch ubuntu:foo where 'foo' can be either the binary or source package name. This would always look up the source package name and give you the lp:ubuntu/foosrc checkout, however if that is out-of-date or has other problems, it would:

 * apt-get source foosrc
 * bzr add *
 * bzr commit

to give you a dvcs controlled source branch in all cases. It *might* be better to provide a warning and not do the apt-get source if there's a problem, but to support that with a switch (e.g. bzr branch ubuntu:foo --allow-aptget or some such).

Related branches

Revision history for this message
Barry Warsaw (barry) wrote :

See also bug 609187 for a possibly related ui request.

James Westby (james-w)
Changed in udd:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 609186] [NEW] Really easy branching of Ubuntu packages

On Fri, 2010-07-23 at 14:44 +0000, Barry Warsaw wrote:
> We talked about this at the Platform Rally in Prague.
>
> You know what would be really cool? bzr branch ubuntu:foo where 'foo'
> can be either the binary or source package name. This would always look
> up the source package name and give you the lp:ubuntu/foosrc checkout,
> however if that is out-of-date or has other problems, it would:
>
> * apt-get source foosrc
> * bzr add *
> * bzr commit
>
> to give you a dvcs controlled source branch in all cases. It *might* be
> better to provide a warning and not do the apt-get source if there's a
> problem, but to support that with a switch (e.g. bzr branch ubuntu:foo
> --allow-aptget or some such).
FWIW it's already possible to use "bzr branch deb:foo" to do this for
the Debian sources, though that goes out to the VCS location declared in
the package (Vcs-Bzr/Vcs-Git/...) rather than to Launchpad.

Cheers,

Jelmer

Revision history for this message
Barry Warsaw (barry) wrote :

I have a branch at the project bzr-debuntu which adds ubuntu: and debian: urls (along with u: and d: shortcuts, as well as nice shortcuts for the distroseries). After chatting with James W, we agreed to merge it into bzr-bd, which I'm about to do. The changes are pretty simple; they actually call the lp_directory module to return the equivalent lp: branches). However, do you think having the debian: and d: schemes that make to Launchpad urls are too confusing when there's a deb: scheme with different semantics?

OTOH, I can't think of anything other than debian: for this.

Branch coming soon.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 609186] Re: Really easy branching of Ubuntu packages

On Mon, 27 Sep 2010 17:42:42 -0000, Barry Warsaw <email address hidden> wrote:
> I have a branch at the project bzr-debuntu which adds ubuntu: and
> debian: urls (along with u: and d: shortcuts, as well as nice shortcuts
> for the distroseries). After chatting with James W, we agreed to merge
> it into bzr-bd, which I'm about to do. The changes are pretty simple;
> they actually call the lp_directory module to return the equivalent lp:
> branches). However, do you think having the debian: and d: schemes that
> make to Launchpad urls are too confusing when there's a deb: scheme with
> different semantics?
>
> OTOH, I can't think of anything other than debian: for this.

I agree, it is confusing, but I have no idea what else we would use.

Perhaps we could rename deb:, but I'm not sure what we would call that
either. Perhaps ask Jelmer, as he wrote it and uses it.

Thanks,

James

Revision history for this message
Barry Warsaw (barry) wrote :

perhaps s/deb:/vcs:/

What do you think Jelmer?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Hi Barry!

Nice to see these two extra aliases.

As these locations would be the canonical locations for Ubuntu packages I agree "ubuntu:" is appropriate for the Ubuntu packages. I think using "debian:" for the Debian packages is confusing. E.g. "debian:samba4" on Debian systems would fetch from Launchpad while the primary branch is hosted on alioth and has a completely different revision history. Contributors can only submit bundles against the branch on alioth. What about something like "lp-debian:"?

"vcs:" might be confusing on e.g. Fedora systems with bzr installed. Perhaps "apt:" or "apt-vcs:" ?

Using single letters for Debian releases is a bad idea imho, there is some overlap there (e.g. sid and squeeze, etch and experimental) that is only confusing.

Just a thought; Given these add directory services are specific to Launchpad and don't rely on anything else in builddeb it seems to me that the Launchpad plugin would be a more appropriate place for them. That way people not using bzr-builddeb would also be able to use them, and they are less prone to break because of changes in bzrlib.plugins.launchpad.

Revision history for this message
Barry Warsaw (barry) wrote :

Hi Jelmer,

I see your point about the confusion with debian: but lp-debian: is so ugly! :) I don't like the dashes.

Maybe debianlp: which would still let us have the 'd:' shortcut. What do you think?

apt: is a nice replacement for deb:

I can see the sense it makes to add it to the launchpad (builtin) plugin. I don't have a strong opinion about it, except that maybe this is a nice little carrot to help people get into udd. But if you and James thinks it's better off in the launchpad plugin, let me know and I'll work up a branch for that.

Where is deb: added (so that I can work up a patch to change that to apt: too).

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Hi Barry,

On Tue, 2010-09-28 at 18:54 +0000, Barry Warsaw wrote:
> I see your point about the confusion with debian: but lp-debian: is so
> ugly! :) I don't like the dashes.
>
> Maybe debianlp: which would still let us have the 'd:' shortcut. What
> do you think?
debianlp: or deblp: sounds good to me. I still think the "d:" is a bad
idea for the reason mentioned earlier. At the very least we would have
to disable it in the bzr-builddeb we upload to Debian, but even so it
would still be bad to have Ubuntu in case e.g. an ubuntu member wants to
contribute a branch back to Debian.

> apt: is a nice replacement for deb:

> I can see the sense it makes to add it to the launchpad (builtin)
> plugin. I don't have a strong opinion about it, except that maybe this
> is a nice little carrot to help people get into udd. But if you and
> James thinks it's better off in the launchpad plugin, let me know and
> I'll work up a branch for that.
FWIW I think the lp plugin would be slightly more appropriate, but
either would be a good home for these directories.

> Where is deb: added (so that I can work up a patch to change that to
> apt: too).
It lives in bzr-builddeb's directory.py.

Cheers,

Jelmer

Revision history for this message
James Westby (james-w) wrote :

On Tue, 28 Sep 2010 18:54:46 -0000, Barry Warsaw <email address hidden> wrote:
> Hi Jelmer,
>
> I see your point about the confusion with debian: but lp-debian: is so
> ugly! :) I don't like the dashes.
>
> Maybe debianlp: which would still let us have the 'd:' shortcut. What
> do you think?

Do we need to provide directory services? We were discussing a
different command as well at some point. Would that serve the need?

> apt: is a nice replacement for deb:

Agreed.

> I can see the sense it makes to add it to the launchpad (builtin)
> plugin. I don't have a strong opinion about it, except that maybe this
> is a nice little carrot to help people get into udd. But if you and
> James thinks it's better off in the launchpad plugin, let me know and
> I'll work up a branch for that.

I would be fine with the LP plugin given what it is doing right now. If
we wanted to do extra things then it may not be appropriate.

> Where is deb: added (so that I can work up a patch to change that to
> apt: too).

__init__.py

Thanks,

James

Revision history for this message
Barry Warsaw (barry) wrote :

re: another command. we could certainly do that; it would allow us to do apt-get source when there's a problem with the source branch. but otoh, there shouldn't be problems with the source branches, right? <wink> i do like being able to just 'bzr branch' like normal.

re: debianlp: maybe we should just support ubuntu:squeeze/foo and ubuntu:lenny/foo. we do get into a tricky area here with shortcuts in the distroseries position though. for now i'm only supporting the distroseries that launchpad support (though hardcoded in the plugin rather than consulting lp). i think we can avoid name collisions, because "ubuntu:squeeze" would have to be the squeeze package's source branch in the default distroseries, while "ubuntu:squeeze/squeeze" would be the same package in debian squeeze. we're probably safe until ubuntu 13.10's squishy squeeze ;)

so how about this:

 * move the directory services to lp plugin
 * support ubuntu:<distroseries>/<package> where 'distroseries' can be any ubuntu or debian series
 * support ubuntu:<package> for default distroseries (yeah, but for ubuntu or debian? i say the former, and be explicit about the
   distroseries if you want debian
 * u: is an acceptable alias for ubuntu:
 * rename deb: to apt:

this would still let me 'bzr branch u:gtimelog' which is about as short as it gets. how's that sound?

Revision history for this message
James Westby (james-w) wrote :

On Tue, 28 Sep 2010 20:49:18 -0000, Barry Warsaw <email address hidden> wrote:
> re: another command. we could certainly do that; it would allow us to
> do apt-get source when there's a problem with the source branch. but
> otoh, there shouldn't be problems with the source branches, right?
> <wink> i do like being able to just 'bzr branch' like normal.

That's what we discussed in Prague.

> re: debianlp: maybe we should just support ubuntu:squeeze/foo and
> ubuntu:lenny/foo. we do get into a tricky area here with shortcuts in
> the distroseries position though. for now i'm only supporting the
> distroseries that launchpad support (though hardcoded in the plugin
> rather than consulting lp). i think we can avoid name collisions,
> because "ubuntu:squeeze" would have to be the squeeze package's source
> branch in the default distroseries, while "ubuntu:squeeze/squeeze" would
> be the same package in debian squeeze. we're probably safe until ubuntu
> 13.10's squishy squeeze ;)

> so how about this:
>
> * move the directory services to lp plugin
> * support ubuntu:<distroseries>/<package> where 'distroseries' can be
> any ubuntu or debian series

Seems a little hedgemonic to me.

> * support ubuntu:<package> for default distroseries (yeah, but for ubuntu or debian? i say the former, and be explicit about the
> distroseries if you want debian
> * u: is an acceptable alias for ubuntu:
> * rename deb: to apt:
>
> this would still let me 'bzr branch u:gtimelog' which is about as short
> as it gets. how's that sound?

I like the push to make this easier for people to deal with, but I'm not
sure a quest for the fewest characters is necessarily the right way.

I think Jelmer's concerns are well founded, but I'm not sure how best to
reconcile then with our desires at this point.

Thanks,

James

Revision history for this message
Barry Warsaw (barry) wrote :

The u: shortcut isn't terribly important. Though i think it would be nice, I can live without it.

I definitely want to be able to fairly easily and obviously get to source branches in Ubuntu and Debian.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Tue, 2010-09-28 at 21:16 +0000, James Westby wrote:
> On Tue, 28 Sep 2010 20:49:18 -0000, Barry Warsaw <email address hidden> wrote:
> > re: another command. we could certainly do that; it would allow us to
> > do apt-get source when there's a problem with the source branch. but
> > otoh, there shouldn't be problems with the source branches, right?
> > <wink> i do like being able to just 'bzr branch' like normal.
> That's what we discussed in Prague.
A directory service also seems the most natural to me. There are quite a
few commands that support directory services and being able to do e.g.
"bzr missing -v ubuntu:tdb" is quite neat.

> > re: debianlp: maybe we should just support ubuntu:squeeze/foo and
> > ubuntu:lenny/foo. we do get into a tricky area here with shortcuts in
> > the distroseries position though. for now i'm only supporting the
> > distroseries that launchpad support (though hardcoded in the plugin
> > rather than consulting lp). i think we can avoid name collisions,
> > because "ubuntu:squeeze" would have to be the squeeze package's source
> > branch in the default distroseries, while "ubuntu:squeeze/squeeze" would
> > be the same package in debian squeeze. we're probably safe until ubuntu
> > 13.10's squishy squeeze ;)
>
> > so how about this:
> >
> > * move the directory services to lp plugin
> > * support ubuntu:<distroseries>/<package> where 'distroseries' can be
> > any ubuntu or debian series
> Seems a little hedgemonic to me.
It seems strange to me that debian distroseries would live in the
"ubuntu:" namespace. If we e.g. end up also importing mepis or gnewsense
into Launchpad this may become problematic (and even more confusing).

> > * support ubuntu:<package> for default distroseries (yeah, but for ubuntu or debian? i say the former, and be explicit about the
> > distroseries if you want debian
> > * u: is an acceptable alias for ubuntu:
> > * rename deb: to apt:
> >
> > this would still let me 'bzr branch u:gtimelog' which is about as short
> > as it gets. how's that sound?
>
> I like the push to make this easier for people to deal with, but I'm not
> sure a quest for the fewest characters is necessarily the right way.
>
> I think Jelmer's concerns are well founded, but I'm not sure how best to
> reconcile then with our desires at this point.
We all seem to agree that supporting "ubuntu:" for Ubuntu packages and
renaming "deb:" to "apt:" is a good idea. Fetching Ubuntu packages seems
like the most common use case for udd anyway. I don't want to dismiss
the other bits of your branch but perhaps we can get those in first then
consider the other things?

I personally prefer "ubuntu:" over "u:" as well, because it is clearer
and not that much longer. Somebody reading over my shoulder or reading a
blog post will probably be able to guess what "bzr log ubuntu:samba"
does. There obviously is a tradeoff there between readability and
command length there. I'm glad we don't have "bzr log -r a:../bla" as an
alias of "bzr log -r ancestor:../bla", but that we do have -r as an
alias of --revision.

Cheers,

Jelmer

James Westby (james-w)
tags: added: bzr-builddeb usability
Revision history for this message
Barry Warsaw (barry) wrote :

On Sep 28, 2010, at 10:11 PM, Jelmer Vernooij wrote:

>It seems strange to me that debian distroseries would live in the
>"ubuntu:" namespace. If we e.g. end up also importing mepis or
>gnewsense into Launchpad this may become problematic (and even more
>confusing).

Fair enough.

I'd still like a shortcut for the Debian branches in Launchpad...

>> I think Jelmer's concerns are well founded, but I'm not sure how
>> best to reconcile then with our desires at this point.
>We all seem to agree that supporting "ubuntu:" for Ubuntu packages and
>renaming "deb:" to "apt:" is a good idea. Fetching Ubuntu packages
>seems like the most common use case for udd anyway. I don't want to
>dismiss the other bits of your branch but perhaps we can get those in
>first then consider the other things?

+1

>I personally prefer "ubuntu:" over "u:" as well, because it is clearer
>and not that much longer. Somebody reading over my shoulder or reading
>a blog post will probably be able to guess what "bzr log ubuntu:samba"
>does. There obviously is a tradeoff there between readability and
>command length there. I'm glad we don't have "bzr log -r a:../bla" as
>an alias of "bzr log -r ancestor:../bla", but that we do have -r as an
>alias of --revision.

Sounds good. I can live without u:

How about this as a plan of action:

* rename deb: to apt:
* add ubuntu: to the lp directory service
* add debianlp: to the lp directory service

If y'all agree, I'll port my patch over to bzr.

-Barry

Revision history for this message
Barry Warsaw (barry) wrote :

Oh, one other question. If we don't support u: as a shortcut for ubuntu:, do we want to support ubuntu:m/foo as a shortcut for ubuntu:maverick/foo? I'm assuming "no".

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Fix Released
milestone: none → 2.1.4
milestone: 2.1.4 → 2.3b3
Vincent Ladeuil (vila)
Changed in bzr:
assignee: nobody → Barry Warsaw (barry)
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.