Opened 4 years ago

Closed 11 months ago

#4503 closed defect (rejected) fails for git submodule

Reported by: asmirnov Assignee: asmirnov
Priority: P4 Milestone:
Module: Automation Keywords:
Cc: fhd, sebastian, kvas Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by trev)

Background script is used to extract required dependencies from git/mercurial repositories. However, it currently fails when running within a git submodule. This is a problem for 3rd-party projects integrating libadblockplus-android as a submodule of their git repository.

How to reproduce

Run the following commands:

  1. git submodule add
  2. cd ./libadblockplus-android
  3. ./

Observed behaviour

An error is thrown:

INFO: Cloning repository into ./libadblockplus-android/jni/libadblockplus-binaries
Traceback (most recent call last):
  File "./", line 299, in <module>
  File "./", line 245, in resolve_deps
    ensure_repo(repodir, target, config.get("_root", {}), revisions["_source"])
  File "./", line 200, in ensure_repo
    repo.ignore(target, parentrepo)
  File "./", line 105, in ignore
    _ensure_line_exists(exclude_file, module)
  File "./", line 275, in _ensure_line_exists
    with open(path, 'a+') as f:
IOError: [Errno 20] Not a directory: './.git/info/exclude'

Expected behaviour

Dependencies for libadblockplus-android are fetched correctly.

What to change

Git submodules don't have their own .git/info/exclude file, should modify the file for the parent directory instead.

Change History (9)

comment:1 Changed 4 years ago by asmirnov

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 4 years ago by fhd

  • Cc sebastian added

comment:3 Changed 4 years ago by sebastian

  • Cc trev kvas added
  • Priority changed from Unknown to P4

comment:4 Changed 4 years ago by trev

  • Component changed from Libadblockplus-Android to Build-and-Release-Tools
  • Description modified (diff)
  • Ready unset is part of our buildtools repository, so the correct component is Build-and-Release-Tools. I've also modified the description to make it more clear - initially I misunderstood what is being proposed here.

comment:5 Changed 4 years ago by sebastian

  • Ready set

comment:6 Changed 4 years ago by asmirnov

  • Review URL(s) modified (diff)

comment:7 Changed 3 years ago by fhd

  • Cc trev removed

comment:8 Changed 11 months ago by sebastian

Is this still relevant? We plan to discontinue buildtools and With the move towards GitLab, we will eventually switch to Git Submodules.

comment:9 Changed 11 months ago by sebastian

  • Resolution set to rejected
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.