You are not logged in.

#1 2013-06-09 14:50:57

karol
Archivist
Registered: 2009-05-06
Posts: 25,428

Which packages shouldn't be included in 'depends'?

https://wiki.archlinux.org/index.php/Ar … ld_package says

Before complaining about missing (make) dependencies, remember that the base group is assumed to be installed on all Arch Linux systems. The group "base-devel" is assumed to be installed when building with makepkg.

But https://bugs.archlinux.org/task/26105
https://www.archlinux.org/packages/core/x86_64/libtool/


Similarly, https://wiki.archlinux.org/index.php/PK … akedepends says

The group base-devel is assumed already installed when building with makepkg . Members of "base-devel" should not be included in makedepends arrays.

I know that the wiki is sometimes out of date, can someone please decide how this issue should be settled?

Offline

#2 2013-06-09 14:56:42

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,807
Website

Re: Which packages shouldn't be included in 'depends'?

Correct me if I'm wrong, but is the issue simply that some packages list dependencies "redundantly" when they would not be required to be listed as they are in base{-devel}?

The recommendation that such dependencies should not be listed seems a "style" issue, as listing them does no harm.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#3 2013-06-09 15:02:21

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: Which packages shouldn't be included in 'depends'?

Use common sense. Don't add hundreds of little tools you are using during the build or installation process to the dependency array if they are already required for a sane arch environment. This just increases the workload for pacman during dependency resolution. If you feel that a dependency in the base(devel) group is likely to be removed / not installed by a significant amount of users, add  to your PKGBUILD

Offline

#4 2013-06-09 15:05:39

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,688
Website

Re: Which packages shouldn't be included in 'depends'?

def whatdo(foo):
  if the package requires foo to run:
    add foo to the depends array
  else if the package requires foo to build
    if foo is in the base-devel group:
      do nothing
    else:
      add foo to the makedepends array

As for whether to include dependencies of other dependencies: I include all direct dependencies for logical consistency. Some don't.

For example, if your package depends on foo and bar, but foo also depends on bar, then some people will only include foo. I think this is incorrect because your package should not break if some other package's dependencies change (e.g. due to a rewrite). The overhead of checking for a few more files is trivial.


p.s. Do not assume that the base group is installed. Not all users have the full base group and it is neither required nor expected. This is especially true for minimalist chroots.


progandy wrote:

This just increases the workload for pacman during dependency resolution.

I just don't understand why people are concerned by this. Most of the time dependencies can be resolved by a simple directory listing of the local database as the package names and versions are there. The only real issue are providers which requires pacman to read a file for each package. Even then I would say it's simply poor design for not collecting providers when building the local database.

In my opinion, logical completeness is worth a few extra CPU cycles and IO operations. Taking shortcuts in programming that compromise robustness is poor design.

Offline

#5 2013-06-09 15:21:43

karol
Archivist
Registered: 2009-05-06
Posts: 25,428

Re: Which packages shouldn't be included in 'depends'?

Xyne wrote:

Do not assume that the base group is installed. Not all users have the full base group and it is neither required nor expected. This is especially true for minimalist chroots.

I already know your stance on this :-)
I can obviously follow your suggestion for the PKGBUILDs I create, but what about the others?

https://bugs.archlinux.org/task/25571

karol wrote:

We expect users to have base group installed. Perl is in base group and perl depends on db. Does this mean db should be in base group?

Eric Belanger (Snowman) wrote:

No, as it will be automaticallly installed when the base package which depends on it will be installed. So it doesn't need to be in base group.


I would like to get this straight, if possible, as it could result in long-term reduction of bug reports filled and less grrr all around.
Some reports about adding new dependency are resolved as 'Not a bug' https://bugs.archlinux.org/task/26318 while others (like aforementioned https://bugs.archlinux.org/task/26105 ) are fixed.

Offline

#6 2013-06-09 15:30:33

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,807
Website

Re: Which packages shouldn't be included in 'depends'?

In such a case, if a package requires db, but *not* perl, then it should list db as a dependency.  If a user does not have all of the base group installed, and building PkgX fails due to db not being listed as a dependency, they'd have reason to be confused.

If PkgX depends on perl, though, and perl is not listed, and the user does not have the base group installed, they should be able to figure out and deal with the failed build.

I see this just like keeping unsupported packages installed.  It is not against any rule for me to keep using grub-0.97, but I know that this was my choice and I am responsible for dealing with any issues that arrive from it.  Just the same, no one is *required* to have base and base-devel installed, but if one choses not to have these installed, they should be ready to deal with any resulting issues.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#7 2013-06-09 15:41:11

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,977

Re: Which packages shouldn't be included in 'depends'?

Karol, the original statement you pointed to is outdated. Current devtools only installs the base-devel package, so things in base must be listed or it won't build in a clean chroot. And since base-devel can only be assumed at build time, not run time, you need to list everything that isn't already a dep of a listed package.

Offline

#8 2013-06-09 15:41:15

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,688
Website

Re: Which packages shouldn't be included in 'depends'?

If Arch only officially supports installations with the full base group then it is not as minimalistic and flexible as it claims to be. It also undermines the purpose of the base-devel group.

I'll leave it there to avoid going too far off topic.

Offline

#9 2013-06-09 15:47:14

karol
Archivist
Registered: 2009-05-06
Posts: 25,428

Re: Which packages shouldn't be included in 'depends'?

Trilby wrote:

I see this just like keeping unsupported packages installed.  It is not against any rule for me to keep using grub-0.97, but I know that this was my choice and I am responsible for dealing with any issues that arrive from it.  Just the same, no one is *required* to have base and base-devel installed, but if one choses not to have these installed, they should be ready to deal with any resulting issues.

This may be the prevailing stance among the developers, but why then add and keep dependencies from 'base' in the 'depends'?


https://bugs.archlinux.org/task/26318
inetutils won't be added, because it is in the base group, but bash (also in base group) is listed: https://www.archlinux.org/packages/community/any/abcde/
wget was in the base group at that time https://projects.archlinux.org/svntogit … 3d951b5489 too


I don't want to appear trollish, but have a look at https://bugs.archlinux.org/task/25997

$ file /usr/bin/strace
/usr/bin/strace: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=53fc892bf4679b6733df98b8cc27974076531474, stripped
$ file /usr/bin/strace-graph
/usr/bin/strace-graph: Perl script, ASCII text executable

or https://bugs.archlinux.org/task/25782 where perl is an explicit dependency, unlike in https://bugs.archlinux.org/task/25571 case.

Offline

#10 2013-06-09 16:28:31

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,807
Website

Re: Which packages shouldn't be included in 'depends'?

I think I'm missing something - and to be clear I'm not advocating for this position, nor do I necessarily think it is great - but isn't the idea that base group packages do not need to be listed?  This is different than saying they need to not be listed.  Showing some packages that list them, and others that don't is not evidence that such a rule has been broken, it's only evidence that some packages list these dependencies when they would not be required to.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#11 2013-06-09 16:43:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,428

Re: Which packages shouldn't be included in 'depends'?

foo depends on bar, bar is in the base group and it's not listed as a dependency. Should I open a bug report for this? I don't want to cling to https://bugs.archlinux.org/task/26105 (and probably a few others), but I think we (actually, Arch developers) should decide, because the current unwritten rule seems to be "it depends [on the maintainer]".
This leads to confusion. If we tell people to read the wiki, the wiki should provide correct information - precise and current.

And most importantly: why use tar instead of bsdtar? ;P

Offline

#12 2013-06-09 16:52:42

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,688
Website

Re: Which packages shouldn't be included in 'depends'?

karol wrote:

And most importantly: why use tar instead of bsdtar? ;P

It saves some busy maintainers 3 keystrokes. tongue

Somewhat more seriously, reducing keystrokes is also one of the arguments for omitting deps, as though robustness is not worth typing a few more words. hmm

Offline

#13 2013-06-09 16:58:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,428

Re: Which packages shouldn't be included in 'depends'?

Xyne wrote:

Somewhat more seriously, reducing keystrokes is also one of the arguments for omitting deps, as though robustness is not worth typing a few more words. hmm

That seems to be the case ... mostly. The 'mostly' part is what I'm not happy about.

A somewhat related question: I noticed some packages belong to both base and base-devel: file findutils gawk gettext grep gzip pacman sed texinfo util-linux which.
Why is that?

Offline

#14 2013-06-09 17:00:06

sitquietly
Member
From: Moscow, Tennessee
Registered: 2010-07-12
Posts: 216

Re: Which packages shouldn't be included in 'depends'?

Trilby wrote:

Correct me if I'm wrong, but ..... The recommendation that such dependencies should not be listed seems a "style" issue, as listing them does no harm.

In my experience it is more than a style issue and I think that the rule should be followed:

(1) The depends array should not list members of the the base group.
(2) The makedepends array should not list members of the base-devel group.

Of course if the package is a member of the base or base-devel groups itself then it had better list the other members of the group that it depends on.

One problem I run into when people don't follow the rules is that when rebuilding Archlinux from source code the dependency graph for a set of upgradable packages is far more likely to have unresolvable cycles in it if it runs too low into the tree (into the base groups).  I hate dependency cycles! big_smile  The rules (no core package may depend on an extra or community package, no non-base package lists base packages as dependencies) let us assume that the "operating system" (base + base-devel) can be updated prior to any pending update in the non-base packages.  It is never necessary to update non-base packages first.

Maybe it will help pkgbuild writers to see the lists and try to remember that these packages don't go into the depends/makedepends (of course the list can change). 

$  group base
bash
bzip2
coreutils
cronie
cryptsetup
device-mapper
dhcpcd
diffutils
e2fsprogs
file
filesystem
findutils
gawk
gcc-ada
gcc-fortran
gcc-go
gcc-libs
gcc-objc
gettext
glibc
grep
gzip
heirloom-mailx
inetutils
iproute2
iputils
jfsutils
less
licenses
logrotate
lvm2
man-db
man-pages
mdadm
nano
netctl
pacman
pciutils
pcmciautils
perl
ppp
procps-ng
psmisc
reiserfsprogs
sed
shadow
sysfsutils
systemd-sysvcompat
tar
texinfo
usbutils
util-linux
vi
which
xfsprogs
$  group base-devel
autoconf
automake
binutils
bison
fakeroot
file
findutils
flex
gawk
gcc
gettext
grep
groff
gzip
libltdl
libtool
m4
make
pacman
patch
pkg-config
sed
sudo
texinfo
util-linux
which

That's my 2 cents.

Last edited by sitquietly (2013-06-09 17:05:18)

Offline

#15 2013-06-09 18:08:31

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,977

Re: Which packages shouldn't be included in 'depends'?

sitquietly wrote:

... and I think that the rule should be followed:

(1) The depends array should not list members of the the base group.

And if you do that, a good portion of the packages in the main repos wouldn't build with devtools, which is what is used to build all packages in the repos

My understanding of the current situation is that anything in base-devel can be assumed at build time, anything needed by pacman can be assumed at install time, anything needed at run time needs to be included in the depends array. And, of course, anything listed in the depends array can be assumed at both build time and install time.

I don't know if this is official, though.

Last edited by Scimmia (2013-06-09 18:40:45)

Offline

#16 2013-06-09 20:17:23

sitquietly
Member
From: Moscow, Tennessee
Registered: 2010-07-12
Posts: 216

Re: Which packages shouldn't be included in 'depends'?

Scimmia wrote:
sitquietly wrote:

... and I think that the rule should be followed:

(1) The depends array should not list members of the the base group.

And if you do that, a good portion of the packages in the main repos wouldn't build with devtools, which is what is used to build all packages in the repos.....

I see your point.  They would build just fine, if we assume that the base group is always present.  I think that could work well.  I would suggest that the base group belongs in the chroot:

sudo mkarchroot $CHROOT/root base base-devel

but there has been no consensus that I know of on the definition and use of the base group.

Offline

#17 2013-06-09 20:22:23

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Which packages shouldn't be included in 'depends'?

karol wrote:
Xyne wrote:

Somewhat more seriously, reducing keystrokes is also one of the arguments for omitting deps, as though robustness is not worth typing a few more words. hmm

That seems to be the case ... mostly. The 'mostly' part is what I'm not happy about.

A somewhat related question: I noticed some packages belong to both base and base-devel: file findutils gawk gettext grep gzip pacman sed texinfo util-linux which.
Why is that?

When we made devtools only install base-devel in chroot, we added several base packages to base-devel as they were also commonly used for building packages too.

Several base or base devel packagel depends on base packages because we want to set the order of installation to make them install correctly in an empty chroot. Of course, we try to avoid dependency cycle.

Also, for packages that only depends on base package, I personnally prefer have a dependency on  package instead of an empty or removed depends array. This way you don't need to wonder if the empty/missing depends is a mistake or not.

Offline

#18 2013-06-09 20:30:28

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 4,977

Re: Which packages shouldn't be included in 'depends'?

sitquietly wrote:

I would suggest that the base group belongs in the chroot.

Things are going the other direction, though. The helper scripts (<repo>-<arch>-build) used to install base, but they don't anymore. Things are moving away from assuming base is installed, not toward.

Offline

Board footer

Powered by FluxBB