Gentoo Archives: gentoo-portage-dev

From: Fabian Groffen <grobian@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] Re: proj/portage:master commit in: man/, pym/portage/dbapi/, pym/portage/, cnf/
Date: Thu, 25 Oct 2012 12:03:08
Message-Id: 20121025093431.GD85698@gentoo.org
1 On 25-10-2012 08:45:36 +0000, Zac Medico wrote:
2 > URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=10b6d012
3 >
4 > Add FEATURES=merge-sync, for bug #439584.
5
6 > + if not self._device_path_map or \
7 > + "merge-sync" not in self.settings.features:
8 > + return
9 > +
10 > + syncfs = self._get_syncfs()
11 > + if syncfs is None:
12 > + try:
13 > + proc = subprocess.Popen(["sync"])
14 > + except EnvironmentError:
15 > + pass
16 > + else:
17 > + proc.wait()
18 > + else:
19 > + for path in self._device_path_map.values():
20 > + try:
21 > + fd = os.open(path, os.O_RDONLY)
22 > + except OSError:
23 > + pass
24 > + else:
25 > + try:
26 > + syncfs(fd)
27
28 can't you use os.fdatasync() or os.fsync() instead?
29
30
31 --
32 Fabian Groffen
33 Gentoo on a different level

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies