Skip to content

Commit

Permalink
Move more things to tips&tricks
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Jan 16, 2022
1 parent 5b81183 commit e2fe13a
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 79 deletions.
80 changes: 79 additions & 1 deletion web/docs/package-management-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A list of useful small guides related to package management. See lots more on th
Linux wiki](https://wiki.archlinux.org/title/Pacman/Tips_and_tricks).


#### Show the license information of a package
### Show the license information of a package

To list the license of an installed package you can run:

Expand Down Expand Up @@ -32,3 +32,81 @@ meson /usr/share/licenses/meson/COPYING
Note that not every package includes the license text as a file, nor puts it
in this specific recommended location.


### Listing the content of a package

If you would like to know what has been installed as a part of a specific package use the following command:

`pacman -Ql <name of the package>`

Example:

`$ pacman -Ql mingw-w64-x86_64-pugixml`

```
mingw-w64-x86_64-pugixml /mingw64/
mingw-w64-x86_64-pugixml /mingw64/bin/
mingw-w64-x86_64-pugixml /mingw64/bin/libpugixml.dll
mingw-w64-x86_64-pugixml /mingw64/include/
mingw-w64-x86_64-pugixml /mingw64/include/pugixml-1.8/
mingw-w64-x86_64-pugixml /mingw64/include/pugixml-1.8/pugiconfig.hpp
mingw-w64-x86_64-pugixml /mingw64/include/pugixml-1.8/pugixml.hpp
mingw-w64-x86_64-pugixml /mingw64/lib/
mingw-w64-x86_64-pugixml /mingw64/lib/cmake/
mingw-w64-x86_64-pugixml /mingw64/lib/cmake/pugixml/
mingw-w64-x86_64-pugixml /mingw64/lib/cmake/pugixml/pugixml-config-noconfig.cmake
mingw-w64-x86_64-pugixml /mingw64/lib/cmake/pugixml/pugixml-config.cmake
mingw-w64-x86_64-pugixml /mingw64/lib/pkgconfig/
mingw-w64-x86_64-pugixml /mingw64/lib/pkgconfig/pugixml.pc
mingw-w64-x86_64-pugixml /mingw64/lib/pugixml-1.8/
mingw-w64-x86_64-pugixml /mingw64/lib/pugixml-1.8/libpugixml.dll.a
```

As you can see the package contains:

* a binary executable library file (libpugixml.dll),
* a static library (libpugixml.dll.a),
* 2 header files (pugixml.hpp, pugiconfig.hpp),
* 2 cmake files,
* and a PKGCONFIG file (pugixml.pc).

### Avoiding writing long package names

Use `pacboy` to install **mingw** packages without having to type the long package names (install `pacboy` first using `pacman -S pactoys` if necessary). Examples:

```
$ pacboy -S x265:x
resolving dependencies...
looking for conflicting packages...
Packages (1) mingw-w64-x86_64-x265-2.3-1
Total Download Size: 0.97 MiB
Total Installed Size: 20.72 MiB
:: Proceed with installation? [Y/n]
```
```
$ pacboy -S x265:i
resolving dependencies...
looking for conflicting packages...
Packages (1) mingw-w64-i686-x265-2.3-1
Total Download Size: 0.97 MiB
Total Installed Size: 11.37 MiB
:: Proceed with installation? [Y/n]
```
```
$ pacboy -S x265:m
resolving dependencies...
looking for conflicting packages...
Packages (2) mingw-w64-i686-x265-2.3-1 mingw-w64-x86_64-x265-2.3-1
Total Download Size: 0.97 MiB
Total Installed Size: 32.09 MiB
:: Proceed with installation? [Y/n]
```
78 changes: 0 additions & 78 deletions web/docs/package-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,43 +66,6 @@ or

`pacman -U <packagefile.tar.xz>`

## Listing the content of a package

If you would like to know what has been installed as a part of a specific package use the following command:

`pacman -Ql <name of the package>`

Example:

`$ pacman -Ql mingw-w64-x86_64-pugixml`

```
mingw-w64-x86_64-pugixml /mingw64/
mingw-w64-x86_64-pugixml /mingw64/bin/
mingw-w64-x86_64-pugixml /mingw64/bin/libpugixml.dll
mingw-w64-x86_64-pugixml /mingw64/include/
mingw-w64-x86_64-pugixml /mingw64/include/pugixml-1.8/
mingw-w64-x86_64-pugixml /mingw64/include/pugixml-1.8/pugiconfig.hpp
mingw-w64-x86_64-pugixml /mingw64/include/pugixml-1.8/pugixml.hpp
mingw-w64-x86_64-pugixml /mingw64/lib/
mingw-w64-x86_64-pugixml /mingw64/lib/cmake/
mingw-w64-x86_64-pugixml /mingw64/lib/cmake/pugixml/
mingw-w64-x86_64-pugixml /mingw64/lib/cmake/pugixml/pugixml-config-noconfig.cmake
mingw-w64-x86_64-pugixml /mingw64/lib/cmake/pugixml/pugixml-config.cmake
mingw-w64-x86_64-pugixml /mingw64/lib/pkgconfig/
mingw-w64-x86_64-pugixml /mingw64/lib/pkgconfig/pugixml.pc
mingw-w64-x86_64-pugixml /mingw64/lib/pugixml-1.8/
mingw-w64-x86_64-pugixml /mingw64/lib/pugixml-1.8/libpugixml.dll.a
```

As you can see the package contains:

* a binary executable library file (libpugixml.dll),
* a static library (libpugixml.dll.a),
* 2 header files (pugixml.hpp, pugiconfig.hpp),
* 2 cmake files,
* and a PKGCONFIG file (pugixml.pc).

## Finding dependencies of a package

You can use `pactree` to figure out which packages are needed to make a package working properly:
Expand Down Expand Up @@ -149,47 +112,6 @@ Call `pacman -Fy` to update your package database. To find an exact match, call

Note that this operation only compares the file paths, so proper capitalization and the `.exe` suffix (if applicable) is required.

## Avoiding writing long package names

Use `pacboy` to install **mingw** packages without having to type the long package names (install `pacboy` first using `pacman -S pactoys` if necessary). Examples:

```
$ pacboy -S x265:x
resolving dependencies...
looking for conflicting packages...
Packages (1) mingw-w64-x86_64-x265-2.3-1
Total Download Size: 0.97 MiB
Total Installed Size: 20.72 MiB
:: Proceed with installation? [Y/n]
```
```
$ pacboy -S x265:i
resolving dependencies...
looking for conflicting packages...
Packages (1) mingw-w64-i686-x265-2.3-1
Total Download Size: 0.97 MiB
Total Installed Size: 11.37 MiB
:: Proceed with installation? [Y/n]
```
```
$ pacboy -S x265:m
resolving dependencies...
looking for conflicting packages...
Packages (2) mingw-w64-i686-x265-2.3-1 mingw-w64-x86_64-x265-2.3-1
Total Download Size: 0.97 MiB
Total Installed Size: 32.09 MiB
:: Proceed with installation? [Y/n]
```

## Resources

- [Pacman on ArchWiki](https://wiki.archlinux.org/index.php/Pacman)
Expand Down

0 comments on commit e2fe13a

Please sign in to comment.