You are not logged in.

#1 2020-07-19 19:50:54

Toad39
Member
Registered: 2020-07-06
Posts: 60

[SOLVED] Archlinux package categories

Hello,
I am trying to build a ports-like directory for ArchLinux where one can run makepkg in the specified directory and install. In order to be able to find packages more quickly, I would like to be able to have "categories" which the packages are sorted in. There, the user can go into the selected category's directory and find packages relevant to that category. For example, the [firefox] package might be placed under the [web-browser] category. I have the following criteria for a category system:

  • Each package must have exactly one category. As in a directory structure, a file can only be placed under one directory.

  • All official packages must be placed under a category, corresponding with the above rule. AUR packages don't have to, as they are created by the user.

Does such a category system already exist in ArchLinux? Thank you for your consideration.

Last edited by Toad39 (2020-08-20 17:13:46)

Offline

#2 2020-07-19 21:34:49

6ng4n
Member
Registered: 2012-02-07
Posts: 84

Re: [SOLVED] Archlinux package categories

This package is commonly used by app store GUIs: https://www.archlinux.org/packages/extr … ream-data/ . It contains category info for various applications but it might not be complete.

Offline

#3 2020-07-20 12:22:28

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: [SOLVED] Archlinux package categories

Toad39 wrote:

Does such a category system already exist in ArchLinux?

The literal answer is what the previous poster wrote, but I guess you meant whether ArchLinux' package management implements something like that?
AFAIU it does not implement appstream but a different type of categorization, as you can find out by running 'pacman -Qi' on the package in question, and reading the Arch Wiki.

Offline

#4 2020-07-20 17:01:45

Toad39
Member
Registered: 2020-07-06
Posts: 60

Re: [SOLVED] Archlinux package categories

ondoho wrote:

you can find out by running 'pacman -Qi' on the package in question

`pacman -Qi pacman` gives me:

Name            : pacman
Version         : 5.2.2-1
Description     : A library-based package manager with dependency support
Architecture    : x86_64
URL             : https://www.archlinux.org/pacman/
Licenses        : GPL
Groups          : base-devel
Provides        : libalpm.so=12-64
Depends On      : bash  glibc  libarchive  curl  gpgme  pacman-mirrorlist  archlinux-keyring
Optional Deps   : perl-locale-gettext: translation support in makepkg-template
Required By     : arch-install-scripts  base  pacman-contrib  pyalpm  yay
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 4.43 MiB
Packager        : Allan McRae <allan@archlinux.org>
Build Date      : Tue 30 Jun 2020 06:52:38 PM PDT
Install Date    : Tue 14 Jul 2020 07:26:48 PM PDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Although the groups section seems useful, `pacman -Qi tar` gives:

Groups          : None

This wouldn't be ideal, as every package needs to have a category. An example of this would be Gentoo's repository, where each ebuild is under a category, such as `www-client/firefox` or `x11-terms/xterm`.

6ng4n wrote:

This package is commonly used by app store GUIs: https://www.archlinux.org/packages/extr … ream-data/ . It contains category info for various applications but it might not be complete.

The problem with this is that there can be multiple categories for a package. In a hierarchy, this would not be possible as a file cannot be under multiple directories.

I should have made my post more clear about what I wanted. I will be editing it to include these criteria.

Offline

#5 2020-07-20 18:31:04

loqs
Member
Registered: 2014-03-06
Posts: 19,056

Re: [SOLVED] Archlinux package categories

Toad39 wrote:

The problem with this is that there can be multiple categories for a package. In a hierarchy, this would not be possible as a file cannot be under multiple directories.

You can link from the category directory to the PKGBUILD directory e.g.

categories
    foo
        firefox -> ../../packages/firefox
    bar
        firefox -> ../..packages/firefox
packages
    firefox

Offline

#6 2020-07-20 18:35:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Archlinux package categories

Toad39 wrote:

Does such a category system already exist in ArchLinux?

Yes. The categories are : core, extra, community, testing, community-testing.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2020-07-21 04:00:16

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Archlinux package categories

I should note that Gentoo categories are special in that they are part of the name record. You can have both www-client/foo and x11-terms/foo installed at the same time, IIRC. Arch Linux repositories are very different, and are more comparable to overlays. You install core/pacman  by getting the exclusive name record "pacman" from the prioritized "core" overlay of packages.

Meanwhile, the purpose of pacman "group"s are to enable "pacman -S group" and mass-install all those packages in one go. It's only used when that would make sense.

Honestly I'd recommend taking Gentoo's categories and mapping them to arch PKGBUILDs, in order to achieve your own category mappings.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB