Opened on 10/07/2016 at 10:45:49 AM

Closed on 08/30/2019 at 04:36:25 PM

#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.

Attachments (0)

Change History (9)

comment:1 Changed on 10/07/2016 at 11:55:18 AM by asmirnov

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

comment:2 Changed on 10/11/2016 at 10:30:52 AM by fhd

  • Cc sebastian added

comment:3 Changed on 10/11/2016 at 10:47:27 AM by sebastian

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

comment:4 Changed on 10/11/2016 at 02:12:00 PM 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 on 10/11/2016 at 02:23:24 PM by sebastian

  • Ready set

comment:6 Changed on 01/09/2017 at 03:01:42 PM by asmirnov

  • Review URL(s) modified (diff)

comment:7 Changed on 12/21/2017 at 11:29:03 AM by fhd

  • Cc trev removed

comment:8 Changed on 08/29/2019 at 05:12:26 PM 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 on 08/30/2019 at 04:36:25 PM by sebastian

  • Resolution set to rejected
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from asmirnov.
Note: See TracTickets for help on using tickets.