🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #4205

Bug#1145549: fails to download submodules if run from git checkout and upstream is configured as remote

#4205
From: Agustin Martin
Date: Wed, 11 Nov 2026 23:20
89 lines
5830 bytes
On Wed, Oct 14, 2026 at 12:19:30PM +0200, Agustin Martin wrote:
> On Sat, Sep 05, 2026 at 07:55:27PM +0200, Agustin Martin wrote:
> > On Wed, Aug 26, 2026 at 12:25:01AM +0900, Simon Richter wrote:
> > > Package: devscripts
> > > Version: 2.26.11~bpo13+1
> > > Severity: normal
> > > X-Debbugs-Cc: sjr@debian.org
> > > 
> > > I have upstream's git repository configured as a remote in my work tree.
> > > Upstream uses submodules, which get squashed into a single archive by
> > > uscan, and that archive is imported into the git repo for the packages.
> > > 
> > > As a result, when uscan is run, the checked out branch (with the
> > > debian/watch file) does not have submodules. uscan detects that a remote
> > > for the upstream git exists in the current repository, and tries to reuse
> > > that, which is commendable, but fails to do so:
> > > 
> > > $ git clone https://salsa.debian.org/electronics-team/nextpnr.git
> > > $ cd nextpnr
> > > $ git remote add yosys https://github.com/YosysHQ/nextpnr.git
> 
> Hi, 
> 
> Cc'ing Hugh McMaster, who did a lot of work in this section in case he can
> add something.
> 
> I kept trying to understand when this happens, and noticed that submodules
> are not initialized when cloning from salsa Debian repo, but they are when
> cloning from upstream repo.
> 
> # Does not work with salsa repo. Submodules not initialized
> $ git clone   https://salsa.debian.org/electronics-team/nextpnr.git
> $ cd nextpnr
> $ git submodule update --init --recursive  -- 3rdparty/corrosion himbaechel/uarch/xilinx/meta tests
> 
> # Works with upstream repo. Submodules are initialized.
> $ git clone   https://github.com/YosysHQ/nextpnr.git
> $ cd nextpnr
> $ git submodule update --init --recursive  -- 3rdparty/corrosion himbaechel/uarch/xilinx/meta tests
> 
> This seems to be the origin of the problem. When a remote is defined, local
> repo is used and submodules are not used since they are not initialized.
> When no remote is defined, upstream repo is used and submodules are
> initialized and used.

Hi,

I have tested this a bit more and I tend to think that this is not a
problem in uscan but in nextpnr salsa git repo.

$ git clone https://salsa.debian.org/electronics-team/nextpnr.git --recurse-submodules
Cloning into 'nextpnr'...
...
$ cd nextpnr
$ git submodule update --init --recursive  -- 3rdparty/corrosion himbaechel/uarch/xilinx/meta tests
$ git submodule add https://github.com/YosysHQ/nextpnr-tests tests
fatal: 'tests' already exists in the index
$ git submodule add -f https://github.com/YosysHQ/nextpnr-tests tests
fatal: 'tests' already exists in the index and is not a submodule

Then tried to see what happens after removing tests contents for git

$ git rm -r tests/
rm 'tests/COPYING'
...
$ git commit tests -m 'Removing tests submodule contents'
[master 8e1cd0e] Removing tests submodule contents
...

and adding it again, now really as a submodule,

$ git submodule add https://github.com/YosysHQ/nextpnr-tests tests
Cloning into '/home/unsafe/.nobackup/src/kk/nextpnr/tests'...
...
$ git fetch --recurse-submodules
Fetching submodule tests
$ git submodule
 aea0b4bac59e07e0c5088a0966af73abdd8ab217 tests (heads/master)

So, seems that intially submodules were not declared as submodules, but
present in the repo. This did not happen when using upstream git repo (what
happens when there is no remote defined). If I now add the remote and run
"uscan --download-current-version" created upstream tarball contains
tests/ contents, but not the contents for other submodules.

Regards,

-- 
Agustin
Technical Details
Message-ID: <NYpLH-bjAF-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
References: <Nw1g5-dc1o-15@gated-at.bofh.it> <Nw1g5-dc1o-15@gated-at.bofh.it> <NA2Qi-fnN2-23@gated-at.bofh.it> <Nw1g5-dc1o-15@gated-at.bofh.it> <NO4pb-5rsB-15@gated-at.bofh.it> <Nw1g5-dc1o-15@gated-at.bofh.it> <NO4pb-5rsB-15@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Agustin Martin <agmartin@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1145549: fails to download submodules if run from git checkout and upstream is configured as remote
Date: Thu, 12 Nov 2026 00:20:01 +0100
Message-ID: <NYpLH-bjAF-1@gated-at.bofh.it>
References: <Nw1g5-dc1o-15@gated-at.bofh.it> <Nw1g5-dc1o-15@gated-at.bofh.it> <NA2Qi-fnN2-23@gated-at.bofh.it> <Nw1g5-dc1o-15@gated-at.bofh.it> <NO4pb-5rsB-15@gated-at.bofh.it> <Nw1g5-dc1o-15@gated-at.bofh.it> <NO4pb-5rsB-15@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Wed Nov 11 23:15:07 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Agustin Martin <agmartin@debian.org>, 1145549@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: devscripts@packages.debian.org
X-Debian-Pr-Message: followup 1145549
X-Debian-Pr-Package: devscripts
X-Debian-Pr-Source: devscripts
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Debian-User: agmartin
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2002137
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 89
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: Simon Richter <sjr@debian.org>, Hugh McMaster <hmc@debian.org>
X-Original-Date: Thu, 12 Nov 2026 00:12:36 +0100
X-Original-Message-ID: <avT2ZCp6JjLeY2cS@lenovo-sid.aq.upm.es>
X-Original-References: <178767150187.15208.1608292962938188952.reportbug@lime.hogyros.de> <178767150187.15208.1608292962938188952.reportbug@lime.hogyros.de> <apxXj2N9z25BgYKI@lenovo-sid.aq.upm.es> <178767150187.15208.1608292962938188952.reportbug@lime.hogyros.de> <as9XMjxEAvzLPMt1@lenovo-sid.aq.upm.es> <178767150187.15208.1608292962938188952.reportbug@lime.hogyros.de> <as9XMjxEAvzLPMt1@lenovo-sid.aq.upm.es>