Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2006 15:52:42 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Kristian Vaaf <vaaf@broadpark.no>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Trying to patch a beautiful desktop
Message-ID:  <20060308135242.GA43423@flame.pc>
In-Reply-To: <7.0.1.0.2.20060308144007.02244358@broadpark.no>
References:  <5d6e65c52459.440e6cd2@broadpark.no> <20060308092202.GA1005@flame.pc> <7.0.1.0.2.20060308144007.02244358@broadpark.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-03-08 14:41, Kristian Vaaf <vaaf@broadpark.no> wrote:
>At 10:22 08.03.2006, Giorgos Keramidas wrote:
>>On 2006-03-08 05:34, Kristian Vaaf <vaaf@broadpark.no> wrote:
>>>
>>> I've done some research on how to make ones desktop look the best,
>>> without being too bloated in terms of looks and functionality but
>>> still classify as good design and give users a smooth experience.
>>>
>>> I've found that if done correctly, Openbox together with Gnome can
>>> look pretty darn nice. I've found some nice themes for Openbox as
>>> well as GTK 1 and 2, however the Openbox code needs some
>>> patching. There already is a patch, but having the obsessive
>>> compulsive disorder, I want the patch file to also look good.
>>>
>>> After I edited it, it wouldn't work. No matter what line/character
>>> coordinates I typed in for the @@ lines. I also assume it's
>>> unnecessary, at least it ought to be, including lines other than +
>>> and - unless they serve a purpose.
>>
>> You're going backwards.  The proper way of generating a patch is not by
>> manually editing a file.  Extract the original source tree, copy it to a
>> 'clean' place, make your changes and use diff(1) to generate the patch.
>
> I know, but I need to do it this way.

No, you don't.  At least not until you have proven that this way is
easier, faster, cleaner and more productive than wasting your time and
the time of a dozen more people by struggling to do something the
hard/uphill way just because :P

Why do you think that you "need" to edit the patch file manually?

It's so much easier to just untar two copies of the source, i.e. with:

    $ cd work
    $ tar xzf foo-1.2.3.tar.gz && mv foo-1.2.3 foo.orig
    $ tar xzf foo-1.2.3.tar.gz && mv foo-1.2.3 foo

then work on the files of the foo/ tree and use diff(1) when you're done
with all your changes:

    $ diff -ruN foo.orig foo > ~/work/patchfile 2>&1

I don't see why you "need" to do this any other way.

> How may I learn more about the .diff format?

Reading the source of diff(1) or patch(1) should be *the* authoritative
way of learning about all diff formats.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060308135242.GA43423>