Bug 14846 - bm creates logs with bad extension
Summary: bm creates logs with bad extension
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Shlomi Fish
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends on:
Blocks:
 
Reported: 2014-12-18 20:26 CET by Alex Loginov
Modified: 2014-12-24 09:36 CET (History)
3 users (show)

See Also:
Source RPM: bm
CVE:
Status comment:


Attachments

Description Alex Loginov 2014-12-18 20:26:44 CET
Description of problem:
bm creates logs in format "log.pkg_name", but it's not OK.
For example, if I build exe pkg I have log.exe and double click runs wine.
So, good format is mirrored: "pkg_name.log"


Version-Release number of selected component (if applicable): bm-2.1-233.mga5


How reproducible: always


Steps to Reproduce:
1. bm -lb
2. double click on log file



Reproducible: 

Steps to Reproduce:
Alex Loginov 2014-12-18 20:27:20 CET

Keywords: (none) => Triaged
Assignee: bugsquad => shlomif

Comment 1 Alex Loginov 2014-12-19 13:41:39 CET
Shlomi, hi,
I commited modification and tested. If OK, then please submit.
http://svnweb.mageia.org/packages?view=revision&revision=804254
Comment 2 Angelo Naselli 2014-12-19 14:07:24 CET
I am not convinced that is a real problem...
and i won't be so happy for this change.

1) bm is not a tool to be used in graphical environment, so double clicking on
log file is not a real problem.

2) some (or most) of us, at least I talk for myself, when use bm use also console 
intensively so to read log i usually type vi SPECS/log<tab> that works for almost
everything, changing the name convention that is broken and I should type the project name first. Also tailing SPECS/log<tab> would be broken.

CC: (none) => anaselli

Comment 3 Angelo Naselli 2014-12-19 14:21:04 CET
please revert your changes, i haven't seen any discussion here.

You have the option if you want to change the filename!
--build-log=FILE      specify where to put the build log for each package
Comment 4 Shlomi Fish 2014-12-19 14:22:21 CET
(In reply to Alex Loginov from comment #1)
> Shlomi, hi,
> I commited modification and tested. If OK, then please submit.
> http://svnweb.mageia.org/packages?view=revision&revision=804254

I submitted the package with the fix into the repositories (before I saw Angelo's comment). Now I'll address what Angelo said.
Comment 5 Shlomi Fish 2014-12-19 14:23:43 CET
(In reply to Angelo Naselli from comment #3)
> please revert your changes, i haven't seen any discussion here.
> 

OK, I'll revert them for now. You people please decide what to do.

Regards,

-- Shlomi Fish

> You have the option if you want to change the filename!
> --build-log=FILE      specify where to put the build log for each package
Comment 6 Alex Loginov 2014-12-19 14:37:51 CET
Is it OK by default?
-        self.log = log or "$builddir/SPECS/log.$name"
+        self.log = log or "$builddir/SPECS/log_$name"
So, we wont use dot, but fix double click and keep <tab>.
Comment 7 Angelo Naselli 2014-12-19 20:45:23 CET
could be better and does not change most. But shouldn't be better to ask for it in mailing list? maybe some other developers would like to say their opinion. 
Consider also that upstream svn.mandriva.com is still log.$name
Comment 8 Shlomi Fish 2014-12-21 12:48:08 CET
Can I close the bug for the time being?

Status: NEW => ASSIGNED

Comment 9 Alex Loginov 2014-12-21 14:41:22 CET
Developers have no opinion. So, the best way this patch:
-        self.log = log or "$builddir/SPECS/log.$name"
+        self.log = log or "$builddir/SPECS/log_$name"
Comment 10 Barry Jackson 2014-12-21 23:21:27 CET
I really don't think anything is broken so why change it?

CC: (none) => zen25000

Comment 11 Alex Loginov 2014-12-22 06:10:56 CET
Will you see difference if to change dot on _ for vi? No. But for GUI difference will be.
Comment 12 Barry Jackson 2014-12-22 11:58:15 CET
Not for me as to view/edit files in KDE I always use right-click/Edit. (Using my own service menu)
It's safer than accidentally running a script or other executable by clicking it.

I just wonder how many personal scripts using log.* that people have will be broken by this?

To conclude that developers have no opinion because there was only one comment in response to a changelog message is unfair. Not everyone reads all changelog messages. Now Angelo has changed the subject there may be more feedback.

However, for me the proposed change would not cause a problem.
Comment 13 Alex Loginov 2014-12-22 17:21:40 CET
Barry, thank you for your opinion.
I sure my proposal (patch from comment #9) have no regress, but with progress.
My the first patch was not good, because I don't use vim, so I did not know, that Angelo will have problems. I'm sorry.
Comment 14 Sander Lepik 2014-12-22 20:00:09 CET
Alex, I'd say you should use the option mentioned in comment #3. There is always a regression if you change something like that. If someone has configured his/her scripts to use old pattern then new pattern will break it.

CC: (none) => mageia

Comment 15 Angelo Naselli 2014-12-22 20:19:06 CET
That could be Sander, but as said this is a developer tool, a reason to use scripts for those logs, is probably that we have also used bm in some script/cron or what else for automatically building. So i don't think this is the case for the most.
But I'm curious since there is an option that (hopefully) work to change the log
file name (and also another for the position) why can't be used such an option?

Alex how are you using bm? i think that if you are using some menu on desktop (action/service or...) you could change "bm %f" with "bm --build-log=%f.log %f"
or $f or...
If you run it from console you can add an alias (not easy you have to write a function with parameters or use a fixed log file name).

I mean the feature is covered, so it's not a bug or a missed feature.

As said just for curiosity....
Comment 16 Alex Loginov 2014-12-22 20:30:49 CET
I use dolphin with F4 console. So, I see file system in GUI, but work in console together with GUI.
Comment 17 Barry Jackson 2014-12-23 12:18:57 CET
So do I.

You may find my little add-on for dolphin useful.

http://mtf.no-ip.co.uk/pub/linux/barjac/distrib/cauldron/x86_64/media/extra/release/kde-servicemenu-extras-1.0-1.2.mga5.noarch.rpm

Provides right click context menu entries for Konqueror/Dolphin to:
* Edit files as root using the default KDE text editor
* Edit files as user using the default KDE text editor
* Copy path of file/folder to clipboard
* Copy name of file/folder to clipboard
* Copy md5sum of file to clipboard and also display it in pop-up

So rather than (double)click, Edit is in context menu.

Just a thought :)
Comment 18 Shlomi Fish 2014-12-24 09:36:15 CET
As noted, there's an easy way to set it using the command line option, which can be scripted. No need to break compatibility. so I'm resolving this as INVALID.

Resolution: (none) => INVALID
Status: ASSIGNED => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.