/srv/irclogs.ubuntu.com/2023/03/09/#kubuntu-devel.txt

arraybolt3ahoneybun[m]: Heh, I think I figured it out. I just have to replace "okular" with "xdg-open" and that should do it.00:14
arraybolt3Then I can make a very loose depends on any PDF viewer or web browser, and it *should* (hopefully) do the trick.00:15
arraybolt3Yeah that will work quite well.00:16
arraybolt322.04.2~ppa2 incoming...00:16
arraybolt3Package builds right, so this should be easy.00:17
arraybolt3ahoneybun[m]: Should be available from the same PPA shortly. This version doesn't have a hard Okular depends.00:18
arraybolt3Tar, forgot to remove an explanatory comment from the control file that isn't needed. Oh well, we'll remember that later.00:19
ahoneybun[m]\o/ thank you so much, RikMills what would it take to get it into the ISO?13:16
ahoneybun[m]A official Ubuntu package?13:17
BluesKajHi all13:50
ahoneybun[m]Heyo BluesKaj 14:17
BluesKajhey ahoneybun[m] , how's it going?14:17
ahoneybun[m]Not bad arraybolt3 made some magic with packaging the kubuntu-manual which made me very happy yesterday.14:18
BluesKajcool14:19
ahoneybun[m]arraybolt3: I copied it to my own PPA, how do I make changes? It's been a few years for me lol.14:22
BluesKajI would think if the ppa is in the sources path then updating/upgrading with apt should work14:26
ahoneybun[m]No I want to make changes to the source.14:30
BluesKajoh?14:31
BluesKajwhy?14:34
ahoneybun[m]For changes that I make, I write the manual pretty much14:46
BluesKajok14:51
arraybolt3ahoneybun[m]: Just replace the "kubuntu-manual.pdf" file in the source with an updated one.17:14
arraybolt3Then you can run "sbuild -d jammy-amd64-shm17:14
arraybolt3(if you have sbuild set up) and it will build a new package.17:14
arraybolt3If you don't have sbuild set up, you can use this: https://wiki.ubuntu.com/SimpleSbuild17:15
arraybolt3And if that looks like a job for another day, you can instead bump the "~ppa" part of the version number to a newer version in the changelog, then use a command like "debuild -S -d -kYOUR_KEY_ID_HERE" followed by "dput ppa:ahoneybun/kubuntu-manual ../<source.changes>" to upload to a PPA and make LP do all the hard work.17:17
arraybolt3(So if the version number in debian/changelog is at "~ppa3", you'd bump it to "~ppa4" before using debuild and dput.)17:17
ahoneybun[m]I meant more about downloading the source to do that.17:24
RikMillsdget link-to-the-.dsc-file17:28
RikMillsdget https://launchpad.net/~aaronhoneycutt/+archive/ubuntu/kubuntu-manual/+sourcefiles/kubuntu-manual/22.04.2~ppa2/kubuntu-manual_22.04.2~ppa2.dsc17:30
RikMillsor download the .xz and .dsc from the ppa and then do dpkg-source -x kubuntu-manual_22.04.2~ppa2.dsc17:33
mmikowskiarraybolt3 thank you for the package! +cc ahoneybun[m]. 19:56
mmikowskiAlso, picked up a few tricks on quick builds from the discussion (+ RikMills).19:57
ahoneybun[m]Indeed!19:57
arraybolt3Glad I was able to help!19:58
arraybolt3I'm happy to continue to help with it by the way.19:58
mmikowskiarraybolt3, I vote to make Okular a recommends. I think a hard depends is too much for a PDF :)19:59
mmikowskiTo think about it another way, it's maybe like having a package for a png and requiring GIMP.19:59
mmikowskiI'm not going to lose any sleep over it, but that's my original thought. Of course, I could just send you a PR and we'd be set :)20:00
arraybolt3mmikowski: That's a good idea.20:00
arraybolt3I could make all of the PDF options a Recommends.20:00
mmikowskiYeah, I haven't looked into the package to be fair. So $.02 and all that.  kk, going to lunch, bbiab20:01
arraybolt3The reason for depending on a PDF reader is because there's a button in the application menu that will do *nothing* if there's no PDF reader installed. (I'm using xdg-open under the hood, so any PDF reader should do.)20:01
arraybolt3So that might factor in somehow.20:01
arraybolt3But a Recommends should still be sufficient.20:01
arraybolt3Users who just want the manual will get it, users who want *just* the manual can get it too if they know what they're doing.20:02
mmikowskiarraybolt3: Ah, see, I hadn't looked at the source, so that's my bad.20:21
mmikowskiSo a fix: we could write a wrapper that tries to run okular or a default pdf viewer, and sends a message if not found.20:21
mmikowskiOr just hard depends on Okular :)20:22
mmikowskiIf that's what you're launching.20:22
arraybolt3mmikowski: ALready have that in place :) It's xdg-open.20:24
mmikowskiRight20:24
mmikowskiAwesome.20:24
arraybolt3So any PDF viewer will work.20:24
arraybolt3I just have to depend on any *one* of them.20:25
arraybolt3The current iteration depends on Okular or Evince or Firefox or Chromium.20:25
mmikowskiI was just looking above and seeing that you've already had much of this discussion.20:25
mmikowskiSo check it out: xdg-open file.pdf || kdialog --msgbox 'no pdf viewer found. Please install one to proceed' ...20:27
mmikowskiSorry, check it out is kinda annoying :P20:27
mmikowskiI meant, is that an option?20:28
arraybolt3Yeah, but then there's a depends on kdialog too :-/20:28
mmikowskiNot sure if it's even necessary.20:28
mmikowskiHmmf.20:28
arraybolt3Maybe we just need a lot fo fallbacks.20:28
arraybolt3*of20:28
mmikowskigot me there.20:28
arraybolt3xdg-open || kdialog || echo, perhaps.20:28
mmikowskiarg.20:29
arraybolt3(Maybe add in GNOME's equivalent of a dialog box thingamajig, I dunno.)20:29
arraybolt3I think just the Recommends is enough.20:29
arraybolt3Any user who does "sudo apt install kubuntu-manual" will get a PDF viewer if they don;t have one already.20:29
arraybolt3And if they don't want it, --no-instal-recommends will do that.20:29
mmikowskiYeah, but then on reinstall ...20:30
arraybolt3Reinstall?20:30
mmikowskioh well, too far down that rabbit hole.20:30
arraybolt3It's good to go down rabbit holes like this in packaging, that's how we avoid broken packages :)20:30
arraybolt3I'm just not sure what would go wrong in a reinstall.20:30
arraybolt3If it's a reinstall of the package, apt can control that. If it's a reinstall of Kubuntu with the manual included, it has Okular shipped by default anyway, no big deal.20:31
mmikowskiWell, I was thinking that on reinstall it would not pull in okular, but I think xdg-open is the write abstraction.20:31
arraybolt3Well Okular is the primary dependency in the list of "depend on this OR this OR this" that I have.20:32
mmikowski* right20:32
arraybolt3So it *should* spring for Okular first, but tolerate Evince, Firefox, etc.20:32
mmikowskiYeah, so I think as a dependency with a bunch of options sounds like the right call.20:32
arraybolt3Assuming apt acts in a way that looks sane to me, which it sometimes doesn't :P20:32
mmikowskiI'm just thinking having a situation where a noob can get a non-functioning button is a bad experience.20:32
mmikowskiRecommends does not guarantee that.20:33
arraybolt3Valid, though a noob usually won't use --no-install-recommends, will they?20:33
mmikowskiBecause reinstalls (IIRC) can ignore the recommends.20:33
arraybolt3Oh.20:33
arraybolt3Hmm...20:33
arraybolt3you mean like "sudo apt reinstall"?20:33
mmikowskiDon't take my word on it.20:33
mmikowskiRight.20:33
arraybolt3Funny thing, I have *never* found a situation where "sudo apt reinstall" did anything useful :P20:33
mmikowskiThis use case is definite though:20:34
arraybolt3Every time I've tried it, I ended up having to use something more like "sudo apt purge && sudo apt install" instead. I'm not even sure what "reinstall" is there fore.20:34
mmikowskiAdd the package. purge okular. Boom, broken.20:34
arraybolt3*for20:34
arraybolt3mmikowski: Well, that's true.20:34
mmikowskiSo hard depends on list of pdf readers sounds like the right thing to do.20:34
mmikowskiThen abstract behind xdg-open.20:35
arraybolt3But if you're removing packages that are part of kubuntu-desktop, you can expect things to go awry.20:35
mmikowskiIMO.20:35
mmikowskiRight.20:35
arraybolt3Removing okular will remove kubuntu-desktop.20:35
arraybolt3And that should be a good enough hint that you've entered the land of dragons.20:35
mmikowskiAh, so another good vote for hard depends.20:35
arraybolt3Hmm. I see your point.20:35
mmikowskiThe one trap we can get into is saying "well if the user isn't smart enough...".20:36
arraybolt3Then again, they'd have to purge Okular *and* Firefox to break this.20:36
arraybolt3I think.20:36
arraybolt3I should test.20:36
mmikowskiThat's a UX-talk version of handwaving.20:36
mmikowskiSo I think you idea of a hard depends on working pdf readers used by xdg-open is a great ide.20:36
mmikowski*idea. 20:36
mmikowskiThen if they see the button, it will almost certainly always work.20:37
arraybolt3Yeah, and come to think of it, if someone wants the manual without a PDF reader, it's on GitHub, they can get it that way.20:37
arraybolt3The package is purely for convenience for non-advanced users.20:37
mmikowskiThe other option is NOT to open the document for them, but just link it for them on the desktop.20:37
arraybolt3So baking in hard depends to make sure non-advanced users are able to use it is reasonable here.20:37
mmikowskiThen when they click on it in default config, the document always opens.20:37
mmikowskiAnd the system handles hints for the pdf.20:38
arraybolt3If a user insists on removing all their PDF viewers and browsers (?!), yes it will remove the manual with a hard depends, but at that point they either have broken their system entirely or they know exactly what they are doing and can get the manual off GitHub. So I'm on board with hard depends.20:38
mmikowskiok20:38
arraybolt3+1, thanks for discussing it with me so we could figure out how to do it right!20:38
mmikowskiSounds good to me. Funny how I changed my mind too.20:38
mmikowskihaha, kk mate, of to lunch for a bit.20:39
mmikowskittys!20:39
arraybolt3o/ ttys!20:39
mmikowskiarraybolt3: Do can you share the git repo for the packaging of the manual?22:21
mmikowskiI should like to look over the packaging and mechanisms. If you don't have it, that's ok too - i could probably extract and host it if you like.22:21
arraybolt3mmikowski: I actually haven't put it in Git yet :P23:00
arraybolt3I'll do that real quick.23:00
arraybolt3Lemme make sure the dir is right before initializing the repo, I'll have a GitHub link shortly.23:00
arraybolt3mmikowski: https://github.com/ArrayBolt3/kubuntu-manual23:07

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