You are not logged in.

#1 2013-11-17 16:26:03

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

[solved] Limit to the pacman command line buffer?

Is there such a thing as a limit to the number of characters in a pacman command line?

It's easy enough to get past this with multiple calls to pacman but presents a problem with archiso where the apps are all listed in a single file that is used to call pacman only once. I might add that I'm using local repos in both instances below.

The code below run as a single call to pacman...

pacman -S                           \     
galculator                          \
gnumeric                            \
gimp                                \   
   gksu                             \           
          gnome-specimen-light      \
gnome-system-monitor

...produced the error below...

error: target not found:  

galculator v2.1.2, (c) 2002-2013 Simon Flöry

Usage: galculator [options]

options:
(GTK options)
 -h, --help		Show this usage message
 -v, --version		Show version information

Compiled against GTK version 3.8.2
Linked against GTK version 3.10.3
Quad-precision floating point numbers.
/tmp/xxx: line 7: gnome-specimen-light: command not found

...but running the script with multiple calls to pacman...

pacman -S galculator
pacman -S gnumeric
pacman -S gimp
pacman -S    gksu     
pacman -S           gnome-specimen-light
pacman -S gnome-system-monitor

...everyting gets installed...

warning: galculator-2.1.2-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Packages (1): galculator-2.1.2-1

Total Installed Size:   1.03 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                 [##################################] 100%
(1/1) checking package integrity                               [##################################] 100%
(1/1) loading package files                                    [##################################] 100%
(1/1) checking for file conflicts                              [##################################] 100%
(1/1) checking available disk space                            [##################################] 100%
(1/1) reinstalling galculator                                  [##################################] 100%
warning: gnumeric-1.12.8-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Packages (1): gnumeric-1.12.8-1

Total Installed Size:   32.30 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                 [##################################] 100%
(1/1) checking package integrity                               [##################################] 100%
(1/1) loading package files                                    [##################################] 100%
(1/1) checking for file conflicts                              [##################################] 100%
(1/1) checking available disk space                            [##################################] 100%
(1/1) reinstalling gnumeric                                    [##################################] 100%
warning: gimp-2.8.8-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Packages (1): gimp-2.8.8-1

Total Installed Size:   64.69 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                 [##################################] 100%
(1/1) checking package integrity                               [##################################] 100%
(1/1) loading package files                                    [##################################] 100%
(1/1) checking for file conflicts                              [##################################] 100%
(1/1) checking available disk space                            [##################################] 100%
(1/1) reinstalling gimp                                        [##################################] 100%
warning: gksu-2.0.2-4 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Packages (1): gksu-2.0.2-4

Total Installed Size:   0.05 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                 [##################################] 100%
(1/1) checking package integrity                               [##################################] 100%
(1/1) loading package files                                    [##################################] 100%
(1/1) checking for file conflicts                              [##################################] 100%
(1/1) checking available disk space                            [##################################] 100%
(1/1) reinstalling gksu                                        [##################################] 100%
warning: gnome-specimen-light-0.4-2 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Packages (1): gnome-specimen-light-0.4-2

Total Installed Size:   0.20 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                 [##################################] 100%
(1/1) checking package integrity                               [##################################] 100%
(1/1) loading package files                                    [##################################] 100%
(1/1) checking for file conflicts                              [##################################] 100%
(1/1) checking available disk space                            [##################################] 100%
(1/1) reinstalling gnome-specimen-light                        [##################################] 100%
warning: gnome-system-monitor-3.10.1-1 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Packages (1): gnome-system-monitor-3.10.1-1

Total Installed Size:   4.53 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                 [##################################] 100%
(1/1) checking package integrity                               [##################################] 100%
(1/1) loading package files                                    [##################################] 100%
(1/1) checking for file conflicts                              [##################################] 100%
(1/1) checking available disk space                            [##################################] 100%
(1/1) reinstalling gnome-system-monitor                        [##################################] 100%

Last edited by KairiTech (2013-11-17 17:12:40)

Offline

#2 2013-11-17 16:47:42

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: [solved] Limit to the pacman command line buffer?

There is likely a limit, but that's not what the problem is here. Highlight the text in the codeblock:

KairiTech wrote:
pacman -S                           \     
galculator                          \
gnumeric                            \
gimp                                \   
   gksu                             \           
          gnome-specimen-light      \
gnome-system-monitor

You are including spaces after the backslashes on multiple lines, so you are not escaping the newlines but only the spaces. The first line simply calls pacman with a space, which is why you get "target not found" (there is no package named " ") instead of "no targets specified".
The next line invokes galculator with gnumeric, gimp and " " as arguments, etc.

Incidentally, if you need to deal with long package lists, you can pipe them via other commands or from files, e.g.

pacman -S - < /path/to/file/list
cmd_that_prints_long_list | pacman -S -

My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2013-11-17 17:15:18

KairiTech
Member
From: Toronto, Canada
Registered: 2011-06-04
Posts: 275

Re: [solved] Limit to the pacman command line buffer?

Xyne wrote:

You are including spaces after the backslashes on multiple lines, so you are not escaping the newlines but only the spaces.

Thanks. I should have know better because I've been stung so many time my zeros and blank spaces before...LOL

Offline

Board footer

Powered by FluxBB