[Piuparts-devel] logrotate stuff

Andreas Beckmann anbe at debian.org
Tue Oct 23 11:05:03 BST 2018


0m32.3s ERROR: Command failed (status=1): ['chroot', '/srv/piuparts/tmp/tmpmBu3wP', '/usr/sbin/logrotate', '/etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh']
  error: /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh:2 unknown option 'UPDATE' -- ignoring line
  error: /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh:3 unknown option 'if' -- ignoring line
  error: /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh:4 unknown option 'then' -- ignoring line
  error: /etc/logrotate.d/httpd-prerotate/awstats/prerotate.sh:5 extra arguments for su

(package: awstats)

logrotate.conf(5) says:
       include file_or_directory
              Reads  the  file given as an argument as if it was included inline where the include directive appears. If a directory is given, most of the files in that directory are read in alphabetic order
              before processing of the including file continues. The only files which are ignored are files which are not regular files (such as directories and named pipes) and files whose  names  end  with
              one of the taboo extensions or patterns, as specified by the tabooext or taboopat directives, respectively.

so I think check_if_logrotatefiles() in piuarts.py is wrong
since it considers also files in subdirectories below /etc/logrotate.d

check_if_logrotatefiles() is horrible anyway by directly reading
"var/lib/dpkg/info" + package + ".list"
(which is also wrong for M-A: same packages).


Andreas



More information about the Piuparts-devel mailing list