Re: Should we consider project basenames unique?

2021-11-23 Thread Ben Cooksley
On Wed, Nov 24, 2021 at 2:29 PM Aleix Pol  wrote:

> On Wed, Nov 24, 2021 at 2:10 AM ash...@linuxcomp.ru 
> wrote:
> >
> > Hello.
> > There is currently a problem that projects are identified by path in
> invent.kde.org. But in pkgbuilds in Arch Linux the makepkg clones repo
> twice, first time to the dir with pkgbuild, and second time to the srcdir
> for build package. And that second repo has first repo as origin, i.e. its
> origin is path to the first repo. And this leads to breakage of determining
> project identifier in cmake module. To workaround, I either need to clone
> to the path that matches the regexp, such as crutch.kde.org:pim/zanshin.git
> or fixing the origin of the problem.
> >
> > I wanted to fix it by identifying the project by its name. See
> https://invent.kde.org/sdk/releaseme/-/merge_requests/13.
> >
> > Now, the question is, could we consider project names unique? In that
> case, we can merge my mr, and path crutch will not be needed anymore.
>
> I agree it would be a problem to have different repositories with the
> same name. I'm not sure how we can enforce it though.
>

This is something that Sysadmin already encountered and resolved.

Please see the 'identifier' key in the repository metadata (located at
https://invent.kde.org/sysadmin/repo-metadata/ in the projects/ subfolder)
which we guarantee to be unique.
This is already used and relied upon by scripty as well as our internal
systems (such as commits.kde.org) when referencing repositories.

The repository name itself (stripped of any folders) is not guaranteed to
be unique.


> Aleix
>

Cheers,
Ben


Re: Should we consider project basenames unique?

2021-11-23 Thread Aleix Pol
On Wed, Nov 24, 2021 at 2:10 AM ash...@linuxcomp.ru  wrote:
>
> Hello.
> There is currently a problem that projects are identified by path in 
> invent.kde.org. But in pkgbuilds in Arch Linux the makepkg clones repo twice, 
> first time to the dir with pkgbuild, and second time to the srcdir for build 
> package. And that second repo has first repo as origin, i.e. its origin is 
> path to the first repo. And this leads to breakage of determining project 
> identifier in cmake module. To workaround, I either need to clone to the path 
> that matches the regexp, such as crutch.kde.org:pim/zanshin.git or fixing the 
> origin of the problem.
>
> I wanted to fix it by identifying the project by its name. See 
> https://invent.kde.org/sdk/releaseme/-/merge_requests/13.
>
> Now, the question is, could we consider project names unique? In that case, 
> we can merge my mr, and path crutch will not be needed anymore.

I agree it would be a problem to have different repositories with the
same name. I'm not sure how we can enforce it though.

Aleix


Should we consider project basenames unique?

2021-11-23 Thread ash...@linuxcomp.ru
Hello.There is currently a problem that projects are identified by path in invent.kde.org. But in pkgbuilds in Arch Linux the makepkg clones repo twice, first time to the dir with pkgbuild, and second time to the srcdir for build package. And that second repo has first repo as origin, i.e. its origin is path to the first repo. And this leads to breakage of determining project identifier in cmake module. To workaround, I either need to clone to the path that matches the regexp, such as crutch.kde.org:pim/zanshin.git or fixing the origin of the problem.I wanted to fix it by identifying the project by its name. See https://invent.kde.org/sdk/releaseme/-/merge_requests/13.Now, the question is, could we consider project names unique? In that case, we can merge my mr, and path crutch will not be needed anymore.