Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | pacman_package_manager [2022/08/10 05:41] (current) – created atari | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Pacman (Package Manager) ====== | ||
+ | |||
+ | Underneath the surface, most things in [[: | ||
+ | |||
+ | <WRAP center round important> | ||
+ | It is important to note that although this is pacman, and Arch Linux uses pacman to install //its// packages, it does not mean that you can install packages designed for Arch Linux inside of Batocera. It's the same tool, but the packages themselves must be made to be compatible with Batocera, not just Arch Linux/other distribution that uses pacman. | ||
+ | </ | ||
+ | |||
+ | Obviously, packages hosted by Batocera **will never include copyrighted material** – only freeware or shareware ROMs, homebrews, free games, themes, free musical themes and so on. It's a way to easily customize your Batocera to fit better with your needs. | ||
+ | |||
+ | The advantages of using a package manager are: | ||
+ | * one package contains all the files needed: ROM, scraped metadata, update in the gamelist.xml... | ||
+ | * you can install packages directly from the Internet | ||
+ | * you can update them when a new release of the package is available | ||
+ | * you can easily remove packages that you don't want any longer | ||
+ | * dependencies are automatically resolved | ||
+ | |||
+ | Pacman was chosen because it is lightweight, | ||
+ | |||
+ | From a technical perspective, | ||
+ | |||
+ | ===== Pacman via SSH ===== | ||
+ | |||
+ | Batocera provides a full UI in EmulationStation to manage your pacman packages from **UPDATES & DOWNLOADS** -> **CONTENT DOWNLOADER**. As an alternative to this, you can utilize the '' | ||
+ | |||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | The first two commands are self-explanatory; | ||
+ | |||
+ | Whenever a package is downloaded and installed, pacman keeps a local cache of the package into ''/ | ||
+ | |||
+ | Finally '' | ||
+ | |||
+ | ===== How can I use pacman as a user? ===== | ||
+ | |||
+ | Users usually need only '' | ||
+ | |||
+ | The first thing to do is to synchronize your local pacman DB with Batocera' | ||
+ | |||
+ | # pacman -Sy | ||
+ | :: Synchronizing package databases... | ||
+ | | ||
+ | |||
+ | Then you can search for all packages available | ||
+ | |||
+ | # pacman -Ss | ||
+ | | ||
+ | | ||
+ | | ||
+ | NES freeware puzzle game - manual provided as a pdf | ||
+ | | ||
+ | Quake game files (shareware version) | ||
+ | |||
+ | You can search from string, like '' | ||
+ | |||
+ | In order to install/ | ||
+ | |||
+ | # pacman -S nes-alter-ego | ||
+ | | ||
+ | | ||
+ | | ||
+ | Total Download Size: 0.40 MiB | ||
+ | Total Installed Size: 0.49 MiB | ||
+ | :: Proceed with installation? | ||
+ | (1/1) checking keys in keyring | ||
+ | (1/1) checking package integrity | ||
+ | (1/1) loading package files | ||
+ | (1/1) checking for file conflicts | ||
+ | (1/1) checking available disk space | ||
+ | (1/1) reinstalling nes-alter-ego | ||
+ | :: Running post-transaction hooks... | ||
+ | (1/1) batocera-install.hook | ||
+ | Entry for Alter_Ego.nes added in / | ||
+ | |||
+ | You game will be added to EmulationStation, | ||
+ | |||
+ | To remove a package: | ||
+ | # pacman -R nes-alter-ego | ||
+ | | ||
+ | | ||
+ | Total Removed Size: 0.47 MiB | ||
+ | :: Do you want to remove these packages? [Y/n] | ||
+ | :: Processing package changes... | ||
+ | (1/1) removing nes-alter-ego | ||
+ | |||
+ | ===== Install, remove and manage packages ===== | ||
+ | |||
+ | The easiest is to install a package from a repository. For example, to install '' | ||
+ | |||
+ | pacman -S nes-alter-ego | ||
+ | |||
+ | It is not necessary to setup a repository to test your own packages (see below about setting up your own repositories). You can simply install or upgrade a local package in .tar.xz format by typing: | ||
+ | |||
+ | | ||
+ | |||
+ | To remove a package, whether it's been installed from a repository or from an individual package, you need to use the '' | ||
+ | |||
+ | | ||
+ | |||
+ | A list of all currently installed packages can be seen with the following: | ||
+ | |||
+ | | ||
+ | | ||
+ | Also, you can see that every package that gets installed (whether from an individual package or from a repository) is copied locally to ''/ | ||
+ | |||
+ | | ||
+ | |||
+ | ===== Manage your own repository ===== | ||
+ | |||
+ | You can use pacman to manage your own library of packages (if you want to add your own ROMs to the free ones distributed by the Batocera game store for example). | ||
+ | |||
+ | In order to do so, you can create a local repository by adding a new section in ''/ | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | Server can be a local directory like ''/ | ||
+ | |||
+ | To add a package to your local repository, copy your new package '' | ||
+ | |||
+ | # repo-add / | ||
+ | | ||
+ | | ||
+ | | ||
+ | -> Computing checksums... | ||
+ | -> Creating ' | ||
+ | -> Creating ' | ||
+ | | ||
+ | |||
+ | Once the package is added to your repo, synchronize your pacman with the latest information by typing '' | ||
+ | |||
+ | To remove a package from your repository, you can use '' | ||
+ | |||
+ | ===== Make your own package ===== | ||
+ | |||
+ | For that, refer to the [[create_pacman_package|" | ||