Difference between revisions of "Talk:Pacman/Tips and tricks"

From ArchWiki
Jump to: navigation, search
m (close old discussion)
(Tablify utilities: clarify2)
 
(114 intermediate revisions by 20 users not shown)
Line 1: Line 1:
===<s>Merge</s>===
+
{{Note|'''Moderation''' — Any pacman frontend that does [[partial upgrade]]s ''without explicit user intervention'' (i.e, specifying {{ic|-Sy}} on the command line), has no place on this page or anywhere else on ArchWiki. No exceptions. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 14:03, 20 May 2017 (UTC)
I propose we have a single article for small pacman tips instead of a thousand 10 line articles.<br>
+
}}
--[[User:Gog|Gog]] 09:29, 18 October 2009 (EDT)
 
  
:Go for it. And f you can remove some lines from [[Pacman]] instead of adding some, you have my full support :)
+
== pacman-optimize on SSD ==
:--[[User:Shining|shining]] 17:08, 29 October 2009 (EDT)
 
  
::Merged [[User:Manolo|manolo]] 15:20, 15 November 2009 (EST)
+
:''[Moved from [[Talk:Improve pacman performance]] -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 05:05, 16 October 2015 (UTC)]''
  
== Merge ==
+
pacman-optimize only tries to reduce fragmentation of the files right? If that is the case perhaps we should include a note that this probably won't help much on an SSD. {{Unsigned|18:27, 29 March 2013‎|F4hy}}
  
This is an excellent candidate for merging with [[pacman]].  Just put this one at the bottom of the other, in a special "Tips" section. It would be good to keep all articles on one subject together in one place for the sake of simplicity and organization; the KISS way. - [[User:KitchM|KitchM]] 11:39, 23 January 2010 (EST)
+
== pacman-optimize ==
 +
 
 +
:''[Moved from [[Talk:Improve pacman performance]] -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 05:05, 16 October 2015 (UTC)]''
 +
 
 +
Looks like the [https://aur.archlinux.org/packages/systemd-timer-pacman-optimize-git/ systemd-timer-pacman-optimize-git] package is no longer maintained. [https://lists.archlinux.org/pipermail/pacman-dev/2014-August/019337.html]
 +
 
 +
Should the wiki no longer recommend this package? -- I'm guessing it shouldn't.
 +
 
 +
Also, is pacman-optimize less important than in the past? -- I am genuinely unsure about this.
 +
 
 +
--[[User:Matthew02|Matthew02]] ([[User talk:Matthew02|talk]]) 05:40, 2 March 2015 (UTC)
 +
 
 +
:The maintenance of {{AUR|systemd-timer-pacman-optimize-git}} has nothing to do with that of {{Pkg|pacman}} itself, it is packaged separately and even in the AUR. Anyway, I'd keep the section until ''pacman-optimize'' is removed from {{Pkg|pacman}}.
 +
:The reasons why it is not very important nowadays are improvements in pacman itself (mentioned in the ML post linked above), increased speeds of HDDs and the advent of SSDs.
 +
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 22:18, 2 March 2015 (UTC)
 +
 
 +
== Leading slash ==
 +
 
 +
[[Pacman/Tips_and_tricks#aria2]] doesn't work without leading slash, i.e. {{ic|-d /}} turning file names to {{ic|//var/cache/...}}. The article mentions this, but it doesn't mention why. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 05:28, 16 October 2015 (UTC)
 +
 
 +
:You would have to go [https://wiki.archlinux.org/index.php?title=Improve_pacman_performance&diff=32104&oldid=30674 way] [https://wiki.archlinux.org/index.php?title=Improve_pacman_performance&diff=next&oldid=115292 back] to track this. It seems to have worked without {{ic|-d /}} even in 2006: [https://wiki.archlinux.org/index.php?title=Faster_Pacman_Downloads&oldid=15627], [https://wiki.archlinux.org/index.php?title=Improve_pacman_performance&oldid=17759]. <s>I guess that simply nobody asked the right question...</s> -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 12:30, 16 October 2015 (UTC)
 +
:Oops, it does ''not'' work without {{ic|-d /}}. Then the problem must be on aria's side, which expects a file name for the {{ic|-o}} option, which is then catenated with {{ic|-d}} into the full path. Assuming that {{ic|-d}} defaults to the cwd, {{ic|/var/cache/}} would appear twice in the result. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 12:43, 16 October 2015 (UTC)
 +
 
 +
== pacman cache ==
 +
 
 +
I still think we should warn people not to symlink /var or anything under it. It leaves the whole system unusable because if the cache disappears during a pacman transaction, you're left with missing /usr/lib libraries, and nothing works, including pacman itself. This is a serious enough problem that it can take hours to figure out how to recover. If the wiki had mentioned this problem it would have saved me a lot of time and effort, and I'm not the only one who has run in to this. It is not, however, considered a bug. See https://bugs.archlinux.org/task/50298. [[User:JimRees|JimRees]] ([[User talk:JimRees|talk]]) 23:15, 29 April 2017 (UTC)
 +
 
 +
:This revisions says that: [https://wiki.archlinux.org/index.php?title=Pacman%2FTips_and_tricks&type=revision&diff=475454&oldid=475438]. But to make it more clear: [https://wiki.archlinux.org/index.php?title=Pacman%2FTips_and_tricks&type=revision&diff=475492&oldid=475482]  -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 00:13, 30 April 2017 (UTC)
 +
 
 +
::Actually, I undid my change since I think that first change is more accurate (mentioning {{ic|/var/cache/pacman/pkg}} and ancestors), so I went back to that but explicitly mentioned {{ic|/var}} as an example-- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 01:11, 30 April 2017 (UTC)
 +
 
 +
: Thanks for the background information. I was not aware of the bug report and now clearly understand why you altered the section the way you did. I hope the [https://wiki.archlinux.org/index.php?title=Pacman/Tips_and_tricks&diff=475548&oldid=475495 recent change] is sufficient for you. Since every misbehaving program might leave a system unbootable if it plays a role in the boot process, it should be unnecessary to add this redundant information. However the problem you described is still severe and I hope you agree that the recent edits made to the article do the topic justice. Thanks for clarifying the topic and adding this to the article and sorry for reverting your edits at first. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 21:07, 30 April 2017 (UTC)
 +
 
 +
== How to check if a pacman frontend is doing partial upgrades? ==
 +
 
 +
How to know that a pacman frontend like {{ic|pamac}} or {{ic|octopi}} is doing partial upgrades? Because I didn't know they were doing it. So how can I check?
 +
 
 +
I installed {{ic|kulu}} finally but {{ic|octopi}} has a {{ic|octopi-notifier}} an can be used as notifier only for example. So I should be able to link {{ic|octopi-notifier}} as it is harmless for the system?
 +
 
 +
[[User:Noraj|Noraj]] ([[User talk:Noraj|talk]]) 17:10, 20 May 2017 (UTC)
 +
 
 +
:Not much you can do besides check the code, or find out that the sync db is in an inconsistent state after the partial upgrade was done (as in any .so bump causing programs to fail). For octopi there's this [https://github.com/aarnt/octopi/issues/134 github issue] which explains how the program does partial upgrades by design. Unsurprisingly, octopi-notifier does the exact same thing. [https://github.com/aarnt/octopi/blob/master/notifier/octopi-notifier/mainwindow.cpp#L184] -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 18:39, 20 May 2017 (UTC)
 +
 
 +
== How and when exactly does pamac do partial upgrades? ==
 +
 
 +
[https://github.com/manjaro/pamac/search?utf8=%E2%9C%93&q=start_refresh&type= This link] doesn't really explain much (sorry if I'm missing out on something obvious). I don't want to keep using it if there's an obvious problem, but so far I haven't encountered any problems that would come up due to partial upgrades.
 +
 
 +
I've tried searching for some information on this but I didn't find much. The only real answer I found was [https://github.com/manjaro/pamac/issues/248 this], which says that they always do full updates.
 +
 
 +
So I'm kind of confused about how pamac does partial upgrades. Is there some specific condition in which it does them, or does it do them constantly, or does it just not do them? [[User:Tomaszal|Tomaszal]] ([[User talk:Tomaszal|talk]]) 23:04, 25 July 2017 (UTC)
 +
 
 +
:If you do {{ic|pacman -Sy}} and then {{ic|pacman -S ''package''}}, that's a partial upgrade. The function {{ic|start_refresh}} is equivalent to {{ic|pacman -Sy}} and the problem is that it is setting up the user for a partial upgrade the next time he installs a package, since that function is run just to check if there are updates. That's my analysis at least.  -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 12:23, 26 July 2017 (UTC)
 +
 
 +
::Okay, thanks for the explanation. Is there a reason for {{ic|pamac}} to do things that way though? Because otherwise it's a really great graphical front-end and I couldn't find anything that compares to it (except for maybe {{ic|octopi}}, but that has the same issue obviously). [[User:Tomaszal|Tomaszal]] ([[User talk:Tomaszal|talk]]) 12:50, 26 July 2017 (UTC)
 +
 
 +
:::It's not a problem in Manjaro since that distribution updates their repositories approximately once a month. Since Manjaro is the target audience of the software, my guess is that the authors didn't bother with a clever mechanism as {{ic|checkupdates}} did.
 +
:::However, as they seem oblivious to the implications for Arch users (or the general definition of "partial update"), you might want to add something to the linked bug report. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 13:06, 26 July 2017 (UTC)
 +
 
 +
::::That would explain why I didn't have any issues, as I only used {{ic|pamac}} on Manjaro. I was planning on using it on Arch, but I guess I'll hold off from doing that for now.
 +
::::Thanks for your comments on this. I expressed my thoughts about this on the same [https://github.com/manjaro/pamac/issues/248 bug report]. Hopefully the developers won't ignore it and do something about the issue. [[User:Tomaszal|Tomaszal]] ([[User talk:Tomaszal|talk]]) 16:21, 26 July 2017 (UTC)
 +
 
 +
:::::[https://github.com/manjaro/pamac/commit/d661c573f986198fb0e48deb106f11de8e4c7291#diff-48818a7392a8a0538c2a5b6e427b2c69R140] seems to handle the issue. Could you test if it works properly? (e.g, by having pamac check for upgrades on an outdated database and see if {{ic|pacman -Su}} remains empty) -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:27, 6 August 2017 (UTC)
 +
 
 +
::::::Anyone checked? Is that still the case? [[User:Noraj|Noraj]] ([[User talk:Noraj|talk]]) 20:02, 22 March 2018 (UTC)
 +
 
 +
== Tablify utilities ==
 +
 
 +
[[User:Svito/Package manager]]
 +
 
 +
Summary:
 +
* tablify, document AppStream, Flatpak, fwupd and AUR support
 +
* add warnings to Graphical utilities that replace pacman in one way or another
 +
* merge back other graphical utilities and update notifiers from [[AUR helpers]]
 +
 
 +
-- [[User:Svito|Svito]] ([[User talk:Svito|talk]]) 20:43, 13 September 2018 (UTC)
 +
 
 +
:Related changes to be done to [[AUR helpers]]:
 +
:* rm ''Graphical'' section;
 +
:* rm "See also [[pacman/Tips and tricks#Pacman wrappers]]." from ''Pacman wrappers'' section (there were only 2 of them so I decided to merge them back to ''Utilities'');
 +
:* add "For graphical package managers with AUR support see [[pacman/Tips and tricks#Graphical]].", probably below ''Pacman wrappers'' table.
 +
:-- [[User:Svito|Svito]] ([[User talk:Svito|talk]]) 19:26, 18 September 2018 (UTC)
 +
 
 +
::I'm principally against this change since graphical AUR helpers are documented on ArchWiki ''only'' to warn users on their nefarious behavior, not because they are useful in any way. It took significant effort to stop most of them from doing partial upgrades, besides other issues such as widely opening up system permissions. (Latter even applies to "official" GUIs without AUR support, see {{Bug|50459}}).
 +
::Moving these projects outside [[AUR helpers]] would portray them as legitimate or supported. Adding strange comments like "developed for manjaro" doesn't change anything there. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:47, 20 September 2018 (UTC)

Latest revision as of 10:51, 20 September 2018

Note: Moderation — Any pacman frontend that does partial upgrades without explicit user intervention (i.e, specifying -Sy on the command line), has no place on this page or anywhere else on ArchWiki. No exceptions. -- Alad (talk) 14:03, 20 May 2017 (UTC)

pacman-optimize on SSD

[Moved from Talk:Improve pacman performance -- Alad (talk) 05:05, 16 October 2015 (UTC)]

pacman-optimize only tries to reduce fragmentation of the files right? If that is the case perhaps we should include a note that this probably won't help much on an SSD. —This unsigned comment is by F4hy (talk) 18:27, 29 March 2013‎. Please sign your posts with ~~~~!

pacman-optimize

[Moved from Talk:Improve pacman performance -- Alad (talk) 05:05, 16 October 2015 (UTC)]

Looks like the systemd-timer-pacman-optimize-git package is no longer maintained. [1]

Should the wiki no longer recommend this package? -- I'm guessing it shouldn't.

Also, is pacman-optimize less important than in the past? -- I am genuinely unsure about this.

--Matthew02 (talk) 05:40, 2 March 2015 (UTC)

The maintenance of systemd-timer-pacman-optimize-gitAUR has nothing to do with that of pacman itself, it is packaged separately and even in the AUR. Anyway, I'd keep the section until pacman-optimize is removed from pacman.
The reasons why it is not very important nowadays are improvements in pacman itself (mentioned in the ML post linked above), increased speeds of HDDs and the advent of SSDs.
-- Lahwaacz (talk) 22:18, 2 March 2015 (UTC)

Leading slash

Pacman/Tips_and_tricks#aria2 doesn't work without leading slash, i.e. -d / turning file names to //var/cache/.... The article mentions this, but it doesn't mention why. -- Alad (talk) 05:28, 16 October 2015 (UTC)

You would have to go way back to track this. It seems to have worked without -d / even in 2006: [2], [3]. I guess that simply nobody asked the right question... -- Lahwaacz (talk) 12:30, 16 October 2015 (UTC)
Oops, it does not work without -d /. Then the problem must be on aria's side, which expects a file name for the -o option, which is then catenated with -d into the full path. Assuming that -d defaults to the cwd, /var/cache/ would appear twice in the result. -- Lahwaacz (talk) 12:43, 16 October 2015 (UTC)

pacman cache

I still think we should warn people not to symlink /var or anything under it. It leaves the whole system unusable because if the cache disappears during a pacman transaction, you're left with missing /usr/lib libraries, and nothing works, including pacman itself. This is a serious enough problem that it can take hours to figure out how to recover. If the wiki had mentioned this problem it would have saved me a lot of time and effort, and I'm not the only one who has run in to this. It is not, however, considered a bug. See https://bugs.archlinux.org/task/50298. JimRees (talk) 23:15, 29 April 2017 (UTC)

This revisions says that: [4]. But to make it more clear: [5] -- Rdeckard (talk) 00:13, 30 April 2017 (UTC)
Actually, I undid my change since I think that first change is more accurate (mentioning /var/cache/pacman/pkg and ancestors), so I went back to that but explicitly mentioned /var as an example. -- Rdeckard (talk) 01:11, 30 April 2017 (UTC)
Thanks for the background information. I was not aware of the bug report and now clearly understand why you altered the section the way you did. I hope the recent change is sufficient for you. Since every misbehaving program might leave a system unbootable if it plays a role in the boot process, it should be unnecessary to add this redundant information. However the problem you described is still severe and I hope you agree that the recent edits made to the article do the topic justice. Thanks for clarifying the topic and adding this to the article and sorry for reverting your edits at first. -- Edh (talk) 21:07, 30 April 2017 (UTC)

How to check if a pacman frontend is doing partial upgrades?

How to know that a pacman frontend like pamac or octopi is doing partial upgrades? Because I didn't know they were doing it. So how can I check?

I installed kulu finally but octopi has a octopi-notifier an can be used as notifier only for example. So I should be able to link octopi-notifier as it is harmless for the system?

Noraj (talk) 17:10, 20 May 2017 (UTC)

Not much you can do besides check the code, or find out that the sync db is in an inconsistent state after the partial upgrade was done (as in any .so bump causing programs to fail). For octopi there's this github issue which explains how the program does partial upgrades by design. Unsurprisingly, octopi-notifier does the exact same thing. [6] -- Alad (talk) 18:39, 20 May 2017 (UTC)

How and when exactly does pamac do partial upgrades?

This link doesn't really explain much (sorry if I'm missing out on something obvious). I don't want to keep using it if there's an obvious problem, but so far I haven't encountered any problems that would come up due to partial upgrades.

I've tried searching for some information on this but I didn't find much. The only real answer I found was this, which says that they always do full updates.

So I'm kind of confused about how pamac does partial upgrades. Is there some specific condition in which it does them, or does it do them constantly, or does it just not do them? Tomaszal (talk) 23:04, 25 July 2017 (UTC)

If you do pacman -Sy and then pacman -S package, that's a partial upgrade. The function start_refresh is equivalent to pacman -Sy and the problem is that it is setting up the user for a partial upgrade the next time he installs a package, since that function is run just to check if there are updates. That's my analysis at least. -- Rdeckard (talk) 12:23, 26 July 2017 (UTC)
Okay, thanks for the explanation. Is there a reason for pamac to do things that way though? Because otherwise it's a really great graphical front-end and I couldn't find anything that compares to it (except for maybe octopi, but that has the same issue obviously). Tomaszal (talk) 12:50, 26 July 2017 (UTC)
It's not a problem in Manjaro since that distribution updates their repositories approximately once a month. Since Manjaro is the target audience of the software, my guess is that the authors didn't bother with a clever mechanism as checkupdates did.
However, as they seem oblivious to the implications for Arch users (or the general definition of "partial update"), you might want to add something to the linked bug report. -- Alad (talk) 13:06, 26 July 2017 (UTC)
That would explain why I didn't have any issues, as I only used pamac on Manjaro. I was planning on using it on Arch, but I guess I'll hold off from doing that for now.
Thanks for your comments on this. I expressed my thoughts about this on the same bug report. Hopefully the developers won't ignore it and do something about the issue. Tomaszal (talk) 16:21, 26 July 2017 (UTC)
[7] seems to handle the issue. Could you test if it works properly? (e.g, by having pamac check for upgrades on an outdated database and see if pacman -Su remains empty) -- Alad (talk) 19:27, 6 August 2017 (UTC)
Anyone checked? Is that still the case? Noraj (talk) 20:02, 22 March 2018 (UTC)

Tablify utilities

User:Svito/Package manager

Summary:

  • tablify, document AppStream, Flatpak, fwupd and AUR support
  • add warnings to Graphical utilities that replace pacman in one way or another
  • merge back other graphical utilities and update notifiers from AUR helpers

-- Svito (talk) 20:43, 13 September 2018 (UTC)

Related changes to be done to AUR helpers:
-- Svito (talk) 19:26, 18 September 2018 (UTC)
I'm principally against this change since graphical AUR helpers are documented on ArchWiki only to warn users on their nefarious behavior, not because they are useful in any way. It took significant effort to stop most of them from doing partial upgrades, besides other issues such as widely opening up system permissions. (Latter even applies to "official" GUIs without AUR support, see FS#50459).
Moving these projects outside AUR helpers would portray them as legitimate or supported. Adding strange comments like "developed for manjaro" doesn't change anything there. -- Alad (talk) 10:47, 20 September 2018 (UTC)