/*
 * Installation package record; one for each package we might want to
 * install.  A better solution is to store this as data on the CD, and
 * only look for the required packages here.
 */
#ifndef __PACKAGES_D
#define __PACKAGES_D

#include <stdio.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>

struct pkg {
    char	*name;		/* filename of the install package */
    char	*desc;		/* what the install package is */
    fd_set 	depends;	/* packages this depends on */
    int		flags;		/* various flag for doinstall */
#define PKG_EXIST	0x0001
#define PKG_SELECTED	0x0002
#define PKG_REQUIRED	0x0004
#define PKG_OPTIONAL	0x0008
#define PKG_INSTALLED	0x0010
    long	size;		/* ignorantly assuming that none of these
				 * packages will ever be larger than 2gb */
};

/* functions in packages.c
 */
extern int readpackagelist(void*, int);
extern int install_a_package(void*, int);
extern int installpackages();
extern int choosepackages(long *space_wanted, long *space_required);
extern int takeallpackages(long *space_wanted, long *space_required);
extern int checkpackages();

#endif/*__PACKAGES_D*/

