Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=setup/.git;a=commitdiff;h=205edfc5c6ac58baf1313e5fbc1c7eb7d4b5b4b7

commit 205edfc5c6ac58baf1313e5fbc1c7eb7d4b5b4b7
Author: VMiklos <[EMAIL PROTECTED]>
Date:   Sun Jul 15 02:32:08 2007 +0200

src: get rid of the FINAL define
the recommended way is to test setup in an emulator for a long time

diff --git a/src/Makefile b/src/Makefile
index e42856f..f2ebfc3 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -22,7 +22,7 @@ CFLAGS ?= -Wall -Werror -O2 -pipe
else
CFLAGS ?= -g -Wall -Werror
endif
-CFLAGS += $(FINAL) $(STABLE) -DARCH="\"$(shell arch)\""
+CFLAGS += $(STABLE) -DARCH="\"$(shell arch)\""
LDFLAGS += -ldl -rdynamic
CFLAGS += $(shell pkg-config --cflags glib-2.0)
LDFLAGS += $(shell pkg-config --libs glib-2.0)
@@ -47,16 +47,16 @@ objs = setup.o util.o gtk.o
endif

all: setup
-       $(MAKE) -C plugins FINAL="$(FINAL)" UI="$(UI)"
+       $(MAKE) -C plugins UI="$(UI)"

setup: $(objs)
$(CC) $(CFLAGS) -o $@ $(objs) $(LDFLAGS)

current:
-       $(MAKE) FINAL="-DFINAL" UI="$(UI)"
+       $(MAKE) UI="$(UI)"

stable:
-       $(MAKE) FINAL="-DFINAL" STABLE="-DSTABLE" UI="$(UI)"
+       $(MAKE) STABLE="-DSTABLE" UI="$(UI)"

clean:
rm -f setup *.o
diff --git a/src/plugins/Makefile b/src/plugins/Makefile
index d2f52d5..c3893be 100644
--- a/src/plugins/Makefile
+++ b/src/plugins/Makefile
@@ -22,7 +22,7 @@ CFLAGS ?= -Wall -Werror -O2 -pipe
else
CFLAGS ?= -g -Wall -Werror
endif
-CFLAGS += -I.. $(FINAL) -DARCH="\"$(shell arch)\""
+CFLAGS += -I.. -DARCH="\"$(shell arch)\""
LDFLAGS += -lparted -ldl -lpacman
ifeq ($(shell arch),x86_64)
CFLAGS += -fPIC
diff --git a/src/plugins/select.c b/src/plugins/select.c
index a6b95f4..db91614 100644
--- a/src/plugins/select.c
+++ b/src/plugins/select.c
@@ -311,9 +311,7 @@ int prepare_pkgdb(char *repo, GList **config, GList **syncs)
struct stat sbuf;
int ret;
PM_DB *i;
-#ifdef FINAL
FILE *fp;
-#endif

pacbindir = g_strdup_printf("%s/frugalware-%s",
SOURCEDIR, ARCH);
@@ -330,7 +328,6 @@ int prepare_pkgdb(char *repo, GList **config, GList **syncs)
makepath(pkgdb);
// TODO: use libarchive for this
system(g_strdup_printf("tar xjf %s/%s.fdb -C %s", pacbindir, repo, pkgdb));
-#ifdef FINAL
if ((fp = fopen("/etc/pacman.conf", "w")) == NULL)
{
perror(_("Could not open output file for writing"));
@@ -339,7 +336,6 @@ int prepare_pkgdb(char *repo, GList **config, GList **syncs)
fprintf(fp, "[%s]\n", repo);
fprintf(fp, "Server = file://%s\n\n", pacbindir);
fclose(fp);
-#endif
}
else
{
diff --git a/src/setup.h b/src/setup.h
index 2f96a14..7a1c769 100644
--- a/src/setup.h
+++ b/src/setup.h
@@ -35,21 +35,12 @@
#define MKSWAP "/sbin/mkswap"
#define SWAPON "/sbin/swapon"

-#ifdef FINAL
#define PLUGDIR "/lib/plugins"
#define HOTPLUGSCRIPT "/etc/rc.d/rc.hotplug"
#define NETCONFIGSCRIPT "netconfig -f"
#define RAIDCONFIGSCRIPT "raidconfig"
#define INTERFACESSCRIPT "netconfig start"
#define PACCONFPATH "/etc/pacman.d/"
-#else
-#define PLUGDIR "plugins"
-#define HOTPLUGSCRIPT "echo /etc/rc.d/rc.hotplug"
-#define NETCONFIGSCRIPT "echo netconfig -f >/dev/tty4"
-#define RAIDCONFIGSCRIPT "echo raidconfig >/dev/tty4"
-#define INTERFACESSCRIPT "echo netconfig start"
-#define PACCONFPATH "plugins"
-#endif

#ifndef STABLE
#define PACCONF "frugalware-current"
diff --git a/src/util.c b/src/util.c
index baf8d27..917b0f2 100644
--- a/src/util.c
+++ b/src/util.c
@@ -196,11 +196,7 @@ int exit_perform(void)
end_dialog();
#endif

-#ifdef FINAL
system(g_strdup_printf("/sbin/reboot >%s 2>%s", LOGDEV, LOGDEV));
-#else
-       printf("/sbin/reboot\n");
-#endif
exit(1);
}

@@ -330,11 +326,7 @@ int umount_if_needed(char *sourcedir)
int fw_system(char* cmd)
{
char *ptr;
-#ifdef FINAL
ptr = g_strdup_printf("%s >%s 2>%s", cmd, LOGDEV, LOGDEV);
-#else
-       ptr = g_strdup_printf("echo %s >%s 2>%s", cmd, LOGDEV, LOGDEV);
-#endif
int ret = system(ptr);
free(ptr);
return (ret);
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to