2005-05-09 23:23:33

by Blaisorblade

[permalink] [raw]
Subject: [patch 1/6] uml: remove elf.h [ compile-fix, for 2.6.12 ]


Actually remove elf.h in the tree. The previous patch, due to a quilt
bug/misuse, left it in the tree as a 0-length file, preventing the build to
see it as missing and to generate a symlink in its place.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
---

| 0
1 files changed

diff -L include/asm-um/elf.h -puN include/asm-um/elf.h~uml-remove-elf-h /dev/null
_


2005-05-10 01:35:21

by Andrew Morton

[permalink] [raw]
Subject: Re: [patch 1/6] uml: remove elf.h [ compile-fix, for 2.6.12 ]

[email protected] wrote:
>
>
> Actually remove elf.h in the tree. The previous patch, due to a quilt
> bug/misuse, left it in the tree as a 0-length file, preventing the build to
> see it as missing and to generate a symlink in its place.
>
> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
> ---
>
> | 0
> 1 files changed
>
> diff -L include/asm-um/elf.h -puN include/asm-um/elf.h~uml-remove-elf-h /dev/null

hmm, that's exciting. How to tell diff and patch to remove a zero-length
file?

bix:/home/akpm> mkdir a b
bix:/home/akpm> touch a/a
bix:/home/akpm> diff -uNr a b
bix:/home/akpm> diff -u a b
Only in a: a
bix:/home/akpm> diff -ur a b
Only in a: a
bix:/home/akpm> diff -uPr a b
Only in a: a

I'll just ask Linus to delete it ;)

2005-05-10 02:15:42

by Bodo Eggert

[permalink] [raw]
Subject: Re: [patch 1/6] uml: remove elf.h [ compile-fix, for 2.6.12 ]

Andrew Morton <[email protected]> wrote:

> hmm, that's exciting. How to tell diff and patch to remove a zero-length
> file?

$ md a b c
$ touch a/a
$ echo .>c/a
$ diff -purN a c
diff -purN a/a c/a
--- a/a 2005-05-10 04:08:14.000000000 +0200
+++ c/a 2005-05-10 04:09:17.972505331 +0200
@@ -0,0 +1 @@
+.
$ diff -purN c b
diff -purN c/a b/a
--- c/a 2005-05-10 04:09:17.972505331 +0200
+++ b/a 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-.
$ cd a
$ patch -p1 # < both patches (c&p)
<snip>
$ ls -l
total 0
--
If your dog is barking at the back door and your wife is
yelling at the front door, who do you let in first?
The dog, of course. He'll shut up once you let him in.

2005-05-10 02:24:18

by Andrew Morton

[permalink] [raw]
Subject: Re: [patch 1/6] uml: remove elf.h [ compile-fix, for 2.6.12 ]

"Bodo Eggert <[email protected]>" <[email protected]> wrote:
>
> Andrew Morton <[email protected]> wrote:
>
> > hmm, that's exciting. How to tell diff and patch to remove a zero-length
> > file?
>
> $ md a b c
> $ touch a/a
> $ echo .>c/a
> $ diff -purN a c
> diff -purN a/a c/a
> --- a/a 2005-05-10 04:08:14.000000000 +0200
> +++ c/a 2005-05-10 04:09:17.972505331 +0200
> @@ -0,0 +1 @@
> +.
> $ diff -purN c b
> diff -purN c/a b/a
> --- c/a 2005-05-10 04:09:17.972505331 +0200
> +++ b/a 1970-01-01 01:00:00.000000000 +0100
> @@ -1 +0,0 @@
> -.
> $ cd a
> $ patch -p1 # < both patches (c&p)
> <snip>
> $ ls -l
> total 0

That's cheating!

2005-05-10 10:28:05

by Blaisorblade

[permalink] [raw]
Subject: Re: [patch 1/6] uml: remove elf.h [ compile-fix, for 2.6.12 ]

On Tuesday 10 May 2005 03:34, Andrew Morton wrote:
> [email protected] wrote:
> > Actually remove elf.h in the tree. The previous patch, due to a quilt
> > bug/misuse, left it in the tree as a 0-length file, preventing the build
> > to see it as missing and to generate a symlink in its place.

Ok, I was confused by the fact that with patch-scripts, which you use, it
works, and thought it was patch to make it work.
--
Paolo Giarrusso, aka Blaisorblade
Skype user "PaoloGiarrusso"
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade

2005-05-10 13:38:03

by Henrik Nordstrom

[permalink] [raw]
Subject: Re: [uml-devel] Re: [patch 1/6] uml: remove elf.h [ compile-fix, for 2.6.12 ]

On Mon, 9 May 2005, Andrew Morton wrote:

>> diff -L include/asm-um/elf.h -puN include/asm-um/elf.h~uml-remove-elf-h /dev/null
>
> hmm, that's exciting. How to tell diff and patch to remove a zero-length
> file?

This has to be instructed by the patch.. If the new file is an empty file
with timestamp of 1 Jan 1970 then it is supposed to be deleted.

The /dev/null trick only works well for adding files, not removing them.

Regards
Henrik

2005-05-10 18:06:50

by Andrea Arcangeli

[permalink] [raw]
Subject: Re: [patch 1/6] uml: remove elf.h [ compile-fix, for 2.6.12 ]

On Mon, May 09, 2005 at 06:34:01PM -0700, Andrew Morton wrote:
> I'll just ask Linus to delete it ;)

make distclean should delete it too. I never worry about zero length
file, they'll be deleted eventually.

2005-05-10 20:41:15

by Adrian Bunk

[permalink] [raw]
Subject: Re: [uml-devel] Re: [patch 1/6] uml: remove elf.h [ compile-fix, for 2.6.12 ]

On Tue, May 10, 2005 at 03:37:33PM +0200, Henrik Nordstrom wrote:
>...
> The /dev/null trick only works well for adding files, not removing them.

It works fine for removing files except when they have a zero length.

> Regards
> Henrik

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2005-05-10 20:54:20

by Jesper Juhl

[permalink] [raw]
Subject: Re: [uml-devel] Re: [patch 1/6] uml: remove elf.h [ compile-fix, for 2.6.12 ]

On Tue, 10 May 2005, Adrian Bunk wrote:

> On Tue, May 10, 2005 at 03:37:33PM +0200, Henrik Nordstrom wrote:
> >...
> > The /dev/null trick only works well for adding files, not removing them.
>
> It works fine for removing files except when they have a zero length.
>
Then a two-patch approach would seem to work as a hack. First patch just
adds a blank line to the file making in non-zero length, second patch then
uses the /dev/null trick to kill the file. A hack? Yes, certainly, but it
sounds like it would work (actually, it does work, just tried it).


--
Jesper Juhl