LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   Emerge - check if package is installed (https://www.linuxquestions.org/questions/gentoo-87/emerge-check-if-package-is-installed-869126/)

SkyerSK 03-17-2011 04:49 AM

Emerge - check if package is installed
 
Hello,
I have installed Qt 4.7.2 manually yesterday, but when I want to install some other applications or libs, emerge always want me to install qt-core. (of older version).

Is there any way to make emerge consider qt as installed? or just to check some path and actually find, that it is installed.

Thanks

andrewthomas 03-17-2011 10:00 AM

Quote:

Originally Posted by SkyerSK (Post 4293591)
Hello,
I have installed Qt 4.7.2 manually yesterday, but when I want to install some other applications or libs, emerge always want me to install qt-core. (of older version).

Is there any way to make emerge consider qt as installed? or just to check some path and actually find, that it is installed.

Thanks

Why didn't you just unmask qt-core-4.7.2 and emerge it?

SkyerSK 03-17-2011 02:06 PM

I've got very slow and limited internet connection here (on target computer), so I downloaded qt, KDE, and everything bigger from the other place. (I was also looking for some Linux software dvds, but that's different topic.)

andrewthomas 03-17-2011 02:57 PM

If you need to download from another machine you can get the files from ftp://ftp.osuosl.org/pub/gentoo/distfiles/ or whatever mirror you choose.

For example, for qt

ftp://ftp.osuosl.org/pub/gentoo/dist...c-4.7.2.tar.gz

Then, put it in /usr/portage/distfiles/

SkyerSK 03-18-2011 08:49 AM

Thanks,
I already figured that out myself, but I was interested if it's not possible to do the thing I mentioned before. I was introduced of portage as being highly configurable and advanced package manager, so I wonder where does it store informations about installed software and corresponding paths.

fancylad 03-21-2011 05:34 PM

The best way might be to create your own qt-core-4.7.2 and then install it with emerge.

i92guboj 03-22-2011 02:43 AM

Quote:

Originally Posted by SkyerSK (Post 4294242)
I've got very slow and limited internet connection here (on target computer), so I downloaded qt, KDE, and everything bigger from the other place. (I was also looking for some Linux software dvds, but that's different topic.)

I might not be getting your point, but, the size of QT is the same with independence on how you install it. So, to answer your question, yes, there's a way to tell portage you installed a package without portage. It's /etc/portage/profile/package.provided, for example, you would add into that file this line:

Code:

x11-libs/qt-core
But, I completely advise against that. What you should do instead is to download the source package and put it into /usr/src/distfiles/. If portage can find it there it won't try to download it again (as long as the checksums are ok).

You can use this command to see the needed files:

Code:

emerge -pf qt-core
Note them down, then download them elsewhere and copy them to your local repository, in the place I told you above. If the version is the same you might be able to re-use the source packages you already have.

---------- Post added 22nd Mar 2011 at 09:44 ----------

Quote:

Originally Posted by fancylad (Post 4298527)
The best way might be to create your own qt-core-4.7.2 and then install it with emerge.

No ebuild with shorten the size of qt-core.

SkyerSK 04-21-2011 03:20 AM

Thanks for your answer,
what I tried to tell is that by the time I was trying to install Qt, I didn't know the possibility to download files from /distfiles/ directory on FTP server, so I decided to download Qt from it's official site, and install it by hand.

i92guboj 04-21-2011 06:30 AM

I understood, but still it's not the cleanest way to do so in Gentoo. It's not only about portage being aware of the package you installed by hand, but also about the rest of your user land having to live with such software. Note that in most distros, leftovers from source/lib packages are not -potentially- as harmful as they are in Gentoo, being it a source based meta-distro. If you install qt-core by hand and you are not carefull enough to preserve the build tree (so you can make uninstall or similar) you will be leaving bits and pieces behind each time you upgrade qt-core, or whenever you decide to go from your manually installed qt-core to the portage one.

One day you might be wondering why package-X doesn't compile against your newly installed qt-core version that it requires when it's really trying to compile and/or link against the old pieces lying around in your system. And compilation errors are -usually- explicit enough and easy to diagnose, but there are some more obscure things that can happen and that are harder to diagnose, requiring to dive into strace, dbg or similar tools to find what is causing some odd runtime error on something that should just work.

SkyerSK 04-21-2011 08:43 AM

Thanks for explanation,
I'm already using portage's one, and understand the reasons. As I said that time I was (I thought I was) forced to do that, because I didn't know about availability of files through FTP, and had slow internet connection.


All times are GMT -5. The time now is 09:16 PM.