6

Whenever I use yaourt -Syua in my Manjaro Linux system, it'll give me

Edit PKGBUILD ? [Y/n] ("A" to abort)

and sometimes

Edit chromium-pepper-flash.install ? [Y/n] ("A" to abort)

Somewhere I read to just say no to editing these files.

The wiki : https://wiki.archlinux.org/index.php/PKGBUILD

Says the PKGBUILD is just some switches to alter when installing, so is it alright to just leave it default?

I haven't found information about the .install files, what are they?

9

Why don't you thoroughly read the wiki page that you linked:

Packages in Arch Linux are built using the makepkg utility and information stored in PKGBUILDs. When makepkg is run, it searches for a PKGBUILD in the current directory and follows the instructions therein to either compile or otherwise acquire the files to build a package file

Therefore, PKGBUILD is a "recipe" for creating a package (similar to a RPM spec, gentoo ebuild etc). Sometimes, when a package is installed/removed/upgraded, it may require some scripts/programs to be automatically executed before/after the package files are written to/removed from disk so an additional "recipe" is needed, i.e. .install (excerpt from the same link):

install

The name of the .install script to be included in the package. pacman has the ability to store and execute a package-specific script when it installs, removes or upgrades a package. The script contains the following functions which run at different times:

pre_install - The script is run right before files are extracted. One argument is passed: new package version.
post_install - The script is run right after files are extracted. One argument is passed: new package version.
pre_upgrade - The script is run right before files are extracted. Two arguments are passed in the following order: new package version, old package version.
post_upgrade - The script is run after files are extracted. Two arguments are passed in the following order: new package version, old package version.
pre_remove - The script is run right before files are removed. One argument is passed: old package version.
post_remove - The script is run right after files are removed. One argument is passed: old package version.

Usually, you edit PKGBUILD to customize the way the package is built (e.g. add/remove --configure options, change install prefix, patch the source code, exclude files from the package etc). Likewise, you edit .install to add or remove commands that should be automatically executed before/after a package install/upgrade/removal.
I'd say it's good practice to open those files when prompted and read their content just to make sure everything is OK.

|improve this answer|||||
2

If you want install a package that is available only from AUR, yaourt will download the desired package's PKGBUILD (and maybe some other files) and with PKGBUILD (the makepkg program) will build the package so you can install it.

If you'll need you can edit the PKGBUILD but I think in the most cases it's unnecessary. If you don't want this question (and always answer YES), you can do: place into /etc/yaourtrc the next line:

EDITFILES=0

I'm using some packages from AUR and I never needed to edit PKGBUILD.

Edit: this prevents only the question about editing PKGBUILD. You have chance of interrupt of installing unsupported packages from AUR and you can check PKGBUILD before building and installing of package.

|improve this answer|||||
  • 1
    You may not need to edit it, but you should read every PKGBUILD before installing anything from the AUR... – jasonwryan May 22 '13 at 19:47
  • You are recommending that people install unsupported software without bothering to see what it is going to do. That is, IMO, irresponsible. – jasonwryan May 23 '13 at 8:34
  • No, I didn't recommend this. I recommend that doesn't need edit PKGBUILD (most cases). With default yaourtrc and with my recommendation yaourt will ask if you want really build the package and really want to install, so you can choice answer "no" and check PKGBUILD. – uzsolt May 23 '13 at 8:45
  • Then edit your answer to remove the recommendation to blindly install from the AUR... – jasonwryan May 23 '13 at 9:19
  • @jasonwryan You may not need to edit source code, either, and while it'd be great to read every line before installing anything, there is a point to where you end up having to trust trust. If you're not scrutinizing the source, then there's not really much more to lose by blindly accepting PKGBUILD. – SpellingD Oct 14 '15 at 4:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.