]> err.no Git - dpkg/commitdiff
Chop read lines in myfileopt
authorWichert Akkerman <wakkerma@debian.org>
Tue, 7 Nov 2000 21:23:26 +0000 (21:23 +0000)
committerWichert Akkerman <wakkerma@debian.org>
Tue, 7 Nov 2000 21:23:26 +0000 (21:23 +0000)
ChangeLog
debian/changelog
lib/myopt.c
scripts/dpkg-statoverride.pl
version-nr

index 98370c6d8fd1a69ed8ac01ce5883f0e33d138a3d..a26070425025c48d14b18185a8946115250254d3 100644 (file)
--- a/ChangeLog
+++ b/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
index b2d99a937674e6283f3bf4e4fbcf9a3e5ba8a2ec..aee580b7ac7e145e1328b38631e3c1bb01219f46 100644 (file)
@@ -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
index 7ae3e175d0058d4c0427d17c180e63b1daf9fa36..bbfe02462bbd1fd594eee57be39fb0c6472d6f81 100644 (file)
@@ -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;
index d621818df8f1b18e93f8898587d1823a3ff77d30..89ad080f5fe949141e976898fae3cf74ec46c56c 100755 (executable)
@@ -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";
        }
index bd8bf882d06184bb54615a59477e3c5e35f522fc..27f9cd322bb9121054664da0e44ac2996f726886 100644 (file)
@@ -1 +1 @@
-1.7.0
+1.8.0