You are not logged in.

#1 2015-01-14 20:03:50

maggie
Member
Registered: 2011-02-12
Posts: 255

Install only missing members from a group [SOLVED]

Is there a commend to install only missing members from a group? For example, I need to make sure I have base-devel install since I am missing some of the members, but this command will force a redownload of all members. I just want to install those that are missing.

# pacman -S base-devel
:: There are 25 members in group base-devel:
:: Repository core
   1) autoconf  2) automake  3) binutils  4) bison  5) fakeroot  6) file  7) findutils  8) flex  9) gawk  10) gcc  11) gettext
   12) grep  13) groff  14) gzip  15) libtool  16) m4  17) make  18) pacman  19) patch  20) pkg-config  21) sed  22) sudo
   23) texinfo  24) util-linux  25) which

Enter a selection (default=all): 
warning: file-5.21-3 is up to date -- reinstalling
warning: findutils-4.4.2-6 is up to date -- reinstalling
warning: gawk-4.1.1-1 is up to date -- reinstalling
warning: gettext-0.19.3-1 is up to date -- reinstalling
warning: grep-2.21-1 is up to date -- reinstalling
warning: gzip-1.6-1 is up to date -- reinstalling
warning: libtool-2.4.4-2 is up to date -- reinstalling
warning: pacman-4.2.0-5 is up to date -- reinstalling
warning: sed-4.2.2-3 is up to date -- reinstalling
warning: sudo-1.8.11.p2-1 is up to date -- reinstalling
warning: texinfo-5.2-3 is up to date -- reinstalling
warning: util-linux-2.25.2-1 is up to date -- reinstalling
warning: which-2.20-7 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (29) gc-7.4.2-2  guile-2.0.11-2  libatomic_ops-7.4.2-1  libmpc-1.0.2-2  autoconf-2.69-2  automake-1.14.1-1
              binutils-2.25-1  bison-3.0.2-1  fakeroot-1.20.2-1  file-5.21-3  findutils-4.4.2-6  flex-2.5.39-1  gawk-4.1.1-1
              gcc-4.9.2-2  gettext-0.19.3-1  grep-2.21-1  groff-1.22.3-2  gzip-1.6-1  libtool-2.4.4-2  m4-1.4.17-1  make-4.1-1
              pacman-4.2.0-5  patch-2.7.1-3  pkg-config-0.28-2  sed-4.2.2-3  sudo-1.8.11.p2-1  texinfo-5.2-3
              util-linux-2.25.2-1  which-2.20-7

Total Download Size:    43.48 MiB
Total Installed Size:  185.00 MiB
Net Upgrade Size:      143.95 MiB

:: Proceed with installation? [Y/n] 

Last edited by maggie (2015-01-14 20:33:57)

Offline

#2 2015-01-14 20:13:27

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Install only missing members from a group [SOLVED]

--needed

I was tempted to RTFM you, but I faced the same dilemma at one point and couldn't [easily] find a solution in pacman(8). Think I searched for re-install instead of reinstall. hmm Also, techcically without --needed the packages wouldn't be redownloaded unless they aren't in your cache.

Last edited by alphaniner (2015-01-14 20:18:40)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2015-01-14 20:17:37

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 468

Re: Install only missing members from a group [SOLVED]

you can "enter your selection" instead of the default.

ezik

Offline

#4 2015-01-14 20:33:37

maggie
Member
Registered: 2011-02-12
Posts: 255

Re: Install only missing members from a group [SOLVED]

Thanks for the --needed smile

The man page doesn't really connect that to the switch for me

--needed
Do not reinstall the targets that are already up-to-date.

Last edited by maggie (2015-01-14 20:37:50)

Offline

#5 2015-01-14 20:57:26

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

Re: Install only missing members from a group [SOLVED]

You should suggest a better phrasing then. The current description is OK for me.

Offline

#6 2015-01-14 20:59:20

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Install only missing members from a group [SOLVED]

Actually, I think that threw me too when the option was pointed out to me. IMO it would be better to say 'Do not reinstall packages that are already up-to-date'.

And technically 'targets' here doesn't necessarily correspond to 'targets' here:

SYNOPSIS
       pacman <operation> [options] [targets]

But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#7 2015-01-14 23:19:53

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

Re: Install only missing members from a group [SOLVED]

I found only https://bugs.archlinux.org/task/23123 but maybe there was a discussion e.g. on the ML wrt to the word 'target'.

alphaniner wrote:

And technically 'targets' here doesn't necessarily correspond to 'targets' here:

SYNOPSIS
       pacman <operation> [options] [targets]

Why not?

Offline

#8 2015-01-15 14:13:43

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Install only missing members from a group [SOLVED]

karol wrote:

Why not?

If I run 'pacman -S --needed base-devel', 'base-devel' is '[targets]'. But then 'targets' as used in the description of --needed means something else.

It's nitpicky and people should be able to work it out (no offense to maggie), but still it seems replacing 'targets' with 'packages' in the description of --needed would add clarity without sacrificing anything.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#9 2015-01-15 14:51:52

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: Install only missing members from a group [SOLVED]

alphaniner,

In 'pacman -S --needed base-devel' 'base-devel' is not 'targets', base-devel is goup of targets, the command is just a lazy way of specifying packages to install.

Offline

#10 2015-01-15 15:15:08

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Install only missing members from a group [SOLVED]

I guess my overall point is that I think it's ambiguous and technically incorrect to talk about targets being installed (or some variant). Pacman operates on targets but installs packages. The '--needed' description is the only place in the manual where targets are said to be installed (etc). Admittedly the remove options are not so uniform, with the description of two options referring to removing targets.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#11 2015-01-15 15:15:52

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Install only missing members from a group [SOLVED]

bstaletic wrote:

In 'pacman -S --needed base-devel' 'base-devel' is not 'targets', base-devel is goup of targets

No, not really. The point of using the term "targets" rather than "packages" is because arguments might not be packages, for example a group (base-devel) or a virtual provider (smtp-server). Phrased differently, base-devel is a target which resolves to a group of packages.

Last edited by falconindy (2015-01-15 15:16:14)

Offline

#12 2015-01-15 15:29:50

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Install only missing members from a group [SOLVED]

falconindy wrote:
bstaletic wrote:

In 'pacman -S --needed base-devel' 'base-devel' is not 'targets', base-devel is goup of targets

No, not really. The point of using the term "targets" rather than "packages" is because arguments might not be packages, for example a group (base-devel) or a virtual provider (smtp-server). Phrased differently, base-devel is a target which resolves to a group of packages.

I agree with alphaniner. The target is a group. If --needed didn't re-install targets, then --needed should not install anything from that target, if the target is present (a package in a group of packages is presend, group is present, target is present). The phrasing bears a certain ambiguity, because it is not documented when a group is present. Now we know, that a group internally expands to a list of targets.

Then again, my brain did not even try to resolve what target might mean and I would have suggested a simple test, because you can always press 'n', if the result is not desired.

Last edited by Awebb (2015-01-15 15:30:15)

Offline

Board footer

Powered by FluxBB