Difference between revisions of "Help talk:Style/Package installation"

From ArchWiki
Jump to: navigation, search
(url-encoding package names: Eliminated second parameters by using {{urlencode}})
(url-encoding package names: rm closed discussion)
Line 51: Line 51:
::Kk, discarded. -- [[User:Kynikos|Kynikos]] 17:16, 22 September 2011 (EDT)
::Kk, discarded. -- [[User:Kynikos|Kynikos]] 17:16, 22 September 2011 (EDT)
-- [[User:Kynikos|Kynikos]] 15:17, 21 September 2011 (EDT)
-- [[User:Kynikos|Kynikos]] 15:17, 21 September 2011 (EDT)
==<s>url-encoding package names</s>==
[https://wiki.archlinux.org/index.php?title=DVD_Burning&diff=165627&oldid=165626  Some packages] have e.g. {{ic|+}} in their names:
{{bc|[karol@black ~]$ pacman -Sql &#124; grep "+"
and our templates don't url-encode them. Is it OK to use direct links in these cases? -- [[User:Karol|Karol]] 14:27, 20 October 2011 (EDT)
:''[moved from [[Help talk:Style/Migration to new Code formatting templates]] -- [[User:Kynikos|Kynikos]] 15:57, 20 October 2011 (EDT)]''
::What about editing [[Template:Pkg]] and [[Template:AUR]] to accept a 2nd optional argument that would allow to use both the original and the encoded string? The new code would be something like:
::{{bc|<nowiki><includeonly><span style="font-family: monospace">[https://www.archlinux.org/packages/?name={{{2|{{{1}}}}}} {{{1}}}]</span></includeonly></nowiki>}}
::and would be used with {{ic|<nowiki>{{Pkg|crypto++|crypto%2B%2B}}</nowiki>}}.
::Of course we should write guidelines on replacing {{ic|+}} and other possible offending characters.
::-- [[User:Kynikos|Kynikos]] 15:59, 20 October 2011 (EDT)
:::Could this also be used to display a more user-friendly name e.g. ''Install <nowiki>{{AUR|request tracker|rt}}</nowiki>''? -- [[User:Karol|Karol]] 21:11, 20 October 2011 (EDT)
::::In theory yes, with a third argument, but the current guide already provides two examples of wording where you can use the real name of the software (''You can install MyApplication with the package {{Pkg|my-appplication}}, available in the [[Official Repositories]]'' and the other), and the most important thing to be displayed with this template is indeed the name of the package to install.
::::However I guess you like the 2nd argument way, I'm going to implement that.
::::-- [[User:Kynikos|Kynikos]] 08:22, 21 October 2011 (EDT)
::::And this one is solved too, both for [[Template:Pkg]] and [[Template:AUR]]: {{pkg|crypto++|crypto%2B%2B}} {{aur|atari++|atari%2B%2B}}. Feedback is welcome before closing. -- [[User:Kynikos|Kynikos]] 08:41, 21 October 2011 (EDT)
:::::I send you Positive Feedback = do more stuff like this :-) -- [[User:Karol|Karol]] 10:13, 21 October 2011 (EDT)
:::::BTW, sorry for not commenting on your great work more, but wrt to feedback I'm a bit like a good ol' unix tool that keeps quiet unless it spots an error. -- [[User:Karol|Karol]] 10:20, 21 October 2011 (EDT)
::::::Thanks Karol ^^ I know I tend to request feedback more or less shamelessly, but sometimes I just want to make sure I'm doing the right thing: I can't always assume there's somebody checking my edits, although I know you are practically everywhere ;)
::::::Anyway, this one is closed. -- [[User:Kynikos|Kynikos]] 13:07, 21 October 2011 (EDT)
:I modified [[Template:AUR]] and [[Template:pkg]] to use the <nowiki>{{urlencode}}</nowiki> parser function (see [[WikiPedia:mw:Help:Magic words#URL data|mw:Help:Magic words#URL data]]). The second parameter to the templates is now ignored. [[User:Vadmium|Vadmium]] 23:07, 26 October 2011 (EDT).

Revision as of 12:56, 6 November 2011

pacman -S package vs pacman -Syu package: already started discussing in User talk:Kynikos#"pacman -S foo" vs "pacman -Syu foo" and User talk:pointone#"pacman -Syu package". Probably a nice subject for a new thread in the forum? -- Kynikos 11:46, 3 May 2011 (EDT)

Agreed; this should be discussed with the community at large. -- pointone 22:56, 4 May 2011 (EDT)

[myusualbrainstormingmode ON]I would even add a third opponent: treat official package installation similarly to AUR packages: just list the packages to be installed (possibly with Template:Package Official) and link to Pacman or some other article for details on how to install.[myusualbrainstormingmode OFF] -- Kynikos 05:23, 17 May 2011 (EDT)

Ah, and maybe rename Template:Package Official to Template:Package or just Template:Pkg for ease of use. -- Kynikos 05:32, 17 May 2011 (EDT)

I agree! I don't think we should use the verbose "Install Template:Package Official: pacman -S pkgname" outside of the Beginners' Guide. "Install Template:Package Official." should be enough, and I don't think we need to link to pacman each time we do it, since archers learn how to install packages during the initial install. Explicit instructions are useful when it's not something completely obvious, like using --asdeps or -D. thestinger 05:48, 17 May 2011 (EDT)
Well the link could be implicit, like in "Install Template:Package Official". -- Kynikos 06:03, 18 May 2011 (EDT)
I think we could have a template for that too. Something like {{install|pkgname}} which would render as: "Install the Template:Package Official packagehow?" Bonus points if the template can accept a list of packages. I think the "how?" is small enough to be ignored by the more experienced but friendly enough for the novice. One could have a separate template for AUR packages which links to the AUR Wiki article instead. James Eder 17:19, 3 June 2011 (EDT)
Is there a way to use templates and point to a specific package? This is not what I want, I want just kernel26. Selecting only core repo makes it a bit better, but still not perfect. This method can cause some confusion so it would be nice to avoid it. -- Karol 18:06, 3 June 2011 (EDT)
I don't know if there is a way but it seems in most cases the right package appears at the top of the search results at least. On the other hand, most users probably are going to be using pacman to grab their package anyway. In that case, linking to the web front end for the database might not be that useful anyway. James Eder 19:24, 3 June 2011 (EDT)
About the template, I have the same position as for the daemons: it would force to use always the same wording while there are cases which would require different, more natural ways of explaining the installation. For example what would you do with optional packages? Would you make a Package Optional template? And with lists of packages? As far as I know, templates don't support for loops, so how would you print a list of packages with a single template?
About Karol's question, I think that the main problem would be the difference between i686/x86_64 and any packages: this would require 2 templates, unless we'd like to provide only one package in case it's a i686/x86_64 type. Apart from that, each package has a well defined URI, so it would be easy to compose it providing as arguments the package name and the repository.
Anyway, as stated by Pointone, all "this should be discussed with the community at large", e.g. in the forum I guess. -- Kynikos 10:20, 4 June 2011 (EDT)

Related: #AUR package installation

Let's sum up this discussion:

  • Package installation instructions should be given as "Install Template:Package Official, available in the [reponame] repository". The alternative is a template for doing this.
I think linking to the package is sufficient. Official and unofficial (AUR) packages should be differentiated, however. I do not support the use of a template which would tend to restrict editors. -- pointone 14:03, 22 September 2011 (EDT)
I agree, except that I haven't understood if you support the link to pacman or not. At the moment this is implemented with the link. -- Kynikos 16:38, 22 September 2011 (EDT)
Yes, the link to pacman should be included. Closing. -- pointone 18:13, 10 October 2011 (EDT)
  • Do we enforce also mentioning the repository? This will have to be maintained in case the package is moved somewhere else.
As mentioned above, official and unofficial packages should be differentiated. Maintaining repository information is unnecessary and troublesome; repository changes are not wholly uncommon. -- pointone 14:03, 22 September 2011 (EDT)
Implemented. -- Kynikos 17:16, 22 September 2011 (EDT)
I think we should make an exception for official repositories which are not enabled by default. Currently this is only [multilib] on x86_64 machines and [*testing] repositories. This is somewhat rare if we consider the relatively few (by the numbers) packages in [multilib] and the nature of testing repositories (packages do not stay long and could be broken). However, mentioning a that a package is in multilib which is not enabled by default can avoid some confusion. It would be a loss to not include such information, IMO. James Eder 12:01, 23 September 2011 (EDT)
You certainly have a point there, do we keep a whitelist of allowed repos ([multilib] and [*testing]) or a blacklist of not-allowed ones ([core], [extra], [community])? I'm for the baclklist way. -- Kynikos 15:48, 23 September 2011 (EDT)
A blacklist sounds simpler.  :) James Eder 00:05, 24 September 2011 (EDT)
Done. -- Kynikos 15:34, 24 September 2011 (EDT)
I support this move. What would you suggest as a more succinct title for Template:Package AUR? Template:Pkg2? -- pointone 14:03, 22 September 2011 (EDT)
Uhm, I'd say Template:UPkg or Template:PkgU or Template:PkgAUR or Template:AURPkg or, why not, Template:AUR. -- Kynikos 17:16, 22 September 2011 (EDT)
Done! -- pointone 18:13, 10 October 2011 (EDT)
Perfect, I've just created Template:Aur so we can let users use {{Aur|package}} or even {{aur|package}}. -- Kynikos 18:43, 10 October 2011 (EDT)
  • Allow using direct links to packages to avoid ambiguities?
Perhaps the package search API could include an "exact match" option as Template:Package AUR now uses? (Relevant code). -- pointone 14:03, 22 September 2011 (EDT)
Definitely, the template for official packages is not meant to be a search tool, it should point to the right results as fast as possible, and the user inserting it is supposed to use the exact name of the package in the first place. -- Kynikos 17:16, 22 September 2011 (EDT)
Ah, but this means we're not going to allow direct links? I'm in favour of forbidding them, provided that the "exact match" option works as desired. -- Kynikos 17:19, 22 September 2011 (EDT)
The trouble with direct links for packages in the official repositories is that you end up linking to either the 32-bit or 64-bit package which may not be appropriate for the reader. It would be best if the template lead to search results which match an exact name (which should, in most cases, contain only two packages in the results). +1 for not directly linking to packages in official repositories if it can be avoided. James Eder 12:22, 23 September 2011 (EDT)
What about e.g. Template:Package Official, Template:Package Official, Template:Package Official, Template:Package Official? I think we should use
# pacman -S ruby
-- Karol 13:32, 23 September 2011 (EDT)
I'm not sure if I have understood correctly your reply: those packages would be included in sentences like "To get the latest version of Python 3, simply install the Template:Package Official package." (reworded from Python): by clicking on Template:Package Official, with the eaxct match option the user would be shown only 2 results, python for i686 and python for x86_64. I think that would be the desirable way. -- Kynikos 16:02, 23 September 2011 (EDT)
I created FS#26383. Please vote/comment. Otherwise, the next best solution would be to link directly to the packages.git trunk or PKGBUILD:
-- pointone 18:13, 10 October 2011 (EDT)
You have my vote :) But you should also be able to vote it yourself, right?
Yes, linking to git may work, but let's hope that the bug gets fixed! ^^ -- Kynikos 18:50, 10 October 2011 (EDT)
Ah, right. Um... I was just being bashful. :$ -- pointone 18:55, 10 October 2011 (EDT)
  • Create a template which composes a direct link when given repository name, architecture and package name as arguments?
Maintenance would be difficult -- repository changes are not wholly uncommon. -- pointone 14:03, 22 September 2011 (EDT)
Kk, discarded. -- Kynikos 17:16, 22 September 2011 (EDT)

-- Kynikos 15:17, 21 September 2011 (EDT)