[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Cleaning individual packages before build

From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] Cleaning individual packages before build
Date: Sat, 5 Mar 2011 20:58:57 +1100

Hi Volker,

Thanks for the detailed reply,

On 4 March 2011 11:16, Volker Grabsch <address@hidden> wrote:
> Tony Theodore schrieb:
>> From time to time I get bitten by previous versions of a package
>> interfering with an updated version. The standard solution is "make
>> clean", but sometimes it isn't apparent that there is a problem until
>> later.
> I'm experiencing this problem from time to time, too. And this
> whole proposal has already been brought up some time ago. My
> opinion didn't change since then:
> Yes, some kind of versioning/uninstall mechanism would be nice.
> However, this is a highly nontrivial task, so it should be done
> using mature tools that were designed for that task. An ad-hoc
> solution using some shell commands in the main Makefile will
> definitely do more harm than good. [1]

I was actually after something that is more like "clean" rather than
any sort of versioning/uninstall. I started with hg to generate the
manifest, but gave up on that when I started thinking about more
complex things you could do.

> 3) The approach of taking a snapshot before and after the
>   build won't work when inter-package parallelization is
>   enabled (e.g. "make -j 4"). It only works if the packages
>   are built one after another. Otherwise, it will do horribly
>   wrong.

I hadn't thought of this - it puts an end to any simple solution,
thanks for pointing it out. We'd have to separate and serialise the
install steps and that's getting too close to a package manger's task.

> [1]
> As a side note, in the proposed patch the following line
> caught my eye. There are so many things wrong with it ...
> it's hard to believe that it even works. But it does, if
> only by accident, with lots of error messages to be expected.
> The suppression of those error messages at the end of the
> statement finally tops it all:
>    time rm -rfv `$(SED) 's/^> \(.*\)/\1/' '$(PREFIX)/installed/$(1)-files'` 
> 2>/dev/null
> I really hope you don't take this criticism personally, but
> independently from the current discussion, I don't ever
> want to see that kind of code on a production system. :-)

No offence taken, I'm somewhat aware of when I write WFT code these
days. I was mostly testing the idea - if I had to think about it, I'd
generate a clean manifest and fail on any error:

[ ! -f '$(PREFIX)/installed/$(1)-files' ] || xargs rm -fv <
find -L '$(PREFIX)' -type f >'$(2)/$(1)-usr-pre'
$$(call $(1)_BUILD,$(2)/$($(1)_SUBDIR),$(TOP_DIR)/src/$(1)-test)
find -L '$(PREFIX)' -type f | \
diff -e '$(2)/$(1)-usr-pre' - | grep '$(PREFIX)'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]