Wichert Akkerman лет назад: 26
Родитель
Сommit
e01a5cd45a
5 измененных файлов с 14 добавлено и 3 удалено
  1. 4 0
      ChangeLog
  2. 6 0
      debian/changelog
  3. 2 1
      lib/myopt.c
  4. 1 1
      scripts/dpkg-statoverride.pl
  5. 1 1
      version-nr

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+Tue Nov  7 22:05:48 CET 2000 Wichert Akkerman <wakkerma@debian.org>
+
+  * lib/myopt.c: chop read lines in myfileopt
+
 Tue Nov  7 00:45:00 CET 2000 Wichert Akkerman <wakkerma@debian.org>
 
   * scripts/dpkg-statoverride.8: fix typos

+ 6 - 0
debian/changelog

@@ -1,3 +1,9 @@
+dpkg (1.7.2) unstable; urgency=low
+
+  * Fix parsing of configuration files
+
+ -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
+
 dpkg (1.7.1) unstable; urgency=medium
 
   * Fix a typo in the dpkg-statoveride manpage

+ 2 - 1
lib/myopt.c

@@ -42,7 +42,8 @@ void myfileopt(const char* fn, const struct cmdinfo* cmdinfos) {
     char* opt;
     const struct cmdinfo *cip;
 
-    if ((linebuf[0]=='#') || (linebuf[0]=='\n')) continue;
+    if ((linebuf[0]=='#') || (linebuf[0]=='\n') || (linebuf[0]==0)) continue;
+    linebuf[strlen(linebuf)-1]=0;
     for (opt=linebuf;isalnum(*opt)||*opt=='-';opt++) ;
     if (*opt==0)
       opt=NULL;

+ 1 - 1
scripts/dpkg-statoverride.pl

@@ -170,7 +170,7 @@ sub ReadOverrides {
 sub WriteOverrides {
 	my ($file);
 
-	open(SO,"$admindir/statoverride-new") || &quit("cannot open new statoverride file: $!");
+	open(SO,">$admindir/statoverride-new") || &quit("cannot open new statoverride file: $!");
 	foreach $file (keys %owner) {
 		print SO "$owner{$file} $group{$file} $mode{$file} $file\n";
 	}

+ 1 - 1
version-nr

@@ -1 +1 @@
-1.7.0
+1.8.0