On Gentoo, the portage changes for ImageMagick to work are always suggested, even if already applied. While the two extra commands should be harmless, add a check to avoid reporting it without need.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -533,8 +533,19 @@ sub give_gentoo_hints() · 532 unmodified lines | ||
| 533 | 533 | return if (!$need && !$optional); |
| 534 | 534 | |
| 535 | 535 | printf("You should run:\n\n"); |
| 536 | − printf("\tsudo su -c 'echo \"media-gfx/imagemagick svg png\" > /etc/portage/package.use/imagemagick'\n"); | |
| 537 | − printf("\tsudo su -c 'echo \"media-gfx/graphviz cairo pdf\" > /etc/portage/package.use/graphviz'\n"); | |
| 536 | + | |
| 537 | + my $imagemagick = "media-gfx/imagemagick svg png"; | |
| 538 | + my $cairo = "media-gfx/graphviz cairo pdf"; | |
| 539 | + my $portage_imagemagick = "/etc/portage/package.use/imagemagick"; | |
| 540 | + my $portage_cairo = "/etc/portage/package.use/graphviz"; | |
| 541 | + | |
| 542 | + if (qx(cat $portage_imagemagick) ne "$imagemagick\n") { | |
| 543 | + printf("\tsudo su -c 'echo \"$imagemagick\" > $portage_imagemagick'\n") | |
| 544 | + } | |
| 545 | + if (qx(cat $portage_cairo) ne "$cairo\n") { | |
| 546 | + printf("\tsudo su -c 'echo \"$cairo\" > $portage_cairo'\n"); | |
| 547 | + } | |
| 548 | + | |
| 538 | 549 | printf("\tsudo emerge --ask $install\n"); |
| 539 | 550 | |
| 540 | 551 | } |