FS#23378 - makepkg running "sync"

Attached to Project: Pacman
Opened by Jan Alexander Steffens (heftig) - Tuesday, 22 March 2011, 07:12 GMT
Last edited by Allan McRae (Allan) - Sunday, 05 June 2011, 10:08 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.5.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

makepkg runs "sync" on line 804. Can we get rid of this, preferably by 3.5.1?

I don't see any immediate use for it, and heavily-used systems can take an extremely long time to return from it. I've had it blocking for 15 minutes or more, especially on Btrfs.
This task depends upon

Closed by  Allan McRae (Allan)
Sunday, 05 June 2011, 10:08 GMT
Reason for closing:  Fixed
Additional comments about closing:  http://projects.archlinux.org/pacman.git /commit/?id=14474a32
Comment by Allan McRae (Allan) - Tuesday, 22 March 2011, 07:35 GMT
No, that can not be removed. Without the sync, the log files do not get fully written before removing the log pipe.
Comment by Rémy Oudompheng (remyoudompheng) - Tuesday, 22 March 2011, 07:49 GMT
what ?? isn't there any other solution to flush this pipe or make it write synchoronously ?
Comment by Jan Alexander Steffens (heftig) - Tuesday, 22 March 2011, 08:16 GMT
Isn't there a way just to sync a single descriptor?
Comment by Jan Alexander Steffens (heftig) - Tuesday, 22 March 2011, 08:51 GMT
The whole exec stuff in logging seems suspect to me. Why isn't $pkgfunc simply run using &>"$logpipe" ?

1>file 2>file would lose whatever was written first, since the second write would clobber the first one. &>file is safer.
Comment by Allan McRae (Allan) - Tuesday, 22 March 2011, 10:51 GMT
That is the only way to pipe to the output to both the screen and the log file _AND_ keep the variable overrides in the package function (i.e. it makes package splitting actually work). See http://projects.archlinux.org/pacman.git/commit/?id=708ce148 for the explanation.

Also note "1>file 2>file" is not what you think is being done either. 1 and 2 are not programs producing output... they are file descriptors.

If there is a way to sync a single file, then that would be great (I do not know of one). Or if there is another way of achieving what is being done there, that is acceptable too. Remember any change has to work with bash-3.2 as well.

Comment by Dan McGee (toofishes) - Wednesday, 23 March 2011, 19:01 GMT

Loading...