summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_install.c
diff options
context:
space:
mode:
authorpixdamix <pixdamix@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-05 03:46:43 (EST)
committer pixdamix <pixdamix@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2009-11-05 03:46:43 (EST)
commitf0fe187f841a29675317835723c3591b149fdeb1 (patch)
treef2d118b12f4dd22818969e890c769304e05367c9 /libopkg/opkg_install.c
parent00d9ca3aaa56c083cfbb051235f3bdcbe6c8c253 (diff)
Removed a bunch of if(0) and dead code
Applied this semantic patch: @@ statement S; @@ - if(0) S @@ @@ - remove_obsolete_maintainer_scripts(...) { - ... -} @@ @@ - remove_obsolete_maintainer_scripts(...); @@ identifier i; @@ -if(i){ -} git-svn-id: http://opkg.googlecode.com/svn/trunk@262 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg_install.c')
-rw-r--r--libopkg/opkg_install.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/libopkg/opkg_install.c b/libopkg/opkg_install.c
index 61563d6..a67129e 100644
--- a/libopkg/opkg_install.c
+++ b/libopkg/opkg_install.c
@@ -1470,42 +1470,11 @@ static int remove_obsolesced_files(opkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg
return 0;
}
-static int remove_obsolete_maintainer_scripts(opkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg)
-{
- int i;
- int err = 0;
- char *globpattern;
- glob_t globbuf;
- if (0) {
- if (!pkg->dest) {
- opkg_message(conf, OPKG_ERROR, "%s: no dest for package %s\n", __FUNCTION__, pkg->name);
- return -1;
- }
- sprintf_alloc(&globpattern, "%s/%s.*", pkg->dest->info_dir, pkg->name);
- err = glob(globpattern, 0, NULL, &globbuf);
- free(globpattern);
- if (err) {
- return err;
- }
- /* XXXX this should perhaps only remove the ones that are not overwritten in new package. Jamey 11/11/2003 */
- for (i = 0; i < globbuf.gl_pathc; i++) {
- opkg_message(conf, OPKG_DEBUG, "Removing control file %s from old_pkg %s\n",
- globbuf.gl_pathv[i], old_pkg->name);
- if (!conf->noaction)
- unlink(globbuf.gl_pathv[i]);
- }
- globfree(&globbuf);
- }
- return err;
-}
-
static int install_maintainer_scripts(opkg_conf_t *conf, pkg_t *pkg, pkg_t *old_pkg)
{
int ret;
char *prefix;
- if (old_pkg)
- remove_obsolete_maintainer_scripts(conf, pkg, old_pkg);
sprintf_alloc(&prefix, "%s.", pkg->name);
ret = pkg_extract_control_files_to_dir_with_prefix(pkg,
pkg->dest->info_dir,