Sfoglia il codice sorgente

* lib/parsehelp.c: Reduce memory a tad.
* debian/changelog: Close additional bugs.
* debian/rules: Added a build-static rule.

Adam Heath 25 anni fa
parent
commit
f2af040b56
4 ha cambiato i file con 26 aggiunte e 14 eliminazioni
  1. 6 0
      ChangeLog
  2. 3 3
      debian/changelog
  3. 13 10
      debian/rules
  4. 4 1
      lib/parsehelp.c

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+Mon Apr 23 18:08:37 CDT 2001 Adam Heath <doogie@debian.org>
+
+  * lib/parsehelp.c: Reduce memory a tad.
+  * debian/changelog: Close additional bugs.
+  * debian/rules: Added a build-static rule.
+
 Mon Apr 23 17:17:35 CDT 2001 Adam Heath <doogie@debian.org>
 
   * main/enquiry.c: Additional add error returns for -L, -s, and -p.

+ 3 - 3
debian/changelog

@@ -13,9 +13,9 @@ dpkg (1.9.0) unstable; urgency=low
   * Removed all --smallmem code, as smallmem and largemem now actually
     use about the same amount of memory, and largemem is faster.  Both
     --largemem and --smallmem are now obselete options, and will print
-    a warning if used. Closes: Bug#84905
+    a warning if used. Closes: Bug#84905, #67528
   * Initialize unitialized variables.  This should solve several
-    segfaults. Closes: Bug#25317(plus 8 others, thru the beauty of
+    segfaults. Closes: Bug#25317(plus 9 others, thru the beauty of
     merges)
   * Found that when working with dependency cycles, and part of the cycle
     was a provide, the provider was not being considered, so the cycle
@@ -97,7 +97,7 @@ dpkg (1.9.0) unstable; urgency=low
   * Handle dangling symlinks, by ignoring error code 1 from find, when
     processing --recursive. Closes: Bug#4784
   * dpkg -L, -S, -l, -s, and -p now return an error code if any package
-    does not exist. Closes: Bug#4974
+    does not exist. Closes: Bug#4974, #72406
 
  -- Wichert Akkerman <wakkerma@debian.org>  Sat, 13 Jan 2001 08:52:11 -0500
 

+ 13 - 10
debian/rules

@@ -14,17 +14,20 @@ DEB_BUILD_GNU_TYPE	:= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE 2> /dev/nul
 DEB_HOST_GNU_TYPE	:= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE 2> /dev/null || true)
 arch			:= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
-ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
   config_arg	:= --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
 else
   config_arg	:=
 endif
 
+BUILD-DIRS	:= $(BUILD) $(BUILD)-static
+
+$(BUILD)-static/config.status:	LDFLAGS = -static
 # Setup the buildlocation
-$(BUILD)/config.status:
+$(BUILD)/config.status $(BUILD)-static/config.status:
 	$(checkdir)
-	install -d $(BUILD)
-	cd $(BUILD) && $(DIR)/configure \
+	install -d $(@D)
+	cd $(@D) && LDFLAGS=$(LDFLAGS) CFLAGS=$(CFLAGS) $(DIR)/configure \
 		--prefix=/usr \
 		--datadir=/usr/share \
 		--mandir=/usr/share/man \
@@ -40,15 +43,15 @@ clean:
 	$(checkdir)
 	rm -f debian/files debian/substvars
 	rm -f debian/dpkg.substvars
-	rm -fr $(BUILD) $(TMP) $(TMP_DPKG) $(TMP_DPKG_DEV) $(TMP_DPKG_DOC)
+	rm -fr $(BUILD-DIRS) $(TMP) $(TMP_DPKG) $(TMP_DPKG_DEV) $(TMP_DPKG_DOC)
 	rm -f po/{cat-id-tbl.c,stamp-cat-id,*.gmo}
-	rm -f stamp-build stamp-binary
+	rm -f stamp-build stamp-build-static stamp-binary
 
-build: stamp-build
+build build-static: build%: stamp-build%
 
-stamp-build: $(BUILD)/config.status
-	$(MAKE) $(MFLAGS) -C $(BUILD)
-	touch stamp-build
+stamp-build stamp-build-static: stamp-build%: $(BUILD)%/config.status
+	$(MAKE) $(MFLAGS) -C $(BUILD)$*
+	touch $@
 
 binary: binary-arch binary-indep
 

+ 4 - 1
lib/parsehelp.c

@@ -216,9 +216,12 @@ void parsemustfield
  const struct pkginfo *pigp, int warnonly,
  const char **value, const char *what) 
 {
+  static char *empty = NULL;
+  if (!empty)
+    empty= nfstrsave("");
   if (!*value) {
     parseerr(file,filename,lno, warnto,warncount,pigp,warnonly, _("missing %s"),what);
-    *value= nfstrsave("");
+    *value= empty;
   } else if (!**value) {
     parseerr(file,filename,lno, warnto,warncount,pigp,warnonly,
              _("empty value for %s"),what);