[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: "remote origin already exists" when running dpt alioth-repo



Hi Andy,

Andrew Beverley wrote:
> On Sun, 2015-06-07 at 12:51 +0200, Axel Beckert wrote:
> > > Initialized empty shared Git repository
> > > in /srv/git.debian.org/git/pkg-perl/packages/libdpkg-parse-perl.git/
> > 
> > Hmmm. That does not (or at least no more) exist for me. Maybe the
> > failure below cleaned it up. Or Salvatore cleaned it up as well:
> > 
> > 10:40:19 <KGB-0:#debian-perl> Salvatore Bonaccorso master 3c8224e meta
> > .mrconfig Remove duplicate entry for libdpkg-parse-perl * http://deb.li/3qvbV
> 
> Sorry, I have probably misunderstood things here. I deleted
> /srv/git.debian.org/git/pkg-perl/packages/libdpkg-parse-perl.git/
> thinking that it would return things to as they were.

Ah, ok. No, that's mostly fine! I'd have deleted that repository, too,
before trying again.

> However, looks like there is something more complicated going on
> than I thought.

Slightly more complicated, but not much. :-)

dpt alitoh-repo also adds the newly created repo to our .mrconfig
file[1] -- which actually lists all our git repos. This allows us to
checkout all our git repos at once (well, takes an hour or more :-)
with one command using "mr" from the package "myrepos". That way we
can do mass-commits over thousands of packages without too much
effort.

[1] See https://anonscm.debian.org/cgit/pkg-perl/meta.git/tree/

> I assume that will happen again if I try running "dpt alioth-repo"
> again?

Yes. Basically, with the deletion of
/srv/git.debian.org/git/pkg-perl/packages/libdpkg-parse-perl.git/ that
.mrconfig should have been updated, too.

But if you get this working soon, it should suffice to later remove
the duplicate entry again.

> > > fatal: remote origin already exists.
> > > 
> > > Note the last error. Whilst I understand the error message, I'm not sure
> > > why it appears to be trying to create a new remote when this is the
> > > first time I am pushing the package.
> > 
> > You're understanding it correctly. The purpose of that script is to
> > configure _and_ first-time push a so far only local git repo so that
> > it works as expected together with Alioth.
> > 
> > > What am I doing wrong?
> > 
> > Your git repository likely already has a remote named "origin".
> 
> It does, but that was added by dh-make-perl (I assume)

Hrm. Can't remember. I think it doesn't. But a previous and failed "dpt
alioth-repo call" would have.

> # git remote -v
> origin	ssh://git.debian.org/git/pkg-perl/packages/libdpkg-parse-perl.git
> (fetch)
> origin	ssh://git.debian.org/git/pkg-perl/packages/libdpkg-parse-perl.git
> (push)

Looks as expected, indeed.

If you happen to be stuck in that situation again, chances are high
that a "dpt push" does all what remains to be done. (Except removing
that duplicate .mrconfig entry. :-)

> > Try "git remote rename origin old-origin" and then try "dpt
> > alioth-repo" again.
> 
> I'll try that in a moment (once I've done some updates to the package).
> However, am I doing something wrong for dh-make-perl to add "origin" and
> then "dpt alioth-repo" to try adding it again?

Currently don't know by mind. As mentioned, I think dh-make-perl
doesn't do that.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE


Reply to: