git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Ubuntu: gitweb always looks for projects in /var/cache/git (“404 - no projects found”)

From
Jeff King <peff@peff.net>
Date
Nov 29, 2012, 18:28 UTC
Message-ID
<20121129182826.GB17309@sigill.intra.peff.net>
In-Reply-To
<loom.20121129T145320-133@post.gmane.org>
On Thu, Nov 29, 2012 at 01:55:57PM +0000, Alfonso Muñoz-Pomer Fuentes wrote:
Show 8 quoted lines
> I’ve discovered this weird behaviour in gitweb and documented a workaround in
> StackOverflow:
> http://stackoverflow.com/questions/13609475/ubuntu-gitweb-always-looks-for-projects-in-var-cache-git-404-no-projects-f
> 
> Basically, the variable $projectroot in gitweb.cgi in the beginning is reset to
> the system default value in git_get_projects_list, when it is declared again.
> 
> Is this a known bug? Or am I missing something?

I think the analysis in that stack overflow post is wrong. The use of "our" in git_get_projects_list is not the culprit.

The problem is that one should not edit gitweb.cgi directly; its built-in defaults (which you are tweaking) are overridden by /etc/gitweb.conf, which is shipped by the Ubuntu package. You should be making your changes in the config file, not the CGI script.

-Peff
Previous: Alfonso Muñoz-Pomer FuentesNext: Alfonso Muñoz-Pomer Fuentes
Message 2 of 3 in “Ubuntu: gitweb always looks for projects in /var/cache/git (“404 - no projects found”)”
  1. Alfonso Muñoz-Pomer FuentesNov 29, 2012
  2. Jeff KingNov 29, 2012
  3. Alfonso Muñoz-Pomer FuentesDec 3, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.