Skip to contentSkip to conversation

build scripts: branches with forward slashes in names

DISCUSSION Deborah Brouwer 2 participants 4 messages Nov 23, 2023 – Nov 24, 2023 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi Hans,

Have you ever had a problem running the build scripts on branches with forward slashes in their names?

So, for example, I add my repo to env.sh myrepo=https://gitlab.collabora.com/chipsnmedia/kernel

I run ./build.sh setup and I can see it fetching my repo and including my branch "dbrouwer/KConfig_fix", but if try to run:

./build.sh -test all dbrouwer/KConfig_fix

I get this error:

"fatal: 'dbrouwer/KConfig_fix' is not a commit and a branch 'build-test' cannot be created from it"

But then if I change the branch name to remove the forward slash "KConfig_fix" it works fine again.

Have you noticed anything similar? Could it be easily fixed?

Thanks,
Deborah

#1 lore raw
Quoted 15 lines · Deborah Brouwer

Hi Hans,

Have you ever had a problem running the build scripts on branches with forward slashes in their names?

So, for example, I add my repo to env.sh myrepo=https://gitlab.collabora.com/chipsnmedia/kernel

I run ./build.sh setup and I can see it fetching my repo and including my branch "dbrouwer/KConfig_fix", but if try to run:

./build.sh -test all dbrouwer/KConfig_fix

I get this error:

Quoted 9 lines

"fatal: 'dbrouwer/KConfig_fix' is not a commit and a branch 'build-test' cannot be created from it"

But then if I change the branch name to remove the forward slash "KConfig_fix" it works fine again.

Have you noticed anything similar? Could it be easily fixed?

Thanks,
Deborah

From the README:

"If <branch> is absent, then it will default to media_stage/master. If it contains a / character, then the branch name will be used as-is (e.g. use <remote>/<branch> to build a branch on a specific remote), otherwise the branch name will be prefixed by main/ (e.g. main/<branch>), which uses the branch on your '$myrepo' repository."

I never use / in branch names (too confusing with / in pathnames), and since I developed these scripts originally for myself, I just grepped for /.

Perhaps the build script should allow for 0-2 arguments at the end:
nothing means media_stage/master, 1 arg means main/<branch> and 2 args means <remote>/<branch>.

Let me see what I can do.

Regards,

Hans

#2 lore raw
Quoted 34 lines · Hans Verkuil
Quoted 15 lines · Deborah Brouwer

Hi Hans,

Have you ever had a problem running the build scripts on branches with forward slashes in their names?

So, for example, I add my repo to env.sh myrepo=https://gitlab.collabora.com/chipsnmedia/kernel

I run ./build.sh setup and I can see it fetching my repo and including my branch "dbrouwer/KConfig_fix", but if try to run:

./build.sh -test all dbrouwer/KConfig_fix

I get this error:

Quoted 9 lines

"fatal: 'dbrouwer/KConfig_fix' is not a commit and a branch 'build-test' cannot be created from it"

But then if I change the branch name to remove the forward slash "KConfig_fix" it works fine again.

Have you noticed anything similar? Could it be easily fixed?

Thanks,
Deborah

From the README:

"If <branch> is absent, then it will default to media_stage/master. If it contains a / character, then the branch name will be used as-is (e.g. use <remote>/<branch> to build a branch on a specific remote), otherwise the branch name will be prefixed by main/ (e.g. main/<branch>), which uses the branch on your '$myrepo' repository."

Quoted 8 lines

I never use / in branch names (too confusing with / in pathnames), and since I developed these scripts originally for myself, I just grepped for /.

Perhaps the build script should allow for 0-2 arguments at the end:
nothing means media_stage/master, 1 arg means main/<branch> and 2 args means <remote>/<branch>.

Let me see what I can do.

I've done exactly that: after the <branch> argument you can now add an optional <remote> argument. So branch now supports / in the name.

Regards,

Hans

#3 lore raw
Quoted 38 lines · Hans Verkuil
Quoted 37 lines · Hans Verkuil
Quoted 15 lines · Deborah Brouwer

Hi Hans,

Have you ever had a problem running the build scripts on branches with forward slashes in their names?

So, for example, I add my repo to env.sh myrepo=https://gitlab.collabora.com/chipsnmedia/kernel

I run ./build.sh setup and I can see it fetching my repo and including my branch "dbrouwer/KConfig_fix", but if try to run:

./build.sh -test all dbrouwer/KConfig_fix

I get this error:

Quoted 9 lines

"fatal: 'dbrouwer/KConfig_fix' is not a commit and a branch 'build-test' cannot be created from it"

But then if I change the branch name to remove the forward slash "KConfig_fix" it works fine again.

Have you noticed anything similar? Could it be easily fixed?

Thanks,
Deborah

From the README:

"If <branch> is absent, then it will default to media_stage/master. If it contains a / character, then the branch name will be used as-is (e.g. use <remote>/<branch> to build a branch on a specific remote), otherwise the branch name will be prefixed by main/ (e.g. main/<branch>), which uses the branch on your '$myrepo' repository."

I never use / in branch names (too confusing with / in pathnames), and since I developed these scripts originally for myself, I just grepped for /.

Quoted 8 lines
Quoted 5 lines

Perhaps the build script should allow for 0-2 arguments at the end:
nothing means media_stage/master, 1 arg means main/<branch> and 2 args means <remote>/<branch>.

Let me see what I can do.

I've done exactly that: after the <branch> argument you can now add an optional <remote> argument. So branch now supports / in the name.

Ah thanks for fixing this, I tested it and it works fine now:

"branch 'build-test' set up to track 'main/dbrouwer/KConfig_fix'."

Quoted 5 lines

Regards,

Hans