Browse Source

It's possible debconf.c needs to be part of a shared library. I need to use

it in another program too..

r177
keep-around/c8703c509368e1805e513d61f98a9d17d2cdd9cc
Joey Hess 22 years ago
parent
commit
ab75efbbe5
  1. 2
      TODO
  2. 2
      debconf.h
  3. 8
      main-menu.c
  4. 4
      main-menu.h

2
TODO

@ -1,3 +1,5 @@
* Update to new debconf stuff -- no isdefault flag setting needed; use seen
flag instead.
* Figure out how to handle configuring only one virtual package (pick off
of a menu?) if the menu item depends on a virtual package.
Aj:

2
debconf.h

@ -0,0 +1,2 @@
int debconf_command (const char *, ...);
char *debconf_ret (void);

8
main-menu.c

@ -15,6 +15,7 @@
*/
#include "main-menu.h"
#include "debconf.h"
#include <stdlib.h>
#include <search.h>
@ -163,7 +164,7 @@ struct package_t *show_main_menu(struct package_t *packages) {
if (p->installer_menu_item && strcmp(p->description, s) == 0)
return p;
}
return 0;
return NULL;
}
void do_menu_item(struct package_t *p) {
@ -184,10 +185,9 @@ void do_menu_item(struct package_t *p) {
order_done(head);
for (p = head; p; p = p->next) {
if (p->status == unpacked) {
sprintf(configcommand, DPKG_CONFIGURE_COMMAND " %s",
p->package);
sprintf(configcommand, DPKG_CONFIGURE_COMMAND " %s", p->package);
if (SYSTEM(configcommand) != 0)
return; /* give up on failure */
return; /* give up on failure */
}
}
}

4
main-menu.h

@ -33,10 +33,6 @@ struct package_t {
/* status.c */
struct package_t *status_read(void);
/* debconf.c */
int debconf_command (const char *, ...);
char *debconf_ret (void);
/* tree.c */
struct package_t *tree_find(char *);
struct package_t *tree_add(const char *);

Loading…
Cancel
Save