Cannot install git-svn apt-package

I was trying to install git svn apt package on xenial, and ran into the following error

The following packages have unmet dependencies:
git-svn : Depends: git (< 1:2.7.4-.)
E: Unable to correct problems, you have held broken packages.

I cannot reproduce the error on a xenial docker container and essentially the same build script worked on xenial 20 days ago.

Not entirely sure how to work around this without requiring sudo access, which I have thus far avoided.

We will be moving to GCP for all Linux builds, so you will be able to assume sudo will be available.

In the mean time, though, if git-svn can’t satisfy the dependency, then there is not much we can do to avoid it. (In other words, the failure will happen outside the context of Travis CI.)

As I mentioned I have thus far been unable to reproduce it outside of travis. I think the dependency issue stems from the installation of a much newer git (2.19.1) then is available by default on xenial.

Could you tell me how you are installing git on the images so I can try to reproduce it locally and figure out a workaround?

We install it from git-core/git PPA.


https://launchpad.net/~git-core/+archive/ubuntu/ppa

I had the same git-svn install problem. After quite some experiments I got it working with the following work-around:

before_install:
  - sudo apt-get remove git git-man
  - sudo add-apt-repository --remove --yes ppa:git-core/ppa
  - sudo apt-get update
  - sudo apt-get install --yes git git-svn

According to https://packages.ubuntu.com/search?keywords=git-svn, git-svn is in the universe repository.

So as per software center - How do I enable the “Universe” repository? - Ask Ubuntu, the following should work:

sudo add-apt-repository universe
sudo apt update
sudo apt install git-svn

Apparently, the universe repository is already enabled (and always was), as the git-svn package is found just fine :slight_smile: It is found, because it complains about the git version.

The problem is that the xenial-universe version of git-svn requires an older git package than found in the git PPA that travis uses.

Oh, I see, their Git is not from the stock package but from some third-party one.
(For some reason, they also have git-core of an earlier version, with intersecting files)
Fortunately, that 3rd party were nice enough to include a compatible version of git-svn.

So, that’ll be:

- sudo add-apt-repository ppa:git-core/ppa
- sudo apt update
- sudo apt install git-svn

or, with the apt addon (using alias from the safelist):

addons:
  apt:
    sources:
      - git-core
    packages:
      - git-svn
    update: true

Thanks, your solution works like a charm (https://github.com/zestsoftware/zest.releaser/pull/335/files). More elegant than my original solution!

On the git-core PPA page I only noticed the “git” package, but you’re right: they have “git-svn” too.

Yeah, I didn’t find any way in the Launchpad Web UI to vew the contents of a PPA – so had to explore the repo metadata by hand. Given that hosting PPAs is one of the site’s core functions, this is a very strange omission.

I ran into this issue as well, but git-core seems to be not available via addon on Bionic based builds as it fails with Disallowing sources: git-core. So I had to specify the source manually there:

addons:
  apt:
    sources:
    - sourceline: ppa:git-core/ppa
    packages:
    - git-svn

On the other side explicit update is not necessary anymore.

1 Like
Imprint