[buildiso] generate log #45
Labels
No labels
Done
bug
buildiso
buildpkg
buildtree
critical
deployiso
duplicate
enhancement
help wanted
in progress
invalid
manjaro-chroot
note
old-not-relevant
optional
question
sonar
todo
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tools/manjaro-tools#45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: udeved
Redirect build log to log if it is either not run in terminal, or copy terminal output to log file.
Created by: udeved
If anybody know a good approach to log the build process, please say so.
I have added some time ago a logging function in util-iso and experimented with it, but I didn't like the results so far.
Created by: udeved
I have enabled logging
github.com/manjaro/manjaro-tools@b57b45ed2eIts still experimental
Created by: philmmanjaro
Ok, will test it out.
Created by: udeved
I haven't figured out yet how to keep the fd in terminal while logging.
Created by: philmmanjaro
what do you mean by fd?
Created by: udeved
fd=file descriptor, like stdout or stderr
Created by: philmmanjaro
ah, ok. did you check how makepkg does it? They do logging and terminal output also ...
Created by: philmmanjaro
Does this help in any way?
Created by: udeved
Well, I basically used the logger part of makepkg.
When I implemented it in buildiso, it produced strange results in the log file as well as missing stderr in terminal.
I now moved it to mkiso, but I haven't tested it yet.
Created by: philmmanjaro
Well, we can push it to 0.9.7.x and try to do it later or so ... Atm, I've no clue how to help here ...
Created by: udeved
I agree, its why I already disabled the log switch again.
To test, the mkiso args would have to add a -Z arg to the args array.
Created by: udeved
The only ugly thing with the logger enabled is ugly lines in the log file.
Perhaps, the entire msg calls need to be checked and perhaps %s to be used.
Created by: philmmanjaro
What do you mean with ugly lines? There are tools and one-liners to clean up these. Here are some examples:
To clean that up you can use this:
Result is then:
Created by: philmmanjaro
Also there is an application for it if needed: typescript2txt
Created by: udeved
The log has screwed up the arrows that are printed.
It prints them as escape sequences, and I don't think we should "fix" this by filtering the stuff.
The log should be written correctly already.
Created by: philmmanjaro
Well, it always depends which interpreter you're using. Gimme an example so I can take a look at it.
Created by: udeved
My guess is that its caused by wrong encoding.
Created by: philmmanjaro
Well, we pass color codes and such. Try to use col to see if it will be better using this interpreter. You can also try my filters to see if that helps.
Created by: udeved
It should work without any filters, it does for makepkg.
I investigated, its only an issue if colors are enabled, if disabled, the logfiles are fine and readable.
Needs further digging ...
Created by: philmmanjaro
It is the color code which most likely messes it up. The filters deal with them ...
Created by: udeved
Things is, I would like to understand what's going on there.
As fr as I see, the makepkg code does nothing special to filter.
Created by: philmmanjaro
Also what I notice are the progress bars for example in download procedure. Ask @Kirek for how he solved it in manjaro-system-settings:
Created by: udeved
The "missing" stuff is explainable with redirection of file descriptor.
I think its ok that the log file does not contain progress bars.
But I don't understand why the color stuff screws up the log output.
Created by: philmmanjaro
Another issue with this logger is that if we have a dbus workaround pkill it fails and complains that something went wrong. However this happens also without the logging. What changed?
Created by: philmmanjaro
Hmm, seems not to be related with pkill. KDE-minimal profile stopps for me also. Will test an older snapshot now ...
Created by: udeved
Its to do with the wrapper function, I think.
Introduced with logger, "run_safe" in util-iso-log
Created by: udeved
Same for colored pacman .install scriptlets.
Created by: philmmanjaro
Simply use the code I posted to filter it out:
perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g' | col -bCreated by: philmmanjaro
Check this out: http://ubuntuforums.org/showthread.php?t=2231058
Created by: udeved
Won't filter any ansi sequence.
I tried.
Its connected with terminal and fd2 where msg get redirected.
Inn case of the PKGBUILD install files, I think it can be solved with...
we could also source /usr/share/makepkg/util/messages,sh
Already been to ubuntu and everywhere.