Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88565 - package.provided not a good replacement for inject
Summary: package.provided not a good replacement for inject
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 108082
  Show dependency tree
 
Reported: 2005-04-10 03:43 UTC by armin
Modified: 2005-10-16 08:48 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description armin 2005-04-10 03:43:55 UTC
I tried to use the new package.provided facillity and i cound not make it work yet.

Reproducible: Always
Steps to Reproduce:
1. emerge -upD world shows a package i want to handle myself
2. putting the name into package.provided (/etc/portage/profile (with = at the beginning, without, with version, without, any permutation tried)

Actual Results:  
no change in emerge -upD world

Expected Results:  
the same as emerge --inject package-version

Portage 2.0.51.19 (default-linux/x86/2005.0/2.4, gcc-3.3.5,
glibc-2.3.4.20041102-r1, 2.4.28-gentoo-r5 i686)
=================================================================
System uname: 2.4.28-gentoo-r5 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb  7 2005, 12:43:26)]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.4.19-r1, 2.4.21-r1, 2.4.22-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.inode.at/
ftp://gd.tuwien.ac.at/opsys/linux/gentoo/
http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.oregonstate.edu/
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 adns apm arts avi berkdb bitmap-fonts crypt cscope cups emboss encode
foomaticdb fortran gd gdbm gif gpm gtk2 imagemagick imap imlib innodb ipv6 java
jpeg junit libg++ libwww mad mikmod motif mp3 mpeg mysql ncurses nls oggvorbis
opengl oss pam pdflib perl png postgres python quicktime readline samba sdl slang
spell sqlite ssl tcpd tiff truetype truetype-fonts type1-fonts xml xml2 xmms xv
zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-04-10 05:41:30 UTC
Ditto. E.g., if I do

echo "net-ftp/glftpd-1.32-r2" >> /etc/portage/profile/package.provided

because I have patched glftpd-1.32 manually. 

Then:

# emerge -uDpv world

These are the packages that I would merge, in order:

[ebuild     U ] net-ftp/glftpd-1.32-r2 [1.32] 1,934 kB

Hmm. This seems like totally broken feature. Never worked for me. 
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2005-04-10 08:40:51 UTC
Tried unmerging the portage installed (or injected) version first?
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-04-10 08:54:27 UTC
Uhm, that
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2005-04-10 08:54:27 UTC
Uhm, that´s exactly what I am trying to avoid, so that is definitely not the option. 

I simply want portage to think that it has the version in packages.provided installed and not to try to upgrade it or to do anything about it. That should be the purpose of this feature anyway, or have I missed something?
Comment 5 Marius Mauch (RETIRED) gentoo-dev 2005-04-10 09:18:25 UTC
Yes, you've missed something. package.provided is to keep portage informed about software not installed by portage. If you just want to ignore updates you use package.mask.
Yes, I know that --inject was abused for this stuff, however --inject is a nasty hack and not coming back. package.mask is the "correct" solution for ignoring/skipping updates.

Leaving this open for now as I don't know if the original report had the same problem.
Comment 6 armin 2005-04-10 09:58:50 UTC
ad comment #2:

no, but i tried it for not yet merged packages.
Comment 7 armin 2005-04-10 10:01:00 UTC
ad comment #4:

  "package.provided is to keep portage informed about software not installed by portage"

yes that's what i want to use it for. basically i want to have a file where i put packages that emerge does not need to care about. even ignoring the version.

with package.mask i tell emerge not to care about updates. but how do i tell emerge not to care at all?

package.provided does not work in this regard even if some people suggest it in the forums. --inject did work in this regard, so if --inject goes away we *need* a replacement, don't we?

maybe i did not "get it" yet, what package.provided is for, in which mode does emerge use this file or qpkg or anything else...

  emerge -s does not show me the correct version number (of the latest installed version)
  qpkg -I -v does not show it as installed

basically i need a way to fake an installation to protage/emerge and --inject seems to be the only solution yet...
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2005-04-10 10:16:12 UTC
Comment #4: Well, maybe I did not express myself clearly enough. So - I already have glftpd-1.32-r2 (I patched it myself, b/c upgrading this package via portage causes a lot of troubles). So what I want to achieve it that portage "knows" that I have this version installed - even though I installed an older version via portage. 

Yes, I can put it in package.mask in this case, but it would not be useful in other cases, say if something in portage depends on >=package-x.y.x, it would actually block updating other packages that depend on a particular version of this package via portage. These cases might be rare but there certainly are legitimate uses for this. But package.provided does not make this possible, while --inject does. 

Finally, as you can see from Comment #6, this does not even work for packages that have never been installed via portage. Therefore, package.provided cannot be used as a replacement for --inject at all. 
Comment 9 Marius Mauch (RETIRED) gentoo-dev 2005-04-10 11:10:30 UTC
general: package.provided doesn't do the same job as --inject. It tweaks the dependency graph so you can tell portage to use your manually installed versions instead of pulling in portage-provided versions. This means:
a) emerge -s won't show "provided packages" as installed
b) any other tool that scans the installed package database won't list them either (and btw, qpkg is outdated, broken, obsolete and dead, use equery instead)
It isn't a "compatible" replacement if that's what you want. It has a very specific purpose which doesn't cover all possible abuses.

re comment 6: concrete examples?
re comment 7: "I already have glftpd-1.32-r2" - You don't. You might have a version that is equivalent, but it is not the same. Yes, I'm nitpicking here. The effect is that you want portage to ignore that update, nothing more, nothing less (if you want this to fix GLSA-200409-27, just inject that one).
Comment 10 Jason Stubbs (RETIRED) gentoo-dev 2005-04-11 06:55:49 UTC
package.provided serves a very specific purpose. I'm kind of worried about modifying it's behaviour to make it easier because it would blur the lines of its purpose.

If you don't want a system package installed, remove it from system.
If you don't want a world package installed, remove it from world.
If you don't want to upgrade a package, mask the upgrades.
If you want to manage a package outside of portage that other packages might need to depend, use package.provided.

I'm throwing around the idea of adding a package.defer file or similar that will allow upgrades to be skipped, but that will not greatly change the above.
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2005-04-14 03:46:22 UTC
Well, if package.defer would make it possible to install some-strange/package-x via portage and maintain the upgrades outside of portage afterwards, while such package would still satisfy DEPEND=">=some-strange/package-y" it would be probably enough. 
Comment 12 Jason Stubbs (RETIRED) gentoo-dev 2005-04-14 04:02:27 UTC
It would allow that, but why don't you just unmerge the version that portage registers as installed and then put it into package.provided? Why do you want to have something registered as managed by portage that isn't?
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2005-04-14 04:40:23 UTC
Well, because I don
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2005-04-14 04:40:23 UTC
Well, because I don´t want to unmerge it. :-) In some cases (like glftpd or phpBB) it is convenient to emerge them via portage, but it is much less convenient to maintain upgrades via portage.

Is there a way to do a "fake" unmerge? 
Comment 15 Jason Stubbs (RETIRED) gentoo-dev 2005-04-14 05:16:35 UTC
Just unmerge it. Portage won't touch anything where the mtime or md5 of the file has changed. If you are really worried, do:

CONFIG_PROTECT="-* /" CONFIG_PROTECT_MASK="-*" emerge -C ...
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2005-04-14 09:20:45 UTC
OK. Thanks, Jason. I still like the package.defer idea, though. ;-)
Comment 17 Donnie Berkholz (RETIRED) gentoo-dev 2005-05-01 03:25:48 UTC
+1 for defer
Comment 18 Patrizio Bassi 2005-05-06 05:17:16 UTC
sorry...i have a similar trouble.

i use udev and compile kernels from personal patches and sources

so i put in the provided file.

[ebuild  N    ] sys-kernel/gentoo-sources-2.6.11-r7
[ebuild  N    ] sys-fs/devfsd-1.3.25-r8

but portage asks for that still now.
what can i do?
kernel is needed by several packages
Comment 19 Jason Stubbs (RETIRED) gentoo-dev 2005-10-16 08:48:09 UTC
Packages that are in package.provided that are also in system or world are now 
ignored.