提交 33c84779 编写于 作者: P Paul Wise 提交者: Joerg Jaspert

Remove the headers from the Contents files (Closes: #841997)

Primarily machine-readable files are no place for documentation.
上级 7b56bc77
This file maps each file available in the Debian GNU/Linux system to
the package from which it originates. It includes packages from the
DIST distribution for the ARCH architecture.
You can use this list to determine which package contains a specific
file, or whether or not a specific file is available. The list is
updated weekly, each architecture on a different day.
When a file is contained in more than one package, all packages are
listed. When a directory is contained in more than one package, only
the first is listed.
The best way to search quickly for a file is with the Unix `grep'
utility, as in `grep <regular expression> CONTENTS':
$ grep nose Contents
etc/nosendfile net/sendfile
usr/X11R6/bin/noseguy x11/xscreensaver
usr/X11R6/man/man1/noseguy.1x.gz x11/xscreensaver
usr/doc/examples/ucbmpeg/mpeg_encode/nosearch.param graphics/ucbmpeg
usr/lib/cfengine/bin/noseyparker admin/cfengine
This list contains files in all packages, even though not all of the
packages are installed on an actual system at once. If you want to
find out which packages on an installed Debian system provide a
particular file, you can use `dpkg --search <filename>':
$ dpkg --search /usr/bin/dselect
dpkg: /usr/bin/dselect
FILE LOCATION
......@@ -259,7 +259,6 @@ Urgency
Contents
{
Header "contents";
Root "/srv/ftp-master.debian.org/test/";
}
......
......@@ -130,21 +130,12 @@ select bc.file, string_agg(o.section || '/' || b.package, ',' order by b.package
}
return BinaryContentsFileWriter(**values)
def get_header(self):
'''
Returns the header for the Contents files as a string.
'''
filename = os.path.join(Config()['Dir::Templates'], 'contents')
with open(filename) as header_file:
return header_file.read()
def write_file(self):
'''
Write the output file.
'''
writer = self.writer()
file = writer.open()
file.write(self.get_header())
for item in self.fetch():
file.write(item)
writer.close()
......
This file maps each file available in the Debian GNU/Linux system to
the package from which it originates. It includes packages from the
DIST distribution for the ARCH architecture.
You can use this list to determine which package contains a specific
file, or whether or not a specific file is available.
When a file is contained in more than one package, all packages are
listed.
FILE LOCATION
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册