Difference between revisions of "Talk:Pacman"

From ArchWiki
Jump to: navigation, search
(testdb: new section)
('failed to commit transaction (wrong or NULL argument passed)' error: re)
 
(327 intermediate revisions by 34 users not shown)
Line 1: Line 1:
== Reasoning for Existence of Page ==
+
== Description of pacman internals (for new pacman programmers) ==
We already have --help for a quick description of commands, and the man page for a detailed description.
 
So what does this wiki page achieve exactly? [[User:Shining|shining]] 16:45, 27 April 2008 (EDT)
 
  
:After last cleanup from toofishes which removed a bunch of flags, and linked to --help and man page instead, I think it is now clearer.
+
{{META Box Blue|Moderation note:|2=
:This page should just be a quick overview of the most frequently used pacman commands, not an exhaustive enumeration of every single flag. [[User:Shining|shining]] 07:50, 12 June 2008 (EDT)
+
The previous discussion on this subject (titled [https://wiki.archlinux.org/index.php?title=Talk:Pacman&oldid=252437#Detail_missing Detail missing]) has been seriously derailed in the past. Please let's focus on the original topic, also presented by the current title, i.e. the description of pacman internals and its code base, targeting new pacman programmers. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:27, 11 October 2015 (UTC)
 +
}}
 +
 
 +
Can someone please add the details of pacman?  There is no explanation of how it works.  What are the components and their interaction?  And how about related dependencies and libraries?  Without that basic flow-chart concept in mind, it is very difficult to understand the roll that third-party additions or frontends might play.
 +
 
 +
:This would be very interesting. libfetch, libalpm, etc. [[User:Manolo|manolo]] 15:23, 15 November 2009 (EST)
 +
::There's [http://allanmcrae.com/2010/11/basic-overview-of-pacman-code/ a tiny bit] on Allan's blog. Details regarding libalpm should be in a separate wiki article. -- [[User:Karol|Karol]] 13:13, 10 February 2012 (EST)
 +
::[http://allanmcrae.com/2012/02/the-great-pacman-bug-hunt-of-2012/ Some more, pretty low level, info], also from Allan's blog. -- [[User:Karol|Karol]] 13:24, 11 February 2012 (EST)
 +
:: Any news about this? It would be interesting information to have. Please, can anyone reply about this? [[User:Timofonic|Timofonic]] ([[User talk:Timofonic|talk]]) 05:38, 23 July 2017 (UTC)
 +
 
 +
== pacman.log ==
 +
 
 +
There are (as of this writing) two places on this page which say that <code>pacman</code>'s output is logged to <code>/var/log/pacman.log</code>. Obviously in the strictest sense this is false, as can easily be seen by anybody who's glanced at this file and at <code>pacman</code>'s on-screen output. Ordinarily, this wouldn't be a problem, as it's clear what is meant. But there's also some information which is ''not'' logged, and this fact is unclear.
 +
 
 +
I'd edit the page to make it clear what is and isn't logged, but I'm not sure myself. It seems like the following things are logged:
 +
 
 +
* Package installation complete
 +
* Most but not all of the per-package notices <code>pacman</code> prints.
 +
 
 +
It seems like the following things are not logged:
 +
 
 +
* Progress bars (of course)
 +
* Package download
 +
* Package integrity and signature checks
 +
* File conflicts
 +
* Disk space checks
 +
* Optional dependencies
 +
 
 +
Unless there's a problem (in which case they may be logged; I'm not sure), you really don't care about any of these except the optional dependencies, and those can be obtained with <code>pacman -Qi</code> or <code>expac</code>. However, I'm not sure if this list is exhaustive, and wouldn't want to find out the hard way that I'd missed important <code>pacman</code> output by assuming it'd be in the log.
 +
 
 +
Can somebody link to (or put here) a more comprehensive list of what is and isn't logged? I haven't been able to find one, and I think that it'd be much better to be clear than to simplify by saying "all the output is logged". [[User:DHouck|DHouck]] ([[User talk:DHouck|talk]]) 08:14, 22 February 2014 (UTC)
 +
 
 +
== Exit codes ==
 +
 
 +
I think that pacman exit codes should be also added here but don't know them. All I have noticed so far are only 0 when everything downloaded/installed without any problems and 1 when packages where skipped. Any special exit codes when at least one package was installed while other was skipped? And why error code is 0 when failed to connect to update mirrors {{ic|error: failed retrieving file}}, does it has the error codes when it was able to download all files to update from mirrors or not all repositories were available, e.g. only one? And may be some more exit codes for debugging?
 +
 
 +
-- Andy Crowd 08:00, 9 January 2015 (UTC)
 +
 
 +
:This is something that belongs in the manual. I'd suggest [https://bugs.archlinux.org/index.php?project=3&do=index&switch=1 filing a bug]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 17:20, 20 August 2015 (UTC)
 +
 
 +
== Pacstrap issue ==
 +
 
 +
:Moved from [[Beginners' guide]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 06:11, 20 February 2015 (UTC)
 +
 
 +
I don't know how many others are experiencing trouble when issuing the {{ic|pacstrap -i /mnt base base-devel}} command but I got a series of {{ic|GPGME ERROR: no data}} errors. This post helped: https://bbs.archlinux.org/viewtopic.php?id=162216
 +
You need to run: {{ic|rm -R /mnt/var/lib/pacman/sync}}
 +
and try again the pacstrap command. {{Unsigned|11 February 2015|Sudoku}}
 +
 
 +
== Don't rush updates ==
  
::Good points. Additionally, after the article refers users to the pacman.conf man page for configuration instructions, it goes on to discuss it!  It would be more appropriate to remove all configuration settings as it implied, and stick with pacman and its commands.
+
[https://wiki.archlinux.org/index.php?title=Pacman&diff=391408&oldid=390815 This edit] removed a warning that was, IMHO reasonably, suggesting not to upgrade a stable system without having the time to do possible post-upgrade maintenance. I agree that the warning wasn't very well worded and could have been simplified and given a more neutral tone, however I'd reintroduce it, thoughts? — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 08:05, 18 August 2015 (UTC)
  
::To make matters worse, the article doesn't even discuss all about pacman; leaving out huge and important chunks of information regarding the databases, their relationships, program lists, the backend application, etc. etc.  (See following section.)  Perhaps someone more knowledgable could flesh it out a little, starting with the basics. It would be greatly appreciated. - [[User:KitchM|KitchM]] 12:52, 5 November 2010 (EDT)
+
: I thought the wording was fine, and the example of giving a presentation was well-chosen to communicate the small but non-negligible amount of time required to fix problems. [[User:Herodotus|Herodotus]] ([[User talk:Herodotus|talk]]) 20:10, 18 August 2015 (UTC)
  
== Detail missing ==
+
::The original warning is anything but constructive though. Compare to [[Enhance_system_stability#Read_before_upgrading_the_system]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 03:30, 19 August 2015 (UTC)
Can someone please add the details of pacman?  There is no explanation of how it works. What are the components and their interaction?  And how about related dependencies and libraries?  Without that basic flow-chart concept in mind, it is very difficult to understand the roll that third-party additions or frontends might play.
 
  
:This would be very interesting. libfetch, libalpm, etc. [[User:Manolo|manolo]] 15:23, 15 November 2009 (EST)
+
:::How about [https://wiki.archlinux.org/index.php?title=Pacman&diff=391745&oldid=391589 this]. I'm not an expert so I mostly borrowed stuff from the deleted section and [[Enhance_system_stability#Arch_Specific_Tips_2]]. [[User:Herodotus|Herodotus]] ([[User talk:Herodotus|talk]]) 06:55, 19 August 2015 (UTC)
  
== No RTFM or personal opinions ==
+
::::In my view, the new section had the same problems of the removed warning, plus it duplicated part of what is already written shortly above.
Get rid of any comments that direct people to man pages instead of actually explaining things. That is a very lazy way of doing things.  At the very least you can summarize, or you can let someone else do it.
+
::::[https://wiki.archlinux.org/index.php?title=Pacman&diff=392814&oldid=391745] (which replaces the new section) is my proposal instead.
 +
::::— [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 10:51, 20 August 2015 (UTC)
  
Do not forget that one of the reasons the wiki exists is give the reader something they can understand in simple language. Man pages are the worst example of writing that has ever been written.
+
:::::Looks good to me. I do wonder if we should merge this to [[Enhance system stability#Read before upgrading the system]] and link from here. After all, potential issues on upgrade are not inherent to ''pacman'' (though resulting file system operations, or the interruption thereof, could damage the system), and [[Enhance system stability]] has some more notes on where upgrades could go wrong. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 17:10, 20 August 2015 (UTC)
  
Also, don't make claims about how wonderful a program is; rather state the reasons for the way it was created and let the user be the judge of if it is actually wonderful or not. - [[User:KitchM|KitchM]]
+
::::::I think we need a new "Recommended package management practices" section/page to cover the parts related to Arch packaging specifics from the end-user's point of view. This would describe basically [[Pacman#Upgrading_packages]] (merged with [[Pacman#Package_updates_have_broken_my_system]]), [[System_maintenance#Package_tasks]], [[Enhance_system_stability#Arch_Specific_Tips]] and [[Enhance_system_stability#Arch_Specific_Tips_2]] unbiased from the "enhancing stability" requirements. For the description of "why" it should refer to [[Arch packaging standards]] (or a more general overview, which [https://wiki.archlinux.org/index.php?title=Talk:Pacman_-_An_Introduction&oldid=392978#Rolling_release_terms I think] belongs to [[Official repositories]]), rather than [[The Arch Way]]. If we can move there also the general parts of [[pacman#Troubleshooting]], either as another "recommended practices" or a justification for them, it would be even better.
 +
::::::Just to make it clear, the general idea behind moving the content out of [[pacman]] is to let the main page cover only the basics related to ''pacman'' itself and describe the packaging details on a separate (sub)page like [[Downgrading packages]] or [[pacman tips]]. Of course all the pages have to be properly interlinked.
 +
::::::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:39, 20 August 2015 (UTC)
  
:We are trying to direct to man pages as much as possible in order to avoid duplicated effort.
+
:::::::To emphasize on the "why" again, there's:
:We do the best we can at explaining things in man pages. If people find that things are not clear, we would much prefer to get feedback, rather than people duplicating the documentation on the wiki.
+
:::::::# [[Arch_packaging_standards#Package_naming]] - Technical reference, somewhat cryptic
:The people working on pacman and its man pages actually also check this wiki page and maintain it occasionally. We would like to avoid having to fix things in both places systematically.
+
:::::::# [[System maintenance#Partial upgrades are not supported]] - It links to [[Wikipedia:Rolling release]], but mostly focuses on the technical (soname bumps)
:I hope that is understandable. We do want to explain things. We should just prefer do that in one centralized place. [[User:Shining|shining]] 12:10, 1 October 2009 (EDT)
+
:::::::# [[Frequently_asked_questions#Why_is_there_only_a_single_version_of_each_shared_library_in_the_official_repositories.3F]] - More explicit, but does this really belong in the [[FAQ]]? For now, I've linked it from the warning in [[Pacman#Installing packages]] anyway.
 +
:::::::I also agree that the actual [[Official repositories]] could be expanded. The brief mention in [[Arch_Linux#Modernity]] is enough for the scope of that article. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 12:06, 23 October 2015 (UTC)
  
::Thanks, Shining, for your thoughts.  I think that centralization has been the intent for many decades, but has never been correctly implemented.
+
:::::::[[Enhance system stability]] was cleaned and merged to [[System maintenance]]. I believe latter is the article where the recommended practices should be described. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 09:45, 23 October 2015 (UTC)
::IMHO, I have found that man pages are written in geek-speak by the programmers who make the software as a quickie way to document themselves to others of their language, and wiki pages are to be written by people whose job it is to communicate with everyone. I am not convinced that there is any duplication of effort in the two, but rather the necessary translation which must be done from one language to another. That is why one should only refer to man pages as an extra reference, but not the main one.
+
:::::::[[Pacman#Package updates have broken my system]] was partly moved to [[System maintenance#Revert broken updates]]: [https://wiki.archlinux.org/index.php?title=System_maintenance&diff=406302&oldid=406294] [https://wiki.archlinux.org/index.php?title=Pacman&diff=406283&oldid=406281] -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:34, 23 October 2015 (UTC)
::By the way, one example of problems with man pages is the recent one I ran across for pacman. Man pacman had one little reference to man pacman.conf at the bottom of the text. I had overlooked it for a long time, and only stumbled upon it by accident. Coulda, shoulda, woulda just doesn't have any bearing in this case. Poorly written, poorly formated and poorly cross-referenced is the best to which man pages can attain. There are many non-personal reasons for this, but suffice it to say, that's the way it is. Worse yet, even between the two there were still many important questions left unanswered.
+
:::::::[[Pacman#Partial upgrades are unsupported]] was moved to [[System maintenance#Partial upgrades are unsupported]]. [https://wiki.archlinux.org/index.php?title=System_maintenance&diff=406285&oldid=406270] A warning linking to it was added in its place. [https://wiki.archlinux.org/index.php?title=Pacman&diff=406290&oldid=406287] The [[Partial upgrade]] redirect(s) were updated, but awaiting further structure changes, only generally to [[System maintenance]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:12, 23 October 2015 (UTC)
::I maintain that we should fully explain as we go so that mistakes like this do not occur, else the wiki is incomplete. - [[User:KitchM|KitchM]] 11:33, 4 October 2009 (EDT)
 
  
:::You seem very negative and biased against man pages. You didn't even try to have them improved. We would really like to receive more detailed feedback on them before giving up. Please join pacman-dev@archlinux.org to discuss this. That way, more people could also contribute to this discussion. Mails are also a much better way to discuss than a wiki page.
+
=== New approach ===
:::Did you try the web version of the man pages ? This seems well formatted and cross-referenced to me : [http://www.archlinux.org/pacman/pacman.8.html pacman.8.html]. [[User:Shining|shining]] 12:22, 5 October 2009 (EDT)
 
  
::::Could it be that the bias is on your part?  I plainly wrote that as a person with experience in this area, I recognize the frustration of the billions of people who suffer from the terse and odd language of the traditional man pages. I also wrote that I have always stood ready to assist in any way to translate these things into useful common English and that few take me up on that.
+
::''Moved from the now closed [[#Pacman - An Introduction]] discussion. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 11:51, 23 October 2015 (UTC)''
::::I do not think that your erasure of my comments should justify contrary statements on subjects I have already addressed.  Why do that?
 
::::In any case, this is the place to make comment about the problems in the wiki writing found on the referenced page.  Please keep that in mind as I point out that man pages should have no place in a wiki setting as a substitute for doing proper wiki writing.  I would hope that we can all agree to that, and repair the wiki page in question.
 
::::(As to the issue of helping with the man pages, as I have twice stated, all you had to do was ask.  I will gladly meet you there.) [[User:KitchM|KitchM]] 14:35, 5 October 2009 (EDT)
 
  
::::: shining wrote: We would really like to receive more detailed feedback on them before giving up. Please join pacman-dev@archlinux.org to discuss this.
+
:Right now, package management on the wiki is fragmented and duplicated, and it's clear that creating another page won't help in solving this. As pointed out in [[#Don't rush updates]], we have [[System maintenance]], [[Enhance system stability]], this article, [[Official repositories]], [[Arch Linux]], [[Arch packaging standards]], ... not even mentioning specialist articles, the [[FAQ]] linked from the [[Main page]] or [[General troubleshooting]]. To make things worse, these articles are in different categories.
 +
:A few suggestions:
 +
:* Pacman, while a prominent feature of Arch, is ''not'' a distribution-specific tool. [https://bbs.archlinux.org/viewtopic.php?pid=828254#p828254] As such, this page should limit it's scope to 1. providing an introduction to basic commands, 2. refer and introduce to [https://www.archlinux.org/pacman/pacman.8.html pacman(8)] and [https://www.archlinux.org/pacman/pacman.conf.5.html pacman.conf(5)], 3. clarify on the inner workings, per [[#Description of pacman internals (for new pacman programmers)]].
 +
::We should still make a clear relation to how it functions inside Arch, by linking to other articles, including a sufficient explanation.
 +
:* Configuration should indeed be expanded upon after basic usage, again keeping the manuals and other material in mind.
 +
:* I would suggest cleaning and merging the [[System maintenance]] and [[Enhance system stability]] articles, moving the most common Q/A to - or linking it in - the [[FAQ]] or similar article. Having a central location for "Recommended practices", as pointed out in [[#Don't rush updates]], is key here. See also [[ArchWiki:Requests#FAQ]].
 +
:* Specialist cases should be moved to subpages of [[Pacman]], for example [[Pacman/Tips and tricks]].
 +
-- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 03:14, 13 October 2015 (UTC)
  
:::::: KitchM wrote: all you had to do was ask. I will gladly meet you there.
+
::Small update: pacman now has 4 subpages, [[Pacman/Tips and tricks]] (merge of [[pacman tips]] and [[Improve pacman performance]]), [[Pacman/Pacnew and Pacsave]] (from [[Pacnew and Pacsave files]]), [[Pacman/Rosetta]] (from [[Pacman Rosetta]]) and [[Pacman/Package signing]] (from [[pacman-key]]).
 +
::Haven't moved [[Downgrade packages]] yet, as it's equally related to [[Official repositories]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 16:39, 16 October 2015 (UTC)
  
::::::: Seems we are going around in circles... [[User:Allan|Allan]]
+
::You did not answer any of my arguments. You could say ''"yes, it is true that many people come on this page to understand pacman and that pacman's functionality can't be understood without understanding rolling repositories and that there is no explanation or at least a link to an explanation of this, but I don't care."'' I don't argue here in favor of a new page. [[User:Doru001|Doru001]] ([[User talk:Doru001|talk]]) 19:49, 13 October 2015 (UTC)
  
::::::::I don't think that is completely accurate. Sure, I was forced to restate some points, but we got thru it. And the good thing was that I got asked to help.  (Which I did, by the way.)  So that's real progress.  And very cool. I hope my suggestions got to the right parties and were appreciated. [[User:KitchM|KitchM]] 19:53, 6 October 2009 (EDT)
+
:I have actually been struggling with this same issue myself. Based on the number of problems reported on the mailing and list and forums that can be summarized as "User does not understand rolling release and good pacman practices," I think there is a pretty clear need for more directed documentation that increases the chance of new users learning the essential parts of maintaining an Arch system. '''However''', I'm not convinced that [[pacman]] is the right article for this information. Despite its importance, pacman is just another program distributed with Arch Linux and this article describes its technical ins and outs. You don't see [[Git]] including a discussion of the DVCS philosophy or [[Ruby]] including a treatise on object-oriented design, despite the fact that these are (arguably) essential skills for properly using such software.
 +
:I think that the simplest solution would be to add a note right after the introductory paragraph, along the lines of {{Note|This article describes the technical aspects of package management with pacman. If you are looking for practical tips for updating/maintaining an Arch Linux system, see [[System maintenance#Package tasks]].}} However I think this also ties into the discussion from [[#Don't rush updates]], in that we need a good unified location for such information that the note could link to. Frankly, the [[System maintenance]] article is just as lacking for new users. [[User:Silverhammermba|Silverhammermba]] ([[User talk:Silverhammermba|talk]]) 15:55, 15 October 2015 (UTC)
  
==Official name?==
+
=== Drafts ===
~Also, what is pacman's official name? i.e., pacman or Pacman?[[User:Manolo|manolo]] 00:42, 13 November 2009 (EST)
 
  
:It appears as "pacman" on both [http://www.archlinux.org/pacman/pacman.8.html the man page] and [http://www.archlinux.org/pacman/ the home page]. -- [[User:Pointone|pointone]] 12:35, 13 November 2009 (EST)
+
* I've made a draft to outline the merging of the aforementioned pages: [[User:Lahwaacz/Recommended package management practices]]. There is still long way to go, but I think it already contains everything relevant from [[System maintenance]] and [[Enhance system stability]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:33, 17 October 2015 (UTC)
  
==New merge==
+
* My (very similar) draft [[User:Silverhammermba/Recommended package management practices]]. I'm trying to take a different approach to the article, but right now it's not very significant.  Perhaps they will diverge more as we expand them. [[User:Silverhammermba|Silverhammermba]] ([[User talk:Silverhammermba|talk]]) 15:15, 20 October 2015 (UTC)
I think the new article merged by pointone is perfect, but I predict some people are going to think it's too verbose :) [[User:Manolo|manolo]] 13:32, 16 November 2009 (EST)
 
  
I just had a look at the merge, I find it perfectly fine. I think that giving this information to users is very important.
+
=== Repository going offline ===
I am still a big wiki noob, but I used to be pissed off many times by stupid edit of wiki pages, adding useless or wrong information. I have to say I am impressed by all the amazing work done by manolo and pointone so far on various wiki pages, both in contents and style. Please keep up the good work :) --[[User:Shining|shining]] 18:19, 16 November 2009 (EST)
 
  
== Pacman refuses to delete corrupted package, because it is corrupted... ==
+
::''This comment is from an earlier, closed discussion -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 12:19, 23 October 2015 (UTC)''
 +
:what happens when your repository goes off line and you fallback on a repository not yet updated? I still don't know, I only use one repository at a time! [[User:Doru001|Doru001]] ([[User talk:Doru001|talk]]) 14:47, 15 October 2015 (UTC)
 +
::Most likely, nothing. pacman doesn't downgrade packages with {{ic|-Syu}} - it only does so with {{ic|-Syuu}}. Assuming by "repository" [[Mirrors]] is meant here. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 12:19, 23 October 2015 (UTC)
  
I had this issue today with two packages (icu-4.4-2-x86_64.pkg.tar.xz and ttf-bitstream-vera-1.10-7-any.pkg.tar.xz). Got asked "<X> is corrupted. Do you want to delete it? [Y/n]" and then told "failed to commit transaction - <x> is invalid or corrupted". Some nice person should add in "Troubleshooting" that in this case one can delete said package manually as root in /var/cache/pacman/pkg. -- [[User:Misc|Misc]] 20:17, 17 April 2010 (EDT)
+
== Re-add practical NoExtract example for locales ==
  
:I'm glad someone asked this.  And thanks for the pointer.  One of the most annoying things that I've found users have ever had to deal with in the last couple decades has been this sort of problem with automated package management methods, regardless of the OS used. I have noticed, however, that the download process usually weeds out the corrupted downloads before committing them to the install process. It might be that dumping a bad package might be something that is automated by the pacman routine in a better manner than it does now, but downloading again, and overwriting the bad one, should fix the problem without further effort. - [[User:KitchM|KitchM]] 23:01, 18 April 2010 (EDT)
+
:''[This discussion follows [https://wiki.archlinux.org/index.php?title=Talk:Pacman&oldid=460285#Dangerous_NoExtract_example] -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 05:02, 28 October 2017 (UTC)]''
  
== proposed addition to package cache cleaning... ==
+
https://wiki.archlinux.org/index.php?title=Pacman&diff=next&oldid=450439 was removed because a user stated that it causes errors with possibly badly-conforming programs. I'm not sure removing the whole thing is the right approach, as I am pretty sure the issue came from the part that meddled with the X11/i18n locales, since application-level message catalogs are never going to cause that error.
  
''Comment: I think people will find value if the following was added to the page.  Might be good to insert it between the pacman -Sc and pacman -Scc descriptions.  What do others think?''
+
I also think I have fine-tuned my locale purging which currently looks like this:
  
 +
NoExtract  = usr/share/help/* !usr/share/help/en*
 +
NoExtract  = usr/share/gtk-doc/html/*
 +
NoExtract  = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/* opt/google/chrome/locales/*
 +
NoExtract  = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.*
 +
NoExtract  = !usr/share/*locales/en_?? !usr/share/*locales/i18n !usr/share/*locales/iso*
 +
NoExtract  = !usr/share/*locales/trans*
 +
NoExtract  = usr/share/qt4/translations/*
 +
NoExtract  = usr/share/man/* !usr/share/man/man*
 +
NoExtract  = usr/share/vim/vim*/lang/*
 +
NoExtract  = usr/lib/libreoffice/help/en-US/*
  
 +
Thoughts about re-adding part or all of this?
  
Alternatively, the [[http://aur.archlinux.org/packages.php?ID=37572 CacheClean]] python script can be used to manage one's pacman cache.  Functionally, the script acts like the "pacman -Sc" command with a key difference: the user can select how many old versions (generations) of his/her packages to keep.  For example, the following command will keep two versions of the cached packages, deleting everything else in the /var/cache/pacman/pkg directory.
+
{{unsigned|04:40, 27 October 2017‎|Eschwartz}}
 +
: I myself think this method is too complex to maintain and not worth the space saved.
 +
: However, if you insist adding them, it should belong to [[Pacman/Tips_and_tricks]], not the main [[Pacman]] page.
 +
: --[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 10:00, 30 October 2017 (UTC)
  
# cacheclean.py 2
+
== Proposed style change for the term "pacman" ==
  
- [[User:graysky|graysky]] 16:18, 28 May 2010 (EDT)
+
Currently the convention is that ''pacman'' is lower case and italic where applicable. However, I want to propose changing the convention of always having the "p" in ''pacman'' lower case to ''Pacman'' when it is the first word in a sentence (e.g. "''pacman'' is great!" to "''Pacman is great!''"). This is the convention throughout [[Pacman/Tips and tricks#Reinstalling all packages|tips and tricks]] (links to first example) -- [[User:Comrumino|Comrumino]] ([[User talk:Comrumino|talk]]) 04:07, 18 December 2017 (UTC)
  
:Disagree; I think we should keep these kinds of ''unsupported'' tools, etc. in [[pacman Tips]]. -- [[User:Pointone|pointone]] 18:07, 2 September 2010 (EDT)
+
:{{man|8|pacman}} and {{man|5|pacman.conf}} use lowercase pacman, unless it is at the start of a sentence. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:30, 18 December 2017 (UTC)
  
== Changes with pacman 3.4 ==
+
::[[Help:Style#Spelling]] covers this, so apparently we do have to update this article, paying attention to when pacman is mentioned as a program/project and when it's mentioned as a mere executable. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 11:57, 19 December 2017 (UTC)
In the Installing and/or Upgrading sections, we could mention the new possibility of: pacman -Syu <package>
 
[[User:D garbage|D garbage]] 06:26, 27 June 2010 (EDT)
 
  
== Troubleshooting: manually reinstall pacman ==
+
== 'failed to commit transaction (wrong or NULL argument passed)' error ==
  
There is a great sticky in the forums explaining how to [https://bbs.archlinux.org/viewtopic.php?id=95007 manually reinstall pacman].
+
failed to commit transaction (wrong or NULL argument passed)
We could add something along these lines to the Troubleshooting section (sorry, I'm not good at this - but as a start):
 
  
{{FAQ
+
I tried to get SSH tool so I typed on mingw64 shell:
|question=Pacman ended up broken! How do I reinstall it?
 
|answer=In case pacman is broken beyond repair, you can get the necessary packages (openssl,libarchive,libfetch and pacman) and manually untar them to root. This will result in a working pacman binary. Make sure to then reinstall these packages with pacman to maintain package database integrity. There is an example script in this [https://bbs.archlinux.org/viewtopic.php?id=95007 forum post] you can take as starting point to automate the process.}}
 
{{FAQ
 
|question=Or another similar situation, removed pacman by mistake, how to reinstall it?
 
|answer=An easy way is to boot from a live cd (I used live usb for this), and update pacman database (only required for netinstall images). Mount the original partition where you want to install pacman using mount utility, and install pacman with -r switch giving the location of the new root.
 
}}
 
  
:Added (slightly modified). Thanks! -- [[User:Pointone|pointone]] 21:47, 27 July 2010 (EDT)
+
pacman -Su openssh
  
== Outdated Mirrors ==
+
but it returned:
  
Recently, some people had problems with mirrors that went completely out of sync due the new tier1/2-scheme. maybe we could add a sentence & link to the related troubleshooting section:
+
:: Starting core system upgrade...
 +
there is nothing to do
 +
:: Starting full system upgrade...
 +
resolving dependencies...
 +
looking for conflicting packages...
  
"pacman mirrors are not synced immediately. It may take over 24 hours before an update is available to you. The only options are be patient or use another mirror. ''If you have not received any updates for a long time, check [https://www.archlinux.de/?page=MirrorStatus MirrorStatus] for a properly syncing mirror.''"
+
Packages (2) heimdal-1.5.3-9  openssh-7.3p1-2
  
[[User:Hokasch|Hokasch]] 06:48, 2 September 2010 (EDT)
+
Total Installed Size: 6.44 MiB
  
:Implemented (simplified). -- [[User:Pointone|pointone]] 18:04, 2 September 2010 (EDT)
+
:: Proceed with installation? [Y/n] y
 +
(2/2) checking keys in keyring                    [#####################] 100%
  
== Package format ==
+
(2/2) checking package integrity                  [#####################] 100%
"It uses the .tar.gz package format, and is currently migrating to the .tar.xz (LZMA2) format."
 
  
Isn't the migration complete?
+
error: failed to commit transaction (wrong or NULL argument passed)
  
[[User:Jasonwryan|Jasonwryan]] 02:49, 22 October 2010 (EDT)
+
Errors occurred, no packages were upgraded.
  
:Updated. -- [[User:Pointone|pointone]] 10:39, 22 October 2010 (EDT)
 
  
== testdb ==
+
What's failed to commit transaction (wrong or NULL argument passed) supposed to mean and How to solve this ?
 +
Thanks so much in advance
 +
[[User:Budi|Budi]] ([[User talk:Budi|talk]]) 01:36, 17 January 2018 (UTC)
  
IMO it should be added to this page. You can get text from [https://bbs.archlinux.org/viewtopic.php?pid=320958]. --[[User:Beroal|Beroal]] 13:13, 8 November 2010 (EST)
+
:I doubt that a mingw64 shell is supported by Arch Linux, so you should consider seeking support elsewhere. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 17:44, 17 January 2018 (UTC)

Latest revision as of 17:44, 17 January 2018

Description of pacman internals (for new pacman programmers)

Moderation note: The previous discussion on this subject (titled Detail missing) has been seriously derailed in the past. Please let's focus on the original topic, also presented by the current title, i.e. the description of pacman internals and its code base, targeting new pacman programmers. -- Lahwaacz (talk) 21:27, 11 October 2015 (UTC)

Can someone please add the details of pacman? There is no explanation of how it works. What are the components and their interaction? And how about related dependencies and libraries? Without that basic flow-chart concept in mind, it is very difficult to understand the roll that third-party additions or frontends might play.

This would be very interesting. libfetch, libalpm, etc. manolo 15:23, 15 November 2009 (EST)
There's a tiny bit on Allan's blog. Details regarding libalpm should be in a separate wiki article. -- Karol 13:13, 10 February 2012 (EST)
Some more, pretty low level, info, also from Allan's blog. -- Karol 13:24, 11 February 2012 (EST)
Any news about this? It would be interesting information to have. Please, can anyone reply about this? Timofonic (talk) 05:38, 23 July 2017 (UTC)

pacman.log

There are (as of this writing) two places on this page which say that pacman's output is logged to /var/log/pacman.log. Obviously in the strictest sense this is false, as can easily be seen by anybody who's glanced at this file and at pacman's on-screen output. Ordinarily, this wouldn't be a problem, as it's clear what is meant. But there's also some information which is not logged, and this fact is unclear.

I'd edit the page to make it clear what is and isn't logged, but I'm not sure myself. It seems like the following things are logged:

  • Package installation complete
  • Most but not all of the per-package notices pacman prints.

It seems like the following things are not logged:

  • Progress bars (of course)
  • Package download
  • Package integrity and signature checks
  • File conflicts
  • Disk space checks
  • Optional dependencies

Unless there's a problem (in which case they may be logged; I'm not sure), you really don't care about any of these except the optional dependencies, and those can be obtained with pacman -Qi or expac. However, I'm not sure if this list is exhaustive, and wouldn't want to find out the hard way that I'd missed important pacman output by assuming it'd be in the log.

Can somebody link to (or put here) a more comprehensive list of what is and isn't logged? I haven't been able to find one, and I think that it'd be much better to be clear than to simplify by saying "all the output is logged". DHouck (talk) 08:14, 22 February 2014 (UTC)

Exit codes

I think that pacman exit codes should be also added here but don't know them. All I have noticed so far are only 0 when everything downloaded/installed without any problems and 1 when packages where skipped. Any special exit codes when at least one package was installed while other was skipped? And why error code is 0 when failed to connect to update mirrors error: failed retrieving file, does it has the error codes when it was able to download all files to update from mirrors or not all repositories were available, e.g. only one? And may be some more exit codes for debugging?

-- Andy Crowd 08:00, 9 January 2015 (UTC)

This is something that belongs in the manual. I'd suggest filing a bug. -- Alad (talk) 17:20, 20 August 2015 (UTC)

Pacstrap issue

Moved from Beginners' guide. -- Alad (talk) 06:11, 20 February 2015 (UTC)

I don't know how many others are experiencing trouble when issuing the pacstrap -i /mnt base base-devel command but I got a series of GPGME ERROR: no data errors. This post helped: https://bbs.archlinux.org/viewtopic.php?id=162216 You need to run: rm -R /mnt/var/lib/pacman/sync and try again the pacstrap command. —This unsigned comment is by Sudoku (talk) 11 February 2015. Please sign your posts with ~~~~!

Don't rush updates

This edit removed a warning that was, IMHO reasonably, suggesting not to upgrade a stable system without having the time to do possible post-upgrade maintenance. I agree that the warning wasn't very well worded and could have been simplified and given a more neutral tone, however I'd reintroduce it, thoughts? — Kynikos (talk) 08:05, 18 August 2015 (UTC)

I thought the wording was fine, and the example of giving a presentation was well-chosen to communicate the small but non-negligible amount of time required to fix problems. Herodotus (talk) 20:10, 18 August 2015 (UTC)
The original warning is anything but constructive though. Compare to Enhance_system_stability#Read_before_upgrading_the_system. -- Alad (talk) 03:30, 19 August 2015 (UTC)
How about this. I'm not an expert so I mostly borrowed stuff from the deleted section and Enhance_system_stability#Arch_Specific_Tips_2. Herodotus (talk) 06:55, 19 August 2015 (UTC)
In my view, the new section had the same problems of the removed warning, plus it duplicated part of what is already written shortly above.
[1] (which replaces the new section) is my proposal instead.
Kynikos (talk) 10:51, 20 August 2015 (UTC)
Looks good to me. I do wonder if we should merge this to Enhance system stability#Read before upgrading the system and link from here. After all, potential issues on upgrade are not inherent to pacman (though resulting file system operations, or the interruption thereof, could damage the system), and Enhance system stability has some more notes on where upgrades could go wrong. -- Alad (talk) 17:10, 20 August 2015 (UTC)
I think we need a new "Recommended package management practices" section/page to cover the parts related to Arch packaging specifics from the end-user's point of view. This would describe basically Pacman#Upgrading_packages (merged with Pacman#Package_updates_have_broken_my_system), System_maintenance#Package_tasks, Enhance_system_stability#Arch_Specific_Tips and Enhance_system_stability#Arch_Specific_Tips_2 unbiased from the "enhancing stability" requirements. For the description of "why" it should refer to Arch packaging standards (or a more general overview, which I think belongs to Official repositories), rather than The Arch Way. If we can move there also the general parts of pacman#Troubleshooting, either as another "recommended practices" or a justification for them, it would be even better.
Just to make it clear, the general idea behind moving the content out of pacman is to let the main page cover only the basics related to pacman itself and describe the packaging details on a separate (sub)page like Downgrading packages or pacman tips. Of course all the pages have to be properly interlinked.
-- Lahwaacz (talk) 19:39, 20 August 2015 (UTC)
To emphasize on the "why" again, there's:
  1. Arch_packaging_standards#Package_naming - Technical reference, somewhat cryptic
  2. System maintenance#Partial upgrades are not supported - It links to Wikipedia:Rolling release, but mostly focuses on the technical (soname bumps)
  3. Frequently_asked_questions#Why_is_there_only_a_single_version_of_each_shared_library_in_the_official_repositories.3F - More explicit, but does this really belong in the FAQ? For now, I've linked it from the warning in Pacman#Installing packages anyway.
I also agree that the actual Official repositories could be expanded. The brief mention in Arch_Linux#Modernity is enough for the scope of that article. -- Alad (talk) 12:06, 23 October 2015 (UTC)
Enhance system stability was cleaned and merged to System maintenance. I believe latter is the article where the recommended practices should be described. -- Alad (talk) 09:45, 23 October 2015 (UTC)
Pacman#Package updates have broken my system was partly moved to System maintenance#Revert broken updates: [2] [3] -- Alad (talk) 10:34, 23 October 2015 (UTC)
Pacman#Partial upgrades are unsupported was moved to System maintenance#Partial upgrades are unsupported. [4] A warning linking to it was added in its place. [5] The Partial upgrade redirect(s) were updated, but awaiting further structure changes, only generally to System maintenance. -- Alad (talk) 10:12, 23 October 2015 (UTC)

New approach

Moved from the now closed #Pacman - An Introduction discussion. -- Alad (talk) 11:51, 23 October 2015 (UTC)
Right now, package management on the wiki is fragmented and duplicated, and it's clear that creating another page won't help in solving this. As pointed out in #Don't rush updates, we have System maintenance, Enhance system stability, this article, Official repositories, Arch Linux, Arch packaging standards, ... not even mentioning specialist articles, the FAQ linked from the Main page or General troubleshooting. To make things worse, these articles are in different categories.
A few suggestions:
We should still make a clear relation to how it functions inside Arch, by linking to other articles, including a sufficient explanation.

-- Alad (talk) 03:14, 13 October 2015 (UTC)

Small update: pacman now has 4 subpages, Pacman/Tips and tricks (merge of pacman tips and Improve pacman performance), Pacman/Pacnew and Pacsave (from Pacnew and Pacsave files), Pacman/Rosetta (from Pacman Rosetta) and Pacman/Package signing (from pacman-key).
Haven't moved Downgrade packages yet, as it's equally related to Official repositories. -- Alad (talk) 16:39, 16 October 2015 (UTC)
You did not answer any of my arguments. You could say "yes, it is true that many people come on this page to understand pacman and that pacman's functionality can't be understood without understanding rolling repositories and that there is no explanation or at least a link to an explanation of this, but I don't care." I don't argue here in favor of a new page. Doru001 (talk) 19:49, 13 October 2015 (UTC)
I have actually been struggling with this same issue myself. Based on the number of problems reported on the mailing and list and forums that can be summarized as "User does not understand rolling release and good pacman practices," I think there is a pretty clear need for more directed documentation that increases the chance of new users learning the essential parts of maintaining an Arch system. However, I'm not convinced that pacman is the right article for this information. Despite its importance, pacman is just another program distributed with Arch Linux and this article describes its technical ins and outs. You don't see Git including a discussion of the DVCS philosophy or Ruby including a treatise on object-oriented design, despite the fact that these are (arguably) essential skills for properly using such software.
I think that the simplest solution would be to add a note right after the introductory paragraph, along the lines of
Note: This article describes the technical aspects of package management with pacman. If you are looking for practical tips for updating/maintaining an Arch Linux system, see System maintenance#Package tasks.
However I think this also ties into the discussion from #Don't rush updates, in that we need a good unified location for such information that the note could link to. Frankly, the System maintenance article is just as lacking for new users. Silverhammermba (talk) 15:55, 15 October 2015 (UTC)

Drafts

Repository going offline

This comment is from an earlier, closed discussion -- Alad (talk) 12:19, 23 October 2015 (UTC)
what happens when your repository goes off line and you fallback on a repository not yet updated? I still don't know, I only use one repository at a time! Doru001 (talk) 14:47, 15 October 2015 (UTC)
Most likely, nothing. pacman doesn't downgrade packages with -Syu - it only does so with -Syuu. Assuming by "repository" Mirrors is meant here. -- Alad (talk) 12:19, 23 October 2015 (UTC)

Re-add practical NoExtract example for locales

[This discussion follows [7] -- Kynikos (talk) 05:02, 28 October 2017 (UTC)]

https://wiki.archlinux.org/index.php?title=Pacman&diff=next&oldid=450439 was removed because a user stated that it causes errors with possibly badly-conforming programs. I'm not sure removing the whole thing is the right approach, as I am pretty sure the issue came from the part that meddled with the X11/i18n locales, since application-level message catalogs are never going to cause that error.

I also think I have fine-tuned my locale purging which currently looks like this:

NoExtract  = usr/share/help/* !usr/share/help/en*
NoExtract  = usr/share/gtk-doc/html/*
NoExtract  = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/* opt/google/chrome/locales/*
NoExtract   = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.*
NoExtract   = !usr/share/*locales/en_?? !usr/share/*locales/i18n !usr/share/*locales/iso*
NoExtract   = !usr/share/*locales/trans*
NoExtract  = usr/share/qt4/translations/*
NoExtract  = usr/share/man/* !usr/share/man/man*
NoExtract  = usr/share/vim/vim*/lang/*
NoExtract  = usr/lib/libreoffice/help/en-US/*

Thoughts about re-adding part or all of this?

—This unsigned comment is by Eschwartz (talk) 04:40, 27 October 2017‎. Please sign your posts with ~~~~!

I myself think this method is too complex to maintain and not worth the space saved.
However, if you insist adding them, it should belong to Pacman/Tips_and_tricks, not the main Pacman page.
--Fengchao (talk) 10:00, 30 October 2017 (UTC)

Proposed style change for the term "pacman"

Currently the convention is that pacman is lower case and italic where applicable. However, I want to propose changing the convention of always having the "p" in pacman lower case to Pacman when it is the first word in a sentence (e.g. "pacman is great!" to "Pacman is great!"). This is the convention throughout tips and tricks (links to first example) -- Comrumino (talk) 04:07, 18 December 2017 (UTC)

pacman(8) and pacman.conf(5) use lowercase pacman, unless it is at the start of a sentence. -- Lahwaacz (talk) 07:30, 18 December 2017 (UTC)
Help:Style#Spelling covers this, so apparently we do have to update this article, paying attention to when pacman is mentioned as a program/project and when it's mentioned as a mere executable. -- Kynikos (talk) 11:57, 19 December 2017 (UTC)

'failed to commit transaction (wrong or NULL argument passed)' error

failed to commit transaction (wrong or NULL argument passed)

I tried to get SSH tool so I typed on mingw64 shell:

pacman -Su openssh

but it returned:

Starting core system upgrade...

there is nothing to do

Starting full system upgrade...

resolving dependencies... looking for conflicting packages...

Packages (2) heimdal-1.5.3-9 openssh-7.3p1-2

Total Installed Size: 6.44 MiB

Proceed with installation? [Y/n] y

(2/2) checking keys in keyring [#####################] 100%

(2/2) checking package integrity [#####################] 100%

error: failed to commit transaction (wrong or NULL argument passed)

Errors occurred, no packages were upgraded.


What's failed to commit transaction (wrong or NULL argument passed) supposed to mean and How to solve this ? Thanks so much in advance Budi (talk) 01:36, 17 January 2018 (UTC)

I doubt that a mingw64 shell is supported by Arch Linux, so you should consider seeking support elsewhere. -- Lahwaacz (talk) 17:44, 17 January 2018 (UTC)