char *tempfile = NULL;
int tempfile_fd = -1;
-void remove_tmpfile(void)
+static void remove_tmpfile(void)
{
if (tempfile_fd > 0)
close(tempfile_fd);
int main(int argc, char *argv[])
{
+ _config->Set("APT::Sources::Use-Deb822", true);
+
const char contents[] = ""
- "Type: deb\n"
- "URI: http://ftp.debian.org/debian\n"
+ "Types: deb\n"
+ "URIs: http://ftp.debian.org/debian\n"
"Suites: stable\n"
"Sections: main\n"
- "Comment: Some random string\n"
- " that can be very long\n"
+ "Description: short\n"
+ " long description that can be very long\n"
"\n"
- "Type: deb\n"
- "URI: http://ftp.debian.org/debian\n"
- "Suite: unstable\n"
- "Section: main non-free\n"
+ "Types: deb\n"
+ "URIs: http://ftp.debian.org/debian\n"
+ "Suites: unstable\n"
+ "Sections: main non-free\n"
;
FileFd fd;
+ atexit(remove_tmpfile);
tempfile = strdup("apt-test.XXXXXXXX");
tempfile_fd = mkstemp(tempfile);