opkg_configure.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* opkg_configure.c - the opkg package management system
  2. Carl D. Worth
  3. Copyright (C) 2001 University of Southern California
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License as
  6. published by the Free Software Foundation; either version 2, or (at
  7. your option) any later version.
  8. This program is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. */
  13. #include <stdio.h>
  14. #include "sprintf_alloc.h"
  15. #include "opkg_configure.h"
  16. #include "opkg_message.h"
  17. #include "opkg_cmd.h"
  18. int opkg_configure(pkg_t * pkg)
  19. {
  20. int err;
  21. /* DPKG_INCOMPATIBILITY:
  22. dpkg actually does some conffile handling here, rather than at the
  23. end of opkg_install(). Do we care? */
  24. /* DPKG_INCOMPATIBILITY:
  25. dpkg actually includes a version number to this script call */
  26. err = pkg_run_script(pkg, "postinst", "configure");
  27. if (err) {
  28. opkg_msg(ERROR, "%s.postinst returned %d.\n", pkg->name, err);
  29. return err;
  30. }
  31. return 0;
  32. }