Browse Source

* Support DEB_BUILD_OPTIONS=nostrip. Closes: #437554

* Add a (lame) guard against infinite recursion in di_config_package.
  Closes: #437323

r49534
tags/1.22
Joey Hess 14 years ago
parent
commit
e33c8dc98a
4 changed files with 18 additions and 8 deletions
  1. +1
    -4
      Makefile
  2. +4
    -1
      debian/changelog
  3. +1
    -0
      debian/rules
  4. +12
    -3
      main-menu.c

+ 1
- 4
Makefile View File

@@ -19,12 +19,9 @@ demo: $(BIN)
/usr/share/debconf/frontend ./$(BIN)
rm -f main-menu.template

# Size optimized and stripped binary target.
# Size optimized binary target.
small: CFLAGS:=-Os $(CFLAGS) -DSMALL
small: clean $(BIN)
ifndef DEBUG
strip --remove-section=.comment --remove-section=.note $(BIN)
endif
ls -l $(BIN)

clean:


+ 4
- 1
debian/changelog View File

@@ -4,8 +4,11 @@ main-menu (1.22) UNRELEASED; urgency=low
* Fix test for new menu items that come before the last successful item.
It's ok to jump up the menu to run such new items. Closes: #444462
* Fix NEVERDEFAULT test. Closes: #277743
* Support DEB_BUILD_OPTIONS=nostrip. Closes: #437554
* Add a (lame) guard against infinite recursion in di_config_package.
Closes: #437323

-- Joey Hess <joeyh@debian.org> Fri, 28 Sep 2007 21:12:56 -0400
-- Joey Hess <joeyh@debian.org> Fri, 28 Sep 2007 23:45:20 -0400

main-menu (1.21) unstable; urgency=low



+ 1
- 0
debian/rules View File

@@ -27,6 +27,7 @@ binary-arch: build install
dh_installdebconf
dh_compress
dh_fixperms
dh_strip
dh_installdeb
dh_shlibdeps
dh_gencontrol


+ 12
- 3
main-menu.c View File

@@ -680,6 +680,8 @@ int main (int argc __attribute__ ((unused)), char **argv) {
return EXIT_FAILURE;
}

int di_config_package_depth=0;

/*
* Configure all dependencies, special case for virtual packages.
* This is done depth-first.
@@ -691,10 +693,10 @@ static int di_config_package(di_system_package *p,
di_slist_node *node;
di_system_package *dep;

//di_log(DI_LOG_LEVEL_DEBUG, "configure %s, status: %d\n", p->p.package, p->p.status);
//di_log(DI_LOG_LEVEL_DEBUG, "configure %s, status: %d", p->p.package, p->p.status);

if (p->p.type == di_package_type_virtual_package) {
//di_log(DI_LOG_LEVEL_DEBUG, "virtual package %s\n", p->p.package);
//di_log(DI_LOG_LEVEL_DEBUG, "virtual package %s", p->p.package);
if (virtfunc)
return virtfunc(p);
else
@@ -711,7 +713,14 @@ static int di_config_package(di_system_package *p,
if (d->type != di_package_dependency_type_depends)
continue;
/* Recursively configure this package */
switch (di_config_package(dep, virtfunc)) {
di_config_package_depth++;
if (di_config_package_depth > 1000) {
di_log(DI_LOG_LEVEL_WARNING, "Deep recursion configuring package %s (dep loop?)", p->p.package);
return -1;
}
ret = di_config_package(dep, virtfunc);
di_config_package_depth--;
switch (ret) {
case -1:
return -1;
case EXIT_BACKUP:


Loading…
Cancel
Save