Skip to contentSkip to conversation

git-quiltimport complaining yet still working

DISCUSSION Greg KH 4 participants 6 messages Jun 15, 2016

lore
Share & tools
lore

Greg KH

author
#0 lore raw

In git 1.5.1 the quiltimport function started complaining in a new way:

libata-clear-tf-before-doing-request-sense.patch Patch is empty. Was is split wrong? /usr/bin/git-quiltimport: line 78: stop_here: command not found

yet it still applies the patch properly.

For an example of patches that causes this output, the -stable kernel tree queue can be used (which is where I started seeing this problem...)

Any hints? Or is it time to start bisecting?

thanks,

greg k-h

#1 lore raw
Quoted 5 lines · Greg KH

In git 1.5.1 the quiltimport function started complaining in a new way:

libata-clear-tf-before-doing-request-sense.patch Patch is empty. Was is split wrong? /usr/bin/git-quiltimport: line 78: stop_here: command not found

Sorry about that. I assumed all the scripts using git-mailinfo had the stop_here command. Not sure why I made that assumption.

I changed the behaviour of git-mailinfo to allow empty patches and have the scripts check if a patch was empty and fail. Unfortunately, I incorrectly applied the change to git-quiltimport.

Anyway the following should fix it.

git-quiltimport.sh +1 -1
index edccd82..0d20dc5 100755
@@ -75,7 +75,7 @@ for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do
 	(cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3
 	test -s $dotest/patch || {
 		echo "Patch is empty.  Was is split wrong?"
-		stop_here $this
+		exit 3
 	}
 
 	# Parse the author information
author
#2 lore raw
Quoted 23 lines · Don Zickus
Quoted 5 lines · Greg KH

In git 1.5.1 the quiltimport function started complaining in a new way:

libata-clear-tf-before-doing-request-sense.patch Patch is empty. Was is split wrong? /usr/bin/git-quiltimport: line 78: stop_here: command not found

Sorry about that. I assumed all the scripts using git-mailinfo had the stop_here command. Not sure why I made that assumption.

I changed the behaviour of git-mailinfo to allow empty patches and have the scripts check if a patch was empty and fail. Unfortunately, I incorrectly applied the change to git-quiltimport.

Anyway the following should fix it.

git-quiltimport.sh +0 -0
index edccd82..0d20dc5 100755

git-quiltimport.sh for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do · line 78

Quoted 5 lines
git-quiltimport.sh +1 -1
@@ -75,7 +75,7 @@ for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do
 	(cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3
 	test -s $dotest/patch || {
 		echo "Patch is empty.  Was is split wrong?"
-		stop_here $this
+		exit 3

Are you sure? This will exit, and yet, there was nothing really wrong with the patch in the first place (as proven by the fact that it is applied properly.)

Or did the patch format that can be accepted by git-quiltimport suddenly change somehow? I'm passing mbox-like files to it, and have been since it was created. To change this, is fine, but let me know what format is now needed please.

thanks,

greg k-h

#3 lore raw
In reply to Greg KH
Quoted 6 lines · Greg KH

In git 1.5.1 the quiltimport function started complaining in a new way:

libata-clear-tf-before-doing-request-sense.patch Patch is empty. Was is split wrong? /usr/bin/git-quiltimport: line 78: stop_here: command not found

This is an *old* bug. It got fixed once already. Did it get re-introduced?

Ahh - somebody copied the bug from git-applymbox

Quoted 1 line

Any hints? Or is it time to start bisecting?

This should fix it.

There were two bugs: "stop_here" doesn't exist, but the bug that causes this code to trigger in the *first* place is the wrong use of "$dotest". It should be ".dotest"

Linus

---

git-quiltimport.sh +2 -2
index edccd82..018cc75 100755
@@ -73,9 +73,9 @@ mkdir $tmp_dir || exit 2
 for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do
 	echo $patch_name
 	(cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3
-	test -s $dotest/patch || {
+	test -s .dotest/patch || {
 		echo "Patch is empty.  Was is split wrong?"
-		stop_here $this
+		exit 1
 	}
 
 	# Parse the author information
author
#4 lore raw
Quoted 14 lines · Linus Torvalds
Quoted 6 lines · Greg KH

In git 1.5.1 the quiltimport function started complaining in a new way:

libata-clear-tf-before-doing-request-sense.patch Patch is empty. Was is split wrong? /usr/bin/git-quiltimport: line 78: stop_here: command not found

This is an *old* bug. It got fixed once already. Did it get re-introduced?

Ahh - somebody copied the bug from git-applymbox

Quoted 7 lines
Quoted 1 line

Any hints? Or is it time to start bisecting?

This should fix it.

There were two bugs: "stop_here" doesn't exist, but the bug that causes this code to trigger in the *first* place is the wrong use of "$dotest". It should be ".dotest"

Thanks, that seems to do the trick for me.

greg k-h

#5 lore raw
In reply to Linus Torvalds
Quoted 5 lines · Linus Torvalds

This should fix it.

There were two bugs: "stop_here" doesn't exist, but the bug that causes this code to trigger in the *first* place is the wrong use of "$dotest". It should be ".dotest"

I am quite sure that I've said the same thing as above in my earlier message to fix this exact thing, but as usual I appear to have sent it to the list and then forgot to apply it myself.

Thanks.