[00:13] <Eickmeyer> OvenWerks: teward is reviewing your code for ubuntustudio-menu-add.
[00:13] <teward> cursory review
[00:14] <teward> nothing in-depth ;)
[00:14] <teward> Eickmeyer: OvenWerks: BUGS == ROADMAP, is this intentional?
[00:15] <teward> (same file twice)
[00:15] <teward> just curious
[00:15] <Eickmeyer> teward: I believe the file was supposed to be renamed ROADMAP, but the BUGS file didn't get deleted? Might've been a git collision, for lack of a better term.
[00:15] <teward> nope still present there
[00:15] <Eickmeyer> smh
[00:15] <Eickmeyer> I can fix unless you want to just kill it with fire.
[00:16] <teward> Eickmeyer: i don't have upload to this code branch
[00:16] <teward> if you can update it in the git that'd be great
[00:16] <Eickmeyer> I can. standby...
[00:16] <teward> your changelog also is UNRELEASED
[00:16] <teward> which is not a valid target
[00:16] <teward> I assume you want me to just alter that
[00:16] <Eickmeyer> Ugh... also will fix.
[00:17] <teward> eesh, native package.
[00:17] <teward> Not complaining MUCH but...
[00:17] <teward> I prefer quilts ;)
[00:17] <teward> not an impact on the review though just me shivering because Debianisms
[00:17] <teward> and some chaos i've had to deal with there
[00:17] <Eickmeyer> Yeah, it's a native package. No reason to not be native since it's for Ubuntu only.
[00:17] <teward> yep
[00:17] <teward> Eickmeyer: other than those issues I pointed at
[00:18] <teward> everything LOOKS OK
[00:18] <teward> it'll need AA review of course, but fix the things I indicated
[00:18] <Eickmeyer> Ok. Fixing now.
[00:18] <teward> for ubuntustudio-menu-add anyways
[00:23] <Eickmeyer> teward: Fixed.
[00:30] <teward> Eickmeyer: ack.  Going to run this through local sbuild with LIntian calls, as well
[00:30] <teward> give me a bit
[00:30] <teward> gotta spin an eoan chroot ;)
[00:30] <Eickmeyer> No worries.
[00:33] <teward> hmmmmmmmmmmmmm
[00:37] <teward> Eickmeyer: there's a few things in the built binaries that throw some lintian pedantic warnings
[00:37] <teward> W: ubuntustudio-menu-add: binary-without-manpage usr/bin/ubuntustudio-menu-add
[00:38] <teward> if this shouldn't have a manpage you might want an override...
[00:38] <teward> and this is when `lintian --pedantic` is run on the built binaries inside the sbuild schroot
[00:39] <teward> it passes but not sure how pedantic you want me to be with warnings
[00:40] <Eickmeyer> teward: In the past, vorlon, infinity, and sil2100 have just let that one go.
[00:40] <teward> ack
[00:40] <teward> i'll make a note of it but i'll consider it 'passing'
[00:40] <teward> since it didnt lintian-fail
[00:40] <teward> just something i noticed
[00:40] <Eickmeyer> Ok.
[00:40] <Eickmeyer> ack
[00:40] <teward> and i'm overly pedantic ;)
[00:40] <teward> and in Debian they whine more when that triggers
[00:41] <Eickmeyer> Yeah.
[00:41] <teward> builds clean, looks lintian clean except for that
[00:42] <Eickmeyer> Cool.
[00:43] <Eickmeyer> teward: When (if) you get to dpf-plugins, don't expect manpages for that either. Those plugins are something that you would only run if you already knew how to run them.
[00:43] <Eickmeyer> Live/Recording Audio Engineers, for example.
[00:45] <teward> yeah i'm just overly pedantic from the Debianisms I've had to handle :P
[00:45] <Eickmeyer> No worries.
[00:52] <teward> Eickmeyer: uploaded to NEW queue
[00:53]  * teward needs food
[00:53] <Eickmeyer> teward: Saw that, thanks!
[01:01] <teward> Eickmeyer: eoan-proposed next time though the system redirects it
[01:02] <Eickmeyer> teward: I was always told to target the release directly, letting the system redirect it.
[01:02] <teward> *shrugs*
[01:02] <teward> i'm picky ;)
[01:02] <teward> but all's good
[01:02] <teward> the system'll redirect it regardless :)
[01:02]  * Eickmeyer *thumbsup*
[01:04] <teward> OvenWerks: what Eickmeyer is NOT telling you is I want to school you in how PEP8 works :P
[01:04] <teward> and how triple-apostrophe strings are NOT comments.
[01:04] <teward> flake threw all sorts of "WTH" info level warns there :|
[01:06] <teward> Eickmeyer: OvenWerks: you do NOT want to know the complaints sarnold has
[01:08] <sarnold> ahoy pals, could I beg someone to replace all the calls to rm and cp with native python calls instead, in https://git.launchpad.net/ubuntustudio-menu-add/tree/usr/bin/ubuntustudio-menu-add ?
[01:08] <teward> sarnold: you should NACK it
[01:09] <sarnold> it'd also be a huge favour to me to rexplace the exoedit thing with an array-based execution, see https://docs.python.org/3/library/subprocess.html#subprocess.run for an example
[01:10] <Eickmeyer> Oh boy...
[01:10] <sarnold> https://docs.python.org/3/library/os.html#os.unlink
[01:10] <sarnold> the file *copy* is annoying, but this may be a suitable replacement: https://docs.python.org/3/library/shutil.html#shutil.copyfile
[01:11] <teward> sarnold: https://bugs.launchpad.net/ubuntustudio-menu-add/+bug/1831154 also please
[01:11] <teward> i would suggest you also offload your comments there
[01:11] <teward> Eickmeyer: OvenWerks: I also ran a "dig" into here with my own knowledge and though I don't see an obvious exploit mechanism, I *HATE* subprocess wrappers where not needed
[01:11] <teward> esp. in latest Python in Eoan
[01:12] <teward> so I asked AA / release team to REJECT the package as-is
[01:12] <teward> as well, all the things sarnold indicated
[01:12] <Eickmeyer> ack
[01:13] <teward> i didn't do a full code dig and though I've DONE these kinds of subprocess wraps before...
[01:13] <teward> there's inbuilt os calls for lots of these things
[01:13] <teward> and those're preferred to these subprocess wraps
[01:13] <teward> ALTERNATIVELY
[01:13] <teward> give me direct upload rights to your code base
[01:13] <teward> i'll rewrite it myself ;)
[01:13] <teward> *shot*
[01:15] <teward> oh wait
[01:15] <teward> i forgot
[01:15] <teward> my membership gives me upload :|
[01:15] <Eickmeyer> teward: Haha
[01:15] <sarnold> it's still polite to ask :)
[01:15] <Eickmeyer> teward: Go ahead. I trust you.
[01:15] <teward> i'll provide a patch for it that they can apply :p
[01:15] <teward> sarnold: and let you review it too xD
[01:19] <teward> UNRELATED also use spaces not tabs
[01:19] <teward> because tabs suck
[01:23] <teward> this... is messy :|
[01:24] <teward> sarnold: we're in Py 3.7+ in Eoan right?
[01:25] <sarnold> teward: I think so; at the moment umt search reports python 3.7 in main, 3.8 in universe in eoan
[01:25] <teward> 3.7+ is fine
[01:26] <teward> because formatstrings
[01:26] <teward> saves doing string arithmetic
[01:27] <Eickmeyer> teward, sarnold: OvenWerks does most of his development in bionic, I believe.
[01:28] <teward> Eickmeyer: they can still use formatstrings :P
[01:28] <teward> the point is that i hate this string arithmetic
[01:28] <teward> "string data1:{} data2:{}".format(value1, value2)
[01:28] <Eickmeyer> I know, I was just referring to the 3.7 vs 3.8.
[01:28] <teward> ^ condensed to: f'string data1:{value1} data2:{value2}'
[01:29]  * Eickmeyer couldn't code his way out of a paper bag, so he sticks to packaging
[01:29] <teward> but as long as it's 3.7+ it's fine
[01:29] <teward> note to self: don't code review without food
[01:36] <teward> Eickmeyer: you and OvenWerks are going to hate me
[01:36] <teward> because of this patch
[01:36] <Eickmeyer> teward: I'm not, and I hope OvenWerks doesn't.
[01:37] <Eickmeyer> I am just grateful for the contribution!
[01:38] <teward> oh this is a LARGE patch
[01:39] <teward> sarnold: oh fun fact
[01:39] <teward> your subprocess array approach?
[01:39] <teward> for the one remaining SP call?
[01:39] <teward> sp.run(shlex.split("the full command string"), ...)  <-- shortcut
[01:40] <teward> i know a few tricks LOL
[01:40] <sarnold> teward: btw I hate that approach
[01:41] <sarnold> the whole point of using the array based approach is that the programmer actually knows what the arguments are, and asking the shell, or shlex, or whatever, to split them apart, is likely to break something, or let some smartasss name a file $(id) or whatever
[01:43] <teward> sarnold: true.
 Look who's in the Ubuntu Studio chat :D
[01:43] <teward> sarnold: but in this case these args don't seem fixed that way.  We could do that though
[01:43] <teward> @tsimonq2 there's a nuke with your name on it waiting in the Lubuntu infra
[01:43] <teward> go fix it
 @teward [<teward> @tsimonq2 there's a nuke with your name on it waiting in the Lubuntu in …], Oh?
[01:46] <teward> whoopsies i forgot to attach that patch
[01:46] <teward> Eickmeyer: sarnold: patch attached to the bug
[01:46] <teward> sarnold: i think you'll be happy with it
[01:46] <teward> but the patch is HUGE because tabs -> 4-spaces
[01:46] <teward> because the other thing I found was ***mixed punctuation***
[01:46] <teward> s/punctuation/indentations/
[01:46] <teward> which throws INdentationErrors
[01:47] <teward> sarnold: this patch is not a small one, but it pulls all the subprocess wrapped rm/cp and replaces them with os.unlink/shutil.copyfile accordingly
[01:49] <teward> tsimonq2: and no there's no nuke in the infra for you to deal with
[01:49] <teward> i just wanted to drive you insane :P
[01:49] <teward> Eickmeyer has an annoying habit they picked up from me
[01:49] <teward> being insistent on asking for things
[01:49] <teward> like sponsoring
[01:49] <teward> ... or in this case NOT tearing OvenWerks a new one
[01:51] <teward> Eickmeyer: wrt developing in Bionic...
[01:51] <Eickmeyer> teward: I appreciate it.
[01:51] <teward> i dev for 3.7/3.8 in Bionic too
[01:51] <teward> pyenv is my friend
[01:51] <teward> also lets me have 3.5 for the ancient infra I have to support for some older boxes
[01:52] <teward> Eickmeyer: this'll need a run test of course
[01:52] <teward> not just a build test
[01:52] <Eickmeyer> teward: ack
[01:52] <teward> because I had to remove some of the logic that WAS in place because subprocess is gone for some calls
[01:52] <teward> the logic *SHOULD* still function as is
[01:52] <teward> but it's... eh
[01:53] <sarnold> teward: it's usually better to stuff whitespace patches into their own thing, so the substantive fixes are easier to review
[01:53] <teward> good point
[01:53] <teward> sarnold: i can split that out but in this case my IDE did the autochanging
[01:54] <teward> sarnold: still, i think you'll like this.  https://paste.ubuntu.com/p/JX8gBK6fM4/ has the code after my revisions
[01:55] <sarnold> ahhhh that's the stuff :)
[02:26]  * OvenWerks actually has his tabs set to 2 spaces width
[02:28] <OvenWerks> teward: thank you for your work. I am relatively new to python, coming from c,c++,have done perl and tcl/tk in the past as well
[02:29] <OvenWerks> my main reason for working in python at all it that it seems to be favoured and is less likey to require adding more libs (though tcl/tk is used by enough other stuff it is always there for the studio iso)
[02:32] <Eickmeyer> OvenWerks: There's a patch in the bug report if you want to apply it and play with it.
[02:33] <OvenWerks> I was looking for that... thanks.
[02:34] <OvenWerks> I can create a man page if needed, but it would just be a rehash of the included help in the GUI :)
[02:34] <OvenWerks> sorry I forgot.
[02:34] <Eickmeyer> bug 1831154
[02:35] <Eickmeyer> OvenWerks: A man page is always welcome and would get rid of that lintian warning.
[02:35] <Eickmeyer> teward: ^
[02:36] <OvenWerks> with all the tab to space fixes I can't see what he did...
[02:38] <Eickmeyer> OvenWerks: It's mostly whitespaces. I'd look at the diff if you can.
[02:39] <OvenWerks> unlink is fine though. At some point I should change the var cmd to something more descriptive
[02:48] <OvenWerks> teward: I will try to remember that for python I should for some insane reason use spaces instead of tabs. :P
[02:49] <OvenWerks> I am actually surprised there were any spaces
[02:49] <OvenWerks> must have been cut and paste
[02:52] <OvenWerks> teward: I have tried using array based execution in the past and after loosing some hair went to the define comandline, run. Leftovers from bash no doubt and much easier to read from my POV.
[02:52] <OvenWerks> anyway. I will run the patch.
[03:10] <OvenWerks> Ga!, now it doesn't work...
[03:40] <OvenWerks> Ya, 0k...
[03:52] <OvenWerks> teward: same problem... array based execution doesn't work.
[05:02] <OvenWerks> teward: I have put back in the string based command line and uploaded. I have yet to be able to get array based commands to work (I have also tried in the past) and in fact I have had problems using a joined string within the command as well... which is why a define the command line first as a string and use it. That is all that has ever actually worked
[05:03] <OvenWerks> Eickmeyer: ^^
[05:05] <Eickmeyer[m]> teward and sarnold are more worried about the security implications for this. AFAIK, they’re both east-coasters, so they’ll see this in the morning.
[06:05] <OvenWerks> Eickmeyer: maybe they can figure out why the array based execution doesn't work.
 Probably a subproccess headache
 which I run into myself
 sarnold: ^ this is usually why I hate subprocess calls.
 OvenWerks: I can fix that as well - but for some reason there was mixed indentation.  Reverting the array based call is an easy you can do yourself but the main problem was the unsafe calls to cp/rm via subprocess
 because that can easily be exploited with the right few code stabs
 though exploitability on that is LOW it's still a headache
 let me poke at this after I get to work
[13:46] <teward> sarnold: call/run don't seem to accept things properly, so i'm going to go with their initial approach which I think works.
[13:46] <teward> there's some oddness in subprocess with how commands are passed and I REGULARLY have this headache.
[13:52] <teward> OvenWerks: I condensed the 'old way' you were doing into a single line - https://git.launchpad.net/ubuntustudio-menu-add/commit/?id=f395294eb0dc1efd24be846e27974b453c5e80ff
[13:52] <teward> that's the ONLY time i'm pushing to the code
[13:53] <teward> if you and Eickmeyer / Eickmeyer[m] would like to test this that'd be great.
[13:53] <teward> i'll make a note in the bug
[13:53] <teward> if it works with that in line then that should take care of the major issues
[13:53] <teward> and i'll do another last-minute review
[13:54] <studiobot> * teward001 pours some salt on @Eickmeyer just to make sure they're pinged accordingly.
[14:37] <Eickmeyer> teward: Did you commit it to master?
[14:38] <Eickmeyer> Nm, I see that you did.
[14:56] <teward> Eickmeyer: yes?
[14:56] <Eickmeyer> I SAID nevermind. ;) 
[14:56] <teward> :P
[14:56] <teward> *salts Eickmeyer anyways*
[14:57]  * Eickmeyer throws a full coffee mug at teward
[14:57]  * teward already has had 4 coffees, does not need another
[15:04] <OvenWerks> teward: cp/rm was just me not learning python well enough. The subprocess.call string formating is different and so probably works. I have always tried putting the string together with + and that did not work for me.
[15:05] <OvenWerks> I struggled with the subprocess calls for a long time before I came up with the way I finally used
[15:05] <teward> OvenWerks: i actually tested both run AND call
[15:05] <teward> with an 'echo' command
[15:05] <teward> only worked with strings
[15:05] <teward> which means I'll go digging on that later
[15:05] <teward> I COULD HAVE SWORN I got it to work
[15:05] <teward> but i'll have to go poking at my other scripts
[15:06] <teward> OvenWerks: and I have no provlem with the subprocess calls :)
[15:06] <teward> the only difference is
[15:06] <teward> instead of var = somestr; sp.call(var, ...)
[15:06] <teward> just define the string inside the call ;)
[15:06] <teward> that's the only one-line condensing I did :)
 HOLY HANNA I'm spamming myself on AndroIRC xD
[15:07] <OvenWerks> Yes that works just fine.
[15:07] <teward> yep.  And saves some memory space, albeit only a little bit :)
[15:08] <OvenWerks> I also removed some excess comments last night.
[15:09] <OvenWerks> teward: I had never seen that method of creating strings before. Is there a quick link I can use to read up on it?
[15:09] <OvenWerks> (and does it work inside of a print() as well?)
[15:10] <teward> https://realpython.com/python-f-strings/
[15:10] <OvenWerks> does it work on the right side of an =
[15:10] <teward> OvenWerks: yes, it works wherever a string would be defined
[15:10] <teward> it's actually born from "".format
[15:10] <teward> which https://www.geeksforgeeks.org/python-format-function/ is decent at explaining
[15:11] <teward> OvenWerks: but the f"foo {blah}" where blah is a variable format is 'new' enough I don't trust it on < py3.7
[15:11] <OvenWerks> cool, it may make things better in -controls too then. (no there are no cp/rm in there)
[15:11] <teward> it's supported in 3.6 but :)
[15:11] <teward> OvenWerks: indeed, there's a ton of ways to condense
[15:11] <teward> to quote sarnold, I could probably if I put my mind to it make things a lot shorter
[15:11] <teward> but :P
[15:11] <teward> I tend to backwards-compat my code for 16.04's py3.5 so I use "{}".format(var) instead
[15:12] <OvenWerks> teward: I learn by doing.
[15:12] <teward> but i've been falling in LOVE with the in-line strings :)
[15:12] <teward> yep
[15:12] <teward> well that's how you learn :)
[15:12] <teward> I learn by doing as well
[15:12] <teward> but i don't have any RECENT code examples on it :)
[15:12] <teward> keep in mind also i only JUST got coredev so my bootprints are not yet everywhere :p
[15:12] <teward> they're starting to show up though, with this package :P
[15:13] <teward> mmmmm, dark-chocolate covered peanuts... *snacks*
[15:13] <OvenWerks> coffee
[15:13] <teward> had that
[15:13] <teward> 4 cups already :)
[15:13] <teward> but caffeine doesn't negate hunger so
[15:13] <OvenWerks> I just got up and made breakfast for my son.
[15:13] <teward> indeed :)
[15:14] <OvenWerks> my eating will wait till my Yf gets up.
[15:14] <teward> 11:14 here so by now i should probably switch into 'lunch' mode soon enough heh
[15:15] <OvenWerks> Food is food, I still call meat cow and pig rather than beef and pork.
[15:19] <OvenWerks> f-strings "new"? actually it is kinds like the old school (bash, perl) ${var}
[15:21] <Eickmeyer> Holy crap, the build far is either stuck or extremely busy. 17050 jobs in the queue, 23 hour wait. 
[15:21] <Eickmeyer> *farm
 OvenWerks: new for Python ;)
 Eickmeyer: yikes, there was build issues earlier
[15:34] <Eickmeyer> @teward001: cjwatson said they were doing a test rebuild.
 that would explain it
[16:34] <teward> Eickmeyer: if you need me to fast-build I can compile for amd64 for you to test sooner
[16:34] <teward> but you'll of course have to download the .deb and install
[16:35] <Eickmeyer> teward: Yeah, I coul download the .deb now and do it, tbh. It's done building, it just hasn't published to the PPA. Looks like build dispatching is also paused, so publishing is likely not to happen as well.
[16:36] <teward> i'll sbuild it on eoan amd64 local then upload somewhere standby
[16:37] <Eickmeyer> I stand corrected, it just published.
[16:37]  * Eickmeyer is installing the built deb now
[16:38] <teward> heh
[16:38] <teward> well that was a fast build now xD
[16:39] <teward> Eickmeyer: https://people.ubuntu.com/~teward/ubuntustudio-menu-add_0.1_all.deb if the PPA is slow :P
[16:39] <teward> yay for sbuild :)
[16:40] <Eickmeyer> teward: Already have it. Everything works from my tests, but OvenWerks might have some more in-depth testing.
[16:40] <Eickmeyer> OvenWerks: New build in autobuilds, you can probably just apt upgrade.
[16:41] <teward> and if that doesn't work for you I have the built binary in that link above :)
[16:41] <teward> Eickmeyer: I almost totally forgot about 'people.u.c' though as an SFTP upload point xD
[16:41]  * Eickmeyer hasn't used people.u.c, and probably could.
[17:44] <Eickmeyer> OvenWerks: Let us (me & teward) know how testing ubuntustudio-menu-add goes.
[17:44] <studiobot> * teward001 was poked
[17:44] <studiobot> * teward001 goes back to poking redis-server instead
[17:44] <Eickmeyer> hehe
[17:45]  * teward drops a crate of onions on Eickmeyer
[17:45] <teward> oops :)
[17:45] <Eickmeyer> MMmmm... walla walla sweets...
[17:47]  * Eickmeyer starts grilling the onions for burgers
[17:47]  * sarnold spills some kosher salt and slices off a big piece of onion
[17:48] <Eickmeyer> ^this guy onions.
[17:49] <teward> i'm sorry you assume that sarnold is NOT ALREADY an onion :p
[17:49] <teward> *shot*
[17:50] <OvenWerks> Eickmeyer: it may be a fewhours before I can play with it. The machine I am on is still 16.04... (son's laptop)
[17:50] <Eickmeyer> OvenWerks: No worries. teward^
[17:51]  * Eickmeyer wanders off to play a game with his son
[17:54] <teward> ack
[18:17] <teward> OvenWerks: i miiight have a way to make the 'subprocess.run' with an array work
[18:17] <teward> but we need to drop shell=True possibly
[18:17] <teward> (to sate sarnold's concerns)
[18:24] <teward> OvenWerks: Eickmeyer: specifically, http://people.ubuntu.com/~teward/array-based_subprocess_execution_of_exo-desktop-item-edit.patch
[18:24] <teward> which i THINK works proper
[18:24] <teward> but again, needs the tests :)
[18:24] <teward> no rush
[18:27] <teward> Eickmeyer: OvenWerks: http://people.ubuntu.com/~teward/ubuntustudio-menu-add_0.1_all_v2.deb <-- with that last patch
[18:27] <teward> in case you want to test :)
[18:28] <teward> (since the builders are slow)
[18:28] <OvenWerks> teward: I think the terminal was there because it uses the binary name without the path.
[18:28] <teward> possibly, but I don't think hwe have a choice so longa s the binary is in PATH
[18:28] <OvenWerks> again one of those things I tried more than one way
[18:28] <teward> OvenWerks: we could also hardcode the full path
[18:29] <teward> which is probably the even safer approach
[18:29] <teward> i don't know the full path though for that binary
[18:29] <OvenWerks> I don't suppose it is likely to move from one cycle to the next ;)
[18:29] <teward> yeah, in which case hardcode it
[18:29] <teward> i know that hardcoding things like that *tends* to be a bad thing
[18:29] <teward> but we can always patch code later if things cahnge :P
[18:29] <OvenWerks> $ which exo-desktop-item-edit 
[18:30] <OvenWerks> /usr/bin/exo-desktop-item-edit
[18:30] <teward> change*
[18:31] <teward> patch updated i'll update that .deb :p
[18:31] <OvenWerks> using the full path is always considered more secure
 yes, it is
[18:32] <OvenWerks> pk won't allow anything else
 http://people.ubuntu.com/~teward/ubuntustudio-menu-add_0.1_all_v3.deb is the 3rd deb version then including the fullpath this time
 again, in case you all want to supersede the speed of the builders ;)
[18:34] <OvenWerks> teward: I won't be able to test for a few hours (prolly 1430 local (-0700))
[18:34] <teward> that's fine
[18:34] <teward> as i said no rush
[18:34] <teward> but the builders are stressed right now
[18:34] <teward> so :P
[18:35] <OvenWerks> Spending time with my Yf before she goes to work.
[18:35] <teward> no problem :)