IRC log for #devuan on 20190531

00:15.22Digitis there a way to get "apt search" output only 1 line per result?  or a way to get "apt-cache search" to show version numbers (still 1 line per result)?
00:15.38Digiti mean, without elaborate awking/sedditing/etc
00:17.45gnarfacejust pipe the output to less
00:17.51gnarfaceapt-cache search . |less
00:18.32gnarfacethen you can use the basic keyboard navigation at least
00:18.51Digituhh, nope.  doesnt do what i'm looking for at all.  worsens.
00:19.14gnarfacei know it doesn't do what you asked for, but it was the closest you're gonna get without learning anything
00:19.41gnarfacefyi "apt-cache search" does support some regexp syntax though, more than just basic wildcards
00:20.05Digite.g. search result would show "packagename packageversion"
00:20.21gnarfaceyou want "apt-cache show [package name]"
00:20.28gnarfacethe version will be in the output
00:21.05Digiti'll probably just end up sedditing my way to 1 line output.
00:21.20gnarfacecombining search and show in the way you suggest, would as far as i know require "elaborate awking/sedditing/etc"
00:21.44gnarfacemaybe try aptitude?  some people like it more
00:22.14gnarfaceit might include versions in the output, i'm not sure
00:22.39Digityeah, gnarface that's again far from what i want.  XD  your suggestions are adding lines, not removing them.  seems a simple requirement i would have thought would be more popularly sought.  search output with just "packagename packageversion"
00:22.57gnarfaceoh you can search with the package version
00:23.07gnarfaceit just isn't shown in the output of search
00:23.17Digitneeded for inclusion in scripts.  idk aptitude well... it's all tui, no?
00:23.22gnarfacebut the search regexp itself does actually search against the whole output of all the package headers and such too
00:23.42gnarfaceso you can definitely search by package and version if you know the package header format and regexp
00:24.29gnarfacefor most packages, typically they don't store more than one version in the repos for an extended period of time though, so there's a limit to the usefulness of that
00:29.21gnarface"dpkg -l" will list versions of packages too, but only if they're already installed
00:29.42Digitnods
00:30.54gnarfacehmmm.  ack, i may be wrong that the Version tag is even searched by apt-cache search....
00:32.06Jjp137Digit, try: dpkg-query --show package
00:32.27Jjp137you can use --showformat to control the output; refer to the man page, as always :)
00:32.51gnarfaceas for aptitude, i don't know if there's a way to call it non-interactively.  i just assumed there would be but it would not be the default.
00:34.18Digithrm.  dpkg-query --show teeworlds (the package i'm testing on) gives: dpkg-query: no packages found matching teeworlds.   that another case of only installed packages?
00:34.55gnarfacei don't actually know for sure but i assume so
00:35.01gnarfacedpkg is typically for direct package manipulation
00:35.14gnarfaceapt* is what adds repository support
00:35.28Digitcoulda also been complications from the complexity of my system.
00:35.49Jjp137oh nah I didn't consider that part, oops
00:37.28gnarfacei'm guessing there will have to be two calls here, one to "apt-cache search" to get a list of package names, and another to "apt-cache show", "apt-cache showpkg", or "apt-cache showsrc"
00:37.45gnarface(to grep for versions)
00:38.55gnarfacemore fields than just the package name are searched by "apt-cache search" but "Version: " doesn't appear to be one of them.  i'm having trouble isolating exactly which by testing
00:40.44gnarfacemaybe "Provides: " is searched
00:40.51gnarfacein addition to package name and description
00:41.18gnarfaceat some point i must have caught a version number in there and thought "Version: " was included, sorry
00:42.06gnarfacei'm not even sure Description is searched actually now with amprolla
00:42.20gnarfacei recall someone complaining about that before and now i'm seeing it
00:42.30Jjp137the short description (the one-liner) would be
00:42.45Jjp137the long description...uh yea it disappears if the package came from Debian
00:43.16Digitelaborated: apt-cache show bc | cut -d" " -f2 | head -n 2 | paste -d " " - -
00:43.18Digit:D
00:43.56Digittho, that still needs work for more elaborate multi result output.
00:44.41gnarfaceapt-cache show bc|grep ^Version
00:44.42gnarface?
00:45.24gnarface(grep has similar regexp syntax to apt-cache search)
00:45.27Digitmm, yeah, i should grep wiser
00:46.16gnarfacei think you can trust the field names to all be labeled like "Fieldname: "
00:46.25gnarfacei don't know if you can trust them to always be in the same order
00:46.40gnarfaceor even to all be present every time
00:47.24gnarfacebut they should always start on their own line
00:47.36gnarfaceso you should be able to grep for "^Fieldname: "
00:53.27*** join/#devuan xcm (~xcm@ipa210.225.tellas.gr)
00:55.14XenguyDigit: Reading quickly, but this sounds like a grep exercise, and I'm still not clear on what your actual requirement is, besides '1 line', of 'something'
00:56.04XenguyOh, gnarface has it sorted, so ignore my comment
00:56.46Digitpackage search output of "packagename package version".  yeah.  well, had hoped i could skip the text manipulation exersize i'm going through.  now i'm going through it, it doesnt hurt so much.  n_n
00:57.05*** join/#devuan Ryushin (chris@2001:470:4b:38f:777::8642)
00:58.28Xenguyapt-cache show grep |grep version
00:58.41Xenguy= )
00:59.30Digits/package version/packageversion/   meh, whatever.  u get what i mean.  like "bc 1.06.95-9+b3" or "teeworlds 0.6.5+dfsg-1~deb9u1", but want it (and am working on) getting it so it works for multiple results n partial package names in the search.
00:59.46XenguyShould be:  apt-cache show grep |grep -i version
01:00.04DigitXenguy: that doesnt have the package name.  we're past that.
01:00.16Xenguypicky picky
01:00.20Digithehe
01:00.29Xenguy; -)
01:01.29Digitapt-cache show bc | cut -d" " -f2 | head -n 2 | paste -d " "  - -   ...&...  apt-cache show teeworlds | egrep '^Version|^Package' | paste -d " "  - - |  sed 's/Package: //g' | sed 's/Version: //g'   ... are two early versions inadequate for multiple results.  gonna make one from "apt search" output that should do the job.   ... might take a break first.
01:01.43Xenguyweeeeeeee, pipe city!
01:01.46Digitn_n
01:02.03XenguyTime to play some golf
01:02.23XenguyBut whatever works, right?
01:06.04Digitor from "apt-cache search -f" output
01:06.17Jjp137do note that apt, as opposed to related commands like apt-get or apt-cache, is more of an end-user tool and can change behavior between versions (see the bottom of apt(8) for details)
01:06.29Jjp137so I would just use apt-cache for this probably
01:06.56Digityep yep yep.  *nods*  :)
01:07.30XenguyJjp137: I've been trying apt out here and there, and it seems to work quite nicely...
01:07.47Jjp137yea for interactive use it's fine
01:07.56XenguyI also read that it is more or less compatible/interchangeable with apt-get, so that is a bonus IMHO
01:08.01Jjp137but for scripts, prefer apt-get, apt-cache, etc.
01:08.05XenguyJjp137: Yeah, they say don't script it
01:08.09XenguyExactly
01:09.45Digitooh!  my prior version, all i need to do to make it work is s/apt-cache show/apt-cache search -f/.  :D  pleasant.
01:10.40XenguyGolf!
01:10.42XenguyWell done
01:12.10Digitn_n  thnx for putting up with me.  thnx for the suggestions n help, all.  :)
01:12.23XenguyI'm tempted to engage the exercise myself, but, on 2nd thought, nah ; -)
01:12.30XenguyGlad to have you here
01:16.50Digitwell, in my script, apt-cache search -f "$argv" | egrep '^Version|^Package' | paste -d " "  - - |  sed 's/Package: //g' | sed 's/Version: //g' is not as simple&pretty as just apt-cache search "$argv", but it's nice to get consistent output with name and version, without bloating output to multi-line per package.  :)   nnnnnice.  :)
01:17.34Digit(that $argv's fish, change to whatever that is for your bash, i forget... $1 or something?)
01:18.18Xenguycheats: apt-cache show grep |grep Package && apt-cache show grep |grep Version
01:20.02Digittries that with teeworlds package, and tries it with s/show/search -f/, sticks to what he has
01:24.25Xenguy$ apt-cache show teeworlds |grep Package && apt-cache show grep |grep Version
01:24.26XenguyPackage: teeworlds
01:24.42Xenguy^^ Scratch that
01:24.50Xenguy$ apt-cache show teeworlds |grep Package && apt-cache show grep |grep Version
01:24.50XenguyPackage: teeworlds
01:24.50XenguyVersion: 2.27-2
01:25.20XenguyThen I'd just use a text editor macro to massage the output
01:25.32XenguyBut that's a quick and dirty approach
01:25.55XenguyIf you've got a better solution, then go for it of course
01:31.02Digityeah, already pasted it in here a couple times.  ;D
01:34.22XenguyWell that's what I meant of course
01:34.49Xenguy"There's more than one way to skin a..."  Er, n/m
01:35.09Digitmore than one way to egrep ;D
01:39.16XenguyAs the Perl Mongers used to say (and perhaps still do): TMTOWTDI (There's More Than One Way To Do It!)
01:39.50Xenguy(And with Perl, that was most certainly true)
01:45.19*** join/#devuan fleeky (~fleeky@75-101-60-65.dsl.static.fusionbroadband.com)
01:51.03Xenguy(tim-toady)
02:09.48*** join/#devuan tallship (~tallship@2600:1010:b125:b543:ad8d:b03d:a5b5:f0c1)
02:14.33*** join/#devuan gnarface (~gnarface@108-227-52-42.lightspeed.irvnca.sbcglobal.net)
02:14.48*** join/#devuan fsmithred (~fsmithred@devuan/developer/fsmithred)
02:14.51*** join/#devuan kassle (~kassle@london.serv.krybrig.org)
02:17.41*** join/#devuan nighty (~nighty@b157153.ppp.asahi-net.or.jp)
02:19.38*** join/#devuan tierce_ (~raoulzeca@ip-83-134-33-142.dsl.scarlet.be)
02:20.55*** join/#devuan va7lnx (~donovan@69.172.174.181)
02:21.16*** join/#devuan debdog (~debdog@2a00:79c0:621:6800:7a24:afff:fe8a:d04d)
03:00.15*** join/#devuan va7lnx (~donovan@69.172.174.181)
03:04.20*** join/#devuan va7lnx (~donovan@69.172.174.181)
03:34.36*** join/#devuan rdav__ (~rd@245.184-26-211.sta.nsw.iprimus.net.au)
04:15.36*** join/#devuan puria (~puria@static.112.14.99.88.clients.your-server.de)
04:18.03*** join/#devuan Kizano (markizano@2600:3c00::f03c:91ff:fec8:382d)
04:53.38*** join/#devuan LtWorf_ (~LtWorf@h-191-254.A890.priv.bahnhof.se)
05:00.39*** join/#devuan LtWorf (~LtWorf@mail.cryptzone.com)
05:04.10*** join/#devuan fsmithred (~fsmithred@devuan/developer/fsmithred)
05:54.09*** join/#devuan puria (~puria@static.112.14.99.88.clients.your-server.de)
06:15.44*** join/#devuan targz (~Thunderbi@unaffiliated/targz)
06:28.54*** join/#devuan Pali (~pali@Maemo/community/contributor/Pali)
06:32.13*** join/#devuan engidea (~damiano@ip-46-141-11-154.rev.wolnext.com)
06:34.46*** join/#devuan Marko122 (2e87690d@gateway/web/cgi-irc/kiwiirc.com/ip.46.135.105.13)
06:42.46*** join/#devuan LtWorf_ (~LtWorf@2001:9b1:4041:e000:a634:d9ff:fec6:343c)
07:14.08*** join/#devuan puria (~puria@static.112.14.99.88.clients.your-server.de)
07:16.16*** join/#devuan Madda (~Madda@net-31-27-55-17.cust.vodafonedsl.it)
07:38.38*** join/#devuan Venker (~unknown@wbifi08.bifi.unizar.es)
07:38.43Venkerhi people
07:39.16*** join/#devuan rsx (~rsx@ppp-188-174-152-78.dynamic.mnet-online.de)
07:39.44gnarfaceyo
07:45.48*** join/#devuan puria (~puria@static.112.14.99.88.clients.your-server.de)
08:08.33*** join/#devuan poeinklum (~quassel@5.29.148.254)
08:40.25*** join/#devuan puria (~puria@static.112.14.99.88.clients.your-server.de)
09:07.36*** join/#devuan xcm (~xcm@ipa210.225.tellas.gr)
09:09.08*** join/#devuan engidea (~damiano@ip-46-141-11-154.rev.wolnext.com)
09:20.09*** join/#devuan sardonico (~ale@94.247.40.146)
09:37.20*** join/#devuan xcm (~xcm@ipa210.225.tellas.gr)
09:45.30*** join/#devuan puria (~puria@static.112.14.99.88.clients.your-server.de)
09:50.34*** join/#devuan unixman_home_ (~unixman2@unaffiliated/eracc)
09:53.00*** join/#devuan xcm (~xcm@ipa210.225.tellas.gr)
10:14.29*** join/#devuan puria (~puria@static.112.14.99.88.clients.your-server.de)
10:34.33*** join/#devuan proteusguy (~proteusgu@cm-58-10-155-156.revip7.asianet.co.th)
10:36.12*** join/#devuan tierce_ (~raoulzeca@2a02:a03f:440a:2000:247d:38fd:58f1:c9f0)
11:04.19*** join/#devuan rdav__ (~rd@61.181.148.122.sta.dodo.net.au)
11:12.39*** join/#devuan tallship_ (~tallship@2600:1010:b10c:5b38:a56a:ee44:8c65:fcdd)
11:15.32*** join/#devuan tallship_ (~tallship@2600:1010:b10c:5b38:a56a:ee44:8c65:fcdd)
11:21.27*** join/#devuan cocoadaemon (~foo@x53.octopuce.fr)
11:42.45*** join/#devuan fsmithred (~fsmithred@devuan/developer/fsmithred)
12:08.24*** join/#devuan Centurion_Dan (~Thunderbi@devuan/developer/centuriondan)
12:11.00*** join/#devuan fsmithred (~fsmithred@devuan/developer/fsmithred)
12:19.17*** join/#devuan tradar (~tradar@gateway/tor-sasl/tradar)
12:23.27*** join/#devuan Centurion_Dan (~Thunderbi@devuan/developer/centuriondan)
12:23.31*** join/#devuan TigerbotHesh_ (~tbhesh@bishibosh.stronk.com.au)
12:23.40*** join/#devuan rann_ (sid175221@gateway/web/irccloud.com/x-nfiqygeuazsyytdl)
12:23.54*** join/#devuan timeless_ (sid4015@firefox/developer/timeless)
12:24.55*** join/#devuan Kohlrabi_ (~kohlrabi@kohlio.de)
12:25.30*** join/#devuan Syllin (~Syllin@li890-17.members.linode.com)
12:25.36*** join/#devuan petris (~quassel@li-docker.host.petris.net)
12:25.39*** join/#devuan erhandsome (~erhandsom@fsf/member/erhandsome)
12:26.45*** join/#devuan thomascovenant (thomascove@2a01:7e00::f03c:91ff:fe2b:2634)
12:26.45*** join/#devuan thomascovenant (thomascove@fsfe/thomascovenant)
12:27.01*** join/#devuan zeden (~user@unaffiliated/zeden)
12:27.01*** join/#devuan ffernand (ffernand@devworker.com)
12:27.12*** join/#devuan trfl (~ed@static.59.110.40.188.clients.your-server.de)
12:27.14*** join/#devuan jxyzn (quassel@2600:3c01::f03c:91ff:fe73:445a)
12:27.27*** join/#devuan Xenguy (~Xenguy@devuan/community/Xenguy)
12:27.41*** join/#devuan unixman_home (~unixman2@87-225-137-216.mtaonline.net)
12:27.41*** join/#devuan unixman_home (~unixman2@unaffiliated/eracc)
12:28.02*** join/#devuan jobregon[m] (jobregonma@gateway/shell/matrix.org/x-eqgfqoffirosxyxc)
12:28.49*** join/#devuan sirix (Elite16648@gateway/shell/elitebnc/x-tucdtgpwstxlithn)
12:38.08*** join/#devuan Pali (~pali@Maemo/community/contributor/Pali)
12:38.57*** join/#devuan g4570n (~g4570n@unaffiliated/g4570n)
12:52.26*** join/#devuan Oldmoss (~oldmoss@46.19.140.18)
13:01.30*** join/#devuan puria (~puria@static.112.14.99.88.clients.your-server.de)
13:13.03*** join/#devuan amarsh04 (~amarsh04@124-171-187-9.dyn.iinet.net.au)
13:24.56*** join/#devuan zeden (~user@unaffiliated/zeden)
13:34.05*** join/#devuan EHeM (~ehem@mailhost.m5p.com)
13:45.42*** join/#devuan engidea (~damiano@ip-46-141-11-154.rev.wolnext.com)
13:46.20*** join/#devuan tallship (~tallship@77.sub-174-222-4.myvzw.com)
14:22.41HundHey
14:22.42*** join/#devuan tallship (~tallship@2600:1010:b10c:5b38:a56a:ee44:8c65:fcdd)
14:26.11*** join/#devuan freemangordon (~ivo@46.249.74.23)
14:33.20*** join/#devuan engidea (~damiano@ip-46-141-11-154.rev.wolnext.com)
14:57.05*** join/#devuan jelly-home (jelly@pdpc/supporter/active/jelly)
15:11.31*** join/#devuan engidea (~damiano@ip-46-141-11-154.rev.wolnext.com)
15:13.34*** join/#devuan jelly (jelly@pdpc/supporter/active/jelly)
15:22.47*** join/#devuan knidos (~knidos@85.97.169.201)
15:46.48*** join/#devuan Uberius (~Uberius@gateway/tor-sasl/uberius)
15:47.46*** join/#devuan demo (~demo@104.221.71.112)
15:55.35*** join/#devuan jathan (~jathan@200.76.195.248)
15:57.52*** join/#devuan Mithrandir__ (~Mithrandi@212.117.188.4)
16:00.15*** join/#devuan demo (~demo@104.221.71.112)
16:39.07*** join/#devuan fsmithred (~fsmithred@devuan/developer/fsmithred)
16:53.07*** join/#devuan Acacia (~Acacia@unaffiliated/acacia)
17:02.43*** join/#devuan obeardly (~obeardly@2603:3011:1661:0:9657:a5ff:feae:1552)
17:06.51*** join/#devuan Ltem (~ltem@h081217191110.dyn.cm.kabsi.at)
17:13.34*** join/#devuan va7lnx (~donovan@69.172.174.181)
17:43.29*** join/#devuan tallship (~tallship@2600:1010:b10c:5b38:a56a:ee44:8c65:fcdd)
17:54.47*** join/#devuan Mithrandir__ (~Mithrandi@212.117.188.4)
18:17.42*** join/#devuan kelsoo1 (~kelsoo@dragora/developer/kelsoo)
18:44.53*** join/#devuan zeden (~user@unaffiliated/zeden)
19:08.03*** join/#devuan shibboleth (~shibbolet@gateway/tor-sasl/shibboleth)
19:14.34*** join/#devuan markizano (markizano@2600:3c00::f03c:91ff:fec8:382d)
19:16.13*** join/#devuan cd (~none@gateway/tor-sasl/cd)
19:20.52*** join/#devuan Besnik_b (~Besnik@athedsl-99508.home.otenet.gr)
19:36.29*** join/#devuan engidea (~damiano@ip-46-141-11-154.rev.wolnext.com)
20:19.19*** join/#devuan sicelo (~sicelo@Maemo/community/ex-council/sicelo)
20:39.30*** join/#devuan va7lnx (~donovan@69.172.174.181)
20:44.53*** join/#devuan plasma41 (~plasma41@72.34.178.54)
20:46.13*** join/#devuan Ltem (~ltem@h081217191110.dyn.cm.kabsi.at)
20:53.22*** join/#devuan jathan (~jathan@200.76.195.248)
21:00.44*** join/#devuan fsmithred (~fsmithred@devuan/developer/fsmithred)
21:45.34*** join/#devuan obovo (~obovo@50.38.43.128)
21:48.41*** join/#devuan obovo (~obovo@50.38.43.128)
21:50.08*** join/#devuan kimotori (~kimotori@148.251.3.246)
22:05.17*** join/#devuan va7lnx (~donovan@69.172.174.181)
22:05.39*** join/#devuan obovo (~obovo@50.38.43.128)
22:40.29*** join/#devuan targz (~Thunderbi@unaffiliated/targz)
22:46.00*** join/#devuan bpmedley (~bpm@2600:1700:eb20:6050:1ddd:1994:8a2a:64ba)
23:30.57*** join/#devuan xcm (~xcm@ipa210.225.tellas.gr)
23:52.23*** join/#devuan rdav__ (~rd@245.184-26-211.sta.nsw.iprimus.net.au)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.