di = self.handle.Dataiterator(solv.SOLVID_META, solv.SUSETAGS_FILE_NAME, None, 0)
di.prepend_keyname(solv.SUSETAGS_FILE)
for d in di:
- filename = d.str
+ filename = d.str()
if not filename:
continue
if filename[0:9] != "packages.":
return 0;
}
if (uncompress)
- return sat_xfopen_fd(".gz", fd, 0);
+ return sat_xfopen_fd(".gz", fd, "r");
fcntl(fd, F_SETFD, FD_CLOEXEC);
return fdopen(fd, "r");
}
if (fl == O_WRONLY)
mode = "w";
else if (fl == O_RDWR)
- mode = "r+";
+ {
+ if (!suf || strcmp(suf, ".gz") != 0)
+ mode = "r+";
+ else
+ mode = "r";
+ }
else
mode = "r";
}