Skip to content
This repository has been archived by the owner on Aug 9, 2019. It is now read-only.

assume-installed is not working? #175

Closed
madhead opened this issue Nov 8, 2015 · 10 comments
Closed

assume-installed is not working? #175

madhead opened this issue Nov 8, 2015 · 10 comments

Comments

@madhead
Copy link

madhead commented Nov 8, 2015

I have Oracle's JDK installed manually and added to the PATH, so java is available in the system. Now I want to install fritzing, which requires Java to run:

pacman --version                                                                                                                                                   

 .--.                  Pacman v4.2.1 - libalpm v9.0.1
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2014 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
 '--'
                       This program may be freely redistributed under
                       the terms of the GNU General Public License.

yaourt --version                                                                                                                                                
yaourt 1.7

yaourt -S fritzing                                                                                                                                              

...

==> Continue building fritzing ? [Y/n]
==> ----------------------------------
==> 
==> Building and installing package
==> Install or build missing dependencies for fritzing:
:: There are 2 providers available for java-environment:
:: Repository extra
   1) jdk7-openjdk  2) jdk8-openjdk

Enter a number (default=1):

I do not want to install neither jdk7-openjdk nor jdk8-openjdk which both provide java-environment. So I'm trying to use --assume-installed option:

java -version                                                                                                                                                   
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

yaourt -S fritzing --assume-installed jdk8-openjdk
error: no targets specified (use -h for help)

yaourt --assume-installed jdk8-openjdk -S fritzing
error: no targets specified (use -h for help)

yaourt -S --assume-installed java-environment fritzing
error: no targets specified (use -h for help)

yaourt -S --assume-installed java-environment -- fritzing                                                                                                       
error: no targets specified (use -h for help)

All that commands failed. How can I assume that Java is already present on my machine?

@f2404
Copy link
Collaborator

f2404 commented Nov 8, 2015

Can you try it with pacman - will --assume-installed work?
It might be that the option is not passed through by yaourt.

@madhead
Copy link
Author

madhead commented Nov 8, 2015

@f2404, I was able to install package manually (first install boost and qt5-serialport) and then building it with makepkg -srdi. makepkg is checking dependencies on install, so I cancelled it and finished installation with sudo pacman -U --assume-installed java-environment fritzing-0.9.2b-1-x86_64.pkg.tar.xz.

The app looks to be ok: it's working and menu shortcuts are created.

So, I guess valid command with yaourt would be yaourt -S --assume-installed java-environment fritzing.

@f2404
Copy link
Collaborator

f2404 commented Nov 9, 2015

It looks like yaourt is not supporting --assume-installed for both AUR and non-AUR packages; but the errors are different so I guess there are actually 2 issues here (one of them in package-query).

$ yaourt -S --assume-installed sdl_mixer freeciv
resolving dependencies...
looking for conflicting packages...

Packages (4) libmikmod-3.3.7-1  sdl_mixer-1.2.12-4  smpeg-0.4.5-1  freeciv-2.5.1-1
$ yaourt -S --assume-installed boost fritzing
error: no targets specified (use -h for help)

@mrunion
Copy link

mrunion commented Feb 2, 2016

You would be well-served to install the Oracle JDK from the AUR instead of manually. Manually installing packages can (not WILL, but COULD) cause you more trouble down the road. Arch specifically handles Java version and paths in a way that causes little trouble with installed the Oracle JDK or Open JDK versions.

@madhead
Copy link
Author

madhead commented Feb 2, 2016

@mrunion ok then. Is there any way to install packages into specific locations? What I see in man:

-r, --root <path>
           Specify an alternative installation root (default is /). This should not be used as a way to install software into /usr/local instead of /usr. This
           option is used if you want to install a package on a temporarily mounted partition that is "owned" by another system.  NOTE: If database path or log
           file are not specified on either the command line or in pacman.conf(5), their default location will be inside this root path.

is it ok to use -r for current, not another, system?

@larchunix
Copy link
Collaborator

I have opened a PR which should fix your issue. Could you test #225 please ?

@f2404
Copy link
Collaborator

f2404 commented Feb 3, 2016

I think it's still not working for AUR packages...

@larchunix
Copy link
Collaborator

As makepkg checks for dependencies at build time and has no --assume-installed flag, I'm afraid there's nothing we can do on yaourt side for AUR packages.

@f2404
Copy link
Collaborator

f2404 commented Feb 3, 2016

Oh I see.
So the possible way would be to modify PKGBUILD and remove unwanted dependencies during installation.

@larchunix
Copy link
Collaborator

Exactly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants