[PATCH] Do not attempt to build a package if the resulting file can't be written.
--- pkgmk.in | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/pkgmk.in b/pkgmk.in index 9fdf768..de50c95 100755 --- a/pkgmk.in +++ b/pkgmk.in @@ -350,6 +350,11 @@ remove_work_dir() { build_package() { local BUILD_SUCCESSFUL="no" + + if [ ! -w "$TARGET" ]; then + error "'$TARGET' is not writable." + exit 1 + fi make_work_dir -- 1.6.2.4
On Sun, May 10, 2009 at 12:12:03AM +0300, Antti Nykanen wrote: Hi Antti, thanks for the patch, but I think that it will not work as expected because we 'exit 1' too if $TARGET doesn't exist. Attached another attempt which covers the important points of ticket #360 [1] as well. Greetings Juergen [1] http://crux.nu/bugs/index.php?do=details&task_id=360
--- pkgmk.in | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/pkgmk.in b/pkgmk.in index 9fdf768..de50c95 100755 --- a/pkgmk.in +++ b/pkgmk.in @@ -350,6 +350,11 @@ remove_work_dir() {
build_package() { local BUILD_SUCCESSFUL="no" + + if [ ! -w "$TARGET" ]; then + error "'$TARGET' is not writable." + exit 1 + fi
make_work_dir
-- 1.6.2.4
_______________________________________________ crux-devel mailing list crux-devel@lists.crux.nu http://lists.crux.nu/mailman/listinfo/crux-devel
-- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
Hi On Wed, Jun 24, 2009 at 3:17 PM, Juergen Daubert <jue@jue.li> wrote:
thanks for the patch, but I think that it will not work as expected because we 'exit 1' too if $TARGET doesn't exist. Attached another attempt which covers the important points of ticket #360 [1] as well.
Thanks for pointing that out. +1 for the new patch obviously :) - Antti
Antti Nykänen [2009-06-24 15:58]:
Hi
On Wed, Jun 24, 2009 at 3:17 PM, Juergen Daubert <jue@jue.li> wrote:
thanks for the patch, but I think that it will not work as expected because we 'exit 1' too if $TARGET doesn't exist. Attached another attempt which covers the important points of ticket #360 [1] as well.
Thanks for pointing that out. +1 for the new patch obviously :)
Merged, thanks. Regards, Tilman -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
participants (4)
-
Antti Nykanen
-
Antti Nykänen
-
Juergen Daubert
-
Tilman Sauerbeck