/srv/irclogs.ubuntu.com/2019/06/20/#ubuntustudio-devel.txt

OvenWerksteward: yes that works. I like that it is much easier to read and easy to make sure there are spaces where they need to be without adding +" "+ kinds of junk.00:52
OvenWerksI have found another bug though :(  I will look at fixing that.00:53
tewardyep.  this is why I like format strings :P01:05
tewardOvenWerks: and what bug, if I may ask?01:05
OvenWerksthe visible check box was not working right (just pushed fix) I could make something not visible, but could not make it visible again. And I had to do an edit to do even that.01:29
OvenWerksteward: ^^ So I have fixed that. (running glade to add one small change sure makes for a big diff)01:31
tewardOvenWerks: I take it that was not my fault then :p01:34
OvenWerksno not your falt01:34
EickmeyerOvenWerks: I just triggered a rebuild.01:37
tewardEickmeyer: might be a while :Po01:47
tewardI can fast build if you want01:47
Eickmeyerteward: I'm in no rush.01:48
EickmeyerDunno about OvenWerks01:48
tewardwell this also lets me notice any odd new lintian warns :p01:49
Eickmeyerteward: Also, looks like it's already built and just needs to be publish.01:49
Eickmeyerteward: True. Go ahead.01:49
tewardyep looks good.01:50
tewardnot sure if hte publisher will be fast enough :P01:50
tewardbut i'm impatient :)01:50
tewardhttps://people.ubuntu.com/~teward/ubuntustudio-menu-add_0.1_all_v4.deb if you are as impatient as I :)01:51
tewardglad to hear though my little change there didn't blow it up :)01:51
tewardi thought for a second I had introduced another bug xD01:51
EickmeyerNah, looks like you're good. Any problems that came from that have been circumvented, I take it?01:53
tewardEickmeyer: AIUI yes01:54
tewardOW said there was a bug in the visible checkbox not working right01:54
tewardbut not related to my code01:54
tewardand I think OW is now in love with format strings xD01:54
EickmeyerI see that. Looks like he fixed it.01:54
Eickmeyerhehehehe01:54
tewardboth f-strings01:54
tewardand "".format :P01:54
EickmeyerMaybe someday I'll learn Python and know what that means.01:55
tewardheh01:56
tewardEickmeyer: basically?02:10
EickmeyerHuh?02:10
tewardinstead of doing "some string "+variable+" was here" it's easier to know where things are in the string02:10
tewardf"some string {variable} was here"  <-- easier to make sure things are exactly where they need to be02:11
tewardAND to quote out entire args02:11
EickmeyerOkay, that makes sense.02:11
EickmeyerI had to turn that into a bash script in my head.02:11
tewardit's not actaully that far off ;)02:12
OvenWerksEickmeyer: f-strings are like super bash instring variables as the "variables" can be equasions or the return of functions14:51
tewardOvenWerks: can we confirm the bugs you ID'd are fixed and documented in the changelog and 'ready for upload'?16:17
tewardand that 'this works'?16:17
tewardonce that's ready I can responsor it16:17
OvenWerksteward: they bugs are fixed... running my local file before uploading. I will DL the package and check this afternoon to check that way too.16:57
OvenWerksteward: in many ways I would like other people to try it as that exposes my blind spots...16:58
OvenWerksbut we seems to have very few people willing to do that.16:59
OvenWerksWhen I build something, everything inside is "intuitive" to me... but I tend to be the odd one out in many of these things17:00
tewardOvenWerks: well I don't run Studio17:12
tewardso make Eickmeyer test it :p17:13
* teward is just here as a 'helper' today17:13
* Eickmeyer tested it already17:25
Eickmeyerteward: I'd go ahead. If we can get it into Eoan, I should have upload rights for bugfixes, or at least can get them from the DMB.17:26
EickmeyerIf we can get people testing the dailies, that would be the best route at this point.17:27
* Eickmeyer is going crazy applying for jobs.17:27
tewardack17:44
tewardi will pull latest, debuild, and upload again.  If it rejects I'll let you know.17:44
Eickmeyerteward: ack17:44
tewardthis is missing the subprocess patches...17:47
tewardthe one that switches the subprocess call to array based17:47
tewardOvenWerks: did that get pushed?17:47
tewardor did we expect me to apply that?17:47
tewardor did that still not work?17:48
tewardthe change which does subprocess.run(["/usr/bin/exo-desktop-item-edit", str(self.tempfile)], shell=False) instead of the string based exec17:50
tewardEickmeyer: ^ this was the last bit that sarnold wanted done17:50
tewardbut it was untested17:50
teward'cause i'm not on eoan17:50
tewardnor STudio17:50
tewardso if this still doesn't work i'll be happy to leave it as is with the strings17:51
tewardbut sarnold wanted it array-based preferably17:51
tewardrather than string-driven17:51
EickmeyerOvenWerks needs to address that then.17:51
tewardack18:11
OvenWerksI thought that had been changed. sorry, I will look at it.18:16
OvenWerks I thought that was what I tested.18:17
OvenWerkshttps://git.launchpad.net/ubuntustudio-menu-add/tree/usr/bin/ubuntustudio-menu-add?id=bd332ecd04cf778bd60208dbd187dd9658eaf7b418:19
Eickmeyerteward: ^18:20
OvenWerksline 41818:20
tewardOvenWerks: that's the format-string driven one18:20
tewardi had another patch hang on18:20
tewardthat applied it as an *array* with the full path18:20
tewardguess it never pushed18:20
teward'cause i didn't hit push18:20
OvenWerksI notice the terminal =true too :(18:21
tewardyeah that's why it's not got my code in it.  Mine uses shell=False18:21
tewardand sarnold doesn't like shell=True if it can be avoided18:21
tewardfor security reasons18:21
tewardokay...18:22
tewardhttps://git.launchpad.net/ubuntustudio-menu-add/commit/?id=50791c079560173736ec8eaaa2dc4362b297c0e018:22
tewardwhich uses the array18:22
tewardlets see if *this* works.  if not we'll revert18:22
tewardthis pulls the full path in so18:22
tewardif this works as-is then all is good18:22
tewardit SHOULD but it'll need a test ;)18:24
OvenWerksteward: that works here.... so what is different? When we tried it before it failed. Maybe shell == yes needs string?18:27
tewardOvenWerks: no18:27
tewardit's shell=False18:27
tewardtaht's what we needed18:27
tewardwhich i discovered during some tests18:27
OvenWerksYes, I agree18:27
OvenWerksI was wondering why it failed before (yesterday)18:28
tewardyeah i was headscratching18:28
tewardthen i did some local Python subprocess call tests18:28
tewardand found it18:28
OvenWerksThe only differences I see are " rather than ', full path and Shell=false18:33
OvenWerksI think the shell=False could be omitted as being default but leaving it in is self documenting.18:34
OvenWerksteward: ^^18:34
tewardyeah I left it in there for explicitly making sure.  I used double quotes by accident, but from Python's perspective 'foobar' == "foobar"  as they're both strings18:35
tewardif you prefer single quotes that's a minor change18:35
OvenWerksNot worth it18:35
tewardmmkay.  I need to add some changelog entries since I contributed now :|18:35
OvenWerksI tend toward double quotes... not sure why (K&R c maybe?)18:36
teward*SHRUGS*18:36
tewardoops caps18:36
tewardOK so I also added to the changelog since it has my two revisions per sarnold18:38
tewardsarnold: want to do one last review before this gets reeval'd for sponsoring?18:38
sarnoldsure18:39
tewardhttps://git.launchpad.net/ubuntustudio-menu-add/tree/usr/bin/ubuntustudio-menu-add should be less offensive wrt subprocess and lib calls :)18:40
sarnoldbtw is there a reason why this line uses concatenation?18:43
sarnoldself.tempfile = str(os.path.expanduser("~/"))+".config/ubuntustudio_menu_temp.desktop"18:43
tewardsarnold: because OvenWerks hasn't gotten to using an f-string for it yet18:43
sarnoldhmm I guess I could just try ..18:43
tewardsince they only learned about format strings yesterday-ish(?)18:43
sarnoldos.path.expanduser("~/.does/not/exist")18:44
sarnold'/home/sarnold/.does/not/exist'18:44
sarnoldno need for foramt strings18:44
tewardsarnold: the concat is to add the rest.18:44
tewardthat's why the concat as is works18:44
tewardand yes i'm annoying asking sarnold to spotcheck18:45
tewardbut since sarnold caught the first batch of errors18:45
tewardi'm being cautious :)18:45
tewardoh OvenWerks just a question18:46
tewardself.menufolder in menu_cb18:46
tewardthat's not init'd in __init__18:46
tewardshould it be?18:46
tewardeven if it's init'd to None?18:46
teward(code inspection shows it as a low-level consideration)18:46
teward(not blocking but still a question)18:46
sarnoldteward: well, it looks like os.path.expanduser() doesn't need the file to exist, it should work fine without the concatenation or format string or hwatever18:48
tewardindeed, it doesn't.18:48
tewardsarnold: so you're saying straight os.path.expanduser("~/.config/ubuntustudio_menu_temp.desktop")  ?18:48
teward(as an example)18:48
sarnoldyeah that should work, right?18:49
tewardyep even without the str-casting since it returns a str18:50
sarnoldyay18:50
tewardanything else glaring?18:51
tewardEickmeyer: OvenWerks: and forgive our bootprints over this :)18:51
sarnoldnope, thanks for fixing up the executions to use arrays :)18:52
tewardyeah that was a PITA to trace18:52
tewardOvenWerks: at your convenience, `git pull` and test please :)18:53
tewardif all still works18:53
tewardi'll sponsor it up :)18:53
Eickmeyerteward, sarnold: I think I speak for both of us when I say any improvements are welcoe.18:57
Eickmeyer*welcome18:57
tewardindeed.18:57
tewardEickmeyer: of course, sarnold does A LOT of code review so spots things I sometimes don't :)18:57
EickmeyerMakes sense.18:57
sarnoldeveryone spots different things :)18:58
sarnoldI'm good at noticing things along syscall boundaries18:58
sarnoldand sometimes algorithmic mistakes18:58
sarnoldother people know specific idioms in languages better18:58
OvenWerksteward: self.menufolder is actually initialized in the glade file.18:59
sarnoldbut now time to watch some women's world cup :) have fun18:59
studiobot<teward001> OvenWerks: ah.  ack, OK.18:59
studiobot<teward001> just thought I'd ask :)18:59
studiobot<teward001> OvenWerks: if everything works fine here though as-is then this is Good 2 Go and I'll be happy to upload (unless you want a test build too)18:59
OvenWerksthe data is static unlike submenu18:59
OvenWerksI am still testing, I looked at the init first19:00
OvenWerksI din't know I could give the whole string for expanduser. Thank you. Yes that still works.19:03
OvenWerksteward: thinking about logically, it does make sense I could do it that way.19:04
* OvenWerks wonders how ubuntustudio-controls got through...19:05
EickmeyerOvenWerks: Probably because it was an already-existing binary.19:05
OvenWerksI will go through -controls sometime fixing some of these things there as well.19:07
OvenWerksThe lines of code count should go down.19:08
tewardOvenWerks: probably because it didn't have me or sarnold digging into the code :P19:08
teward(my coredev is new as of this week and Eickmeyer asked me to poke so :P)19:08
OvenWerksteward: I will at least go through the code first before we sak for a look.19:09
studiobot<teward001> 👍19:10
OvenWerksI should be able to get rid of things like shell=True19:10
tewardOvenWerks: yeah, since shell=True is already insecure19:10
tewardthey even say it in the docs xD19:10
tewardthanks for the effort though, just make sure it works with the array execution and those strings being expanded19:10
tewardif all looks good I'll kick it into NEW queue19:10
OvenWerksyup, but it is obvious to me my main problem there is using the shell to find the executable, just give the path and that can go away19:11
OvenWerksteward: ubuntustudio-menu-add looks good to me. anything those changes affect has been tested.19:11
studiobot<teward001> ack19:12
studiobot<teward001> are you and Eickmeyer comfortable with this being 0.1 in the repos then?19:12
OvenWerksyes19:12
OvenWerkswhen I work on -controls, I will commit each kind of change. (maybe tab to space frst)19:13
studiobot<teward001> good idea :)19:13
* OvenWerks is off to lunch19:14
tewardOvenWerks: Eickmeyer: just as an FYI: the package was accepted to the NEW queue as is now20:49
tewardit's waiting AA review20:49
tewardat their convenience.20:49
* teward goes to pack up before heading home from work20:50

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!