First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 133908
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Portage team <dev-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Zac Medico <zmedico@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
binpkg-with-cats.patch All/ ${cat} symlink switch patch Jason Stubbs (RETIRED) 2006-05-28 02:00 0000 4.44 KB Details | Diff
move-from-all script that moves packages from the "All" directory to separate ${CATEGORY} directories patch Zac Medico 2007-10-06 15:17 0000 472 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 133908 depends on: 194552 Show dependency tree
Bug 133908 blocks: 147007
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-05-20 16:19 0000
It's come to my attention that there is a signficat problem with collisions
between packages in $PKGDIR/All that has been agravated by the addition of
new-style virtuals that have the same $P as their non-virtual counterparts.  I
propose that we deprecate the /All directory, put the real files in
$CATEGORY/$P.tbz2, and put symlinks in /All for backward compatibility (if
necessary).

Is this bug severe enough that we need to fix it in 2.1?  I imagine that the
patch won't be disruptive in terms of 2.1 stablization.  Plus, it's not really
a new feature, but a bug fix.  ;)

------- Comment #1 From solar 2006-05-20 16:56:38 0000 -------
This would be a significant feature change and I don't think it should 
be done without lots of testing. Some of the cases off the top of my
head that would need proper testing and probably help from the portage
team would be tools such as eclean, qmerge, genpkgindex,
emerge(-g|-G|-k|-K|-b|-B) to deal with all cases.

As somebody that is currently maintaining ~7000 packages across 66 repos 
I know this change is going to cause alot of problems and am not in favor of
it. 

I see the root of the problem being that virtual/foo.ebuilds should of 
never of been introduced into the tree and should be reverted asap.

------- Comment #2 From Zac Medico 2006-05-20 17:17:58 0000 -------
(In reply to comment #1)
> I see the root of the problem being that virtual/foo.ebuilds should of 
> never of been introduced into the tree and should be reverted asap.

That's another solution that I've considered.  We could simply make a rule that
virtuals can't have the same $PN as their non-virtual counterparts.  For
example, virtual/qmail could be moved to virtual/qmail-virtual or something
like that.

------- Comment #3 From solar 2006-05-20 17:23:06 0000 -------
I realize the chances of reverting virtual/foo.ebuilds are probably
slim to none. So to move fwd without having to make any changes to
portage or any tools.. I'd also propose that we mandate all
virtual/$PVR.ebuild be renamed to virtual/virtual-$PVR.ebuild

------- Comment #4 From Marius Mauch (RETIRED) 2006-05-20 17:33:02 0000 -------
> It's come to my attention that there is a signficat problem with collisions
> between packages in $PKGDIR/All that has been agravated by the addition of
> new-style virtuals that have the same $P as their non-virtual counterparts.  I
> propose that we deprecate the /All directory, put the real files in
> $CATEGORY/$P.tbz2, and put symlinks in /All for backward compatibility (if
> necessary).

Not exactly a new problem, just more apparent with all the new virtuals.

> Is this bug severe enough that we need to fix it in 2.1?  I imagine that the
> patch won't be disruptive in terms of 2.1 stablization.  Plus, it's not really
> a new feature, but a bug fix.  ;)

I wouldn't like this in 2.1. It's not a regression. It's a change in behavior
that might break some setups that rely on the current (mis)design.
Proper fix IMO would be to add an alternate bindbapi implementation (also gives
the chance to use a new container format), but I really suggest that only
regressions and obvious bugfixes are going into release candidates. 

(In reply to comment #1)
> I see the root of the problem being that virtual/foo.ebuilds should of 
> never of been introduced into the tree and should be reverted asap.

I disagree that this is the root problem, it just has made the problem more
apparent. Same discussion as with duplicate packages in general, see past -dev
discussions.
It's the "usual" namespace problem, renaming virtuals will just cover it up to
some degree for a while.

------- Comment #5 From solar 2006-05-20 17:46:42 0000 -------
(In reply to comment #4)
> > It's come to my attention that there is a signficat problem with collisions
> > between packages in $PKGDIR/All that has been agravated by the addition of
> > new-style virtuals that have the same $P as their non-virtual counterparts.  I
> > propose that we deprecate the /All directory, put the real files in
> > $CATEGORY/$P.tbz2, and put symlinks in /All for backward compatibility (if
> > necessary).
> 
> Not exactly a new problem, just more apparent with all the new virtuals.
> 
> > Is this bug severe enough that we need to fix it in 2.1?  I imagine that the
> > patch won't be disruptive in terms of 2.1 stablization.  Plus, it's not really
> > a new feature, but a bug fix.  ;)
> 
> I wouldn't like this in 2.1. It's not a regression. It's a change in behavior
> that might break some setups that rely on the current (mis)design.
> Proper fix IMO would be to add an alternate bindbapi implementation (also gives
> the chance to use a new container format), but I really suggest that only
> regressions and obvious bugfixes are going into release candidates. 

That requires changes to all internal andexternal tools. 
(alot of work and testing)

> (In reply to comment #1)
> > I see the root of the problem being that virtual/foo.ebuilds should of 
> > never of been introduced into the tree and should be reverted asap.
> 
> I disagree that this is the root problem, it just has made the problem more
> apparent. Same discussion as with duplicate packages in general, see past -dev
> discussions.

Have we ever had a conflict where the version numbering were the same?

> It's the "usual" namespace problem, renaming virtuals will just cover it up to
> some degree for a while.

Yes. Returning us to expected behavior causing the least ammount of breakage.
Long run.. Yes it should be readdressed. But really while 2.0 exists I'd hate 
to see two unique methods of handling $PKGDIR/All

------- Comment #6 From Jason Stubbs (RETIRED) 2006-05-20 19:12:31 0000 -------
Another possible workaround would be a RESTRICT="buildpkg".

------- Comment #7 From solar 2006-05-20 21:24:17 0000 -------
(In reply to comment #6)
> Another possible workaround would be a RESTRICT="buildpkg".

I've not tested but I would assume that restricting it would lead to broken 
dep graphs when using the -K/-G options and a given ebuild depends on
virtual/foo.

------- Comment #8 From Simon Stelling (RETIRED) 2006-05-21 02:00:04 0000 -------
(In reply to comment #5)
> Have we ever had a conflict where the version numbering were the same?

Yes. Half of the php stuff fails on this. The transition from dev-php/php to
dev-lang/php was also affected by this. Besides, there are lots of packages
that have exactly the same versions in dev-php{4,5}. 

> > It's the "usual" namespace problem, renaming virtuals will just cover it up to
> > some degree for a while.

I agree with genone here. It should be fixed, but not in 2.1. IMHO it's a
pretty subtile bug we've been living with for years now, there's really no
hurry to get it fixed right now.

------- Comment #9 From Jason Stubbs (RETIRED) 2006-05-21 02:27:37 0000 -------
(In reply to comment #7)
> (In reply to comment #6)
> > Another possible workaround would be a RESTRICT="buildpkg".
> 
> I've not tested but I would assume that restricting it would lead to broken 
> dep graphs when using the -K/-G options and a given ebuild depends on
> virtual/foo.

ACK

------- Comment #10 From Jakub Moc (RETIRED) 2006-05-23 05:18:08 0000 -------
(In reply to comment #3)
> I'd also propose that we mandate all
> virtual/$PVR.ebuild be renamed to virtual/virtual-$PVR.ebuild

+1 on this, since proper fix for this flat namespace issue is not really
trivial... 

------- Comment #11 From Chris Gianelloni (RETIRED) 2006-05-23 06:31:02 0000 -------
I would like to remind you guys that this will affect GRP building.  We can
work around it for the few places where the namespace conflicts, but I'm sure
we're going to hit this sooner or later and it's going to be quite ugly.

As much as I hate hiding problems, I think it might really be a good idea to go
ahead with the virtual renames, until the changes can be made in portage and
all of the tools.

------- Comment #12 From Michael Cummings (RETIRED) 2006-05-23 06:31:38 0000 -------
(In reply to comment #10)
> (In reply to comment #3)
> > I'd also propose that we mandate all
> > virtual/$PVR.ebuild be renamed to virtual/virtual-$PVR.ebuild
> 
> +1 on this, since proper fix for this flat namespace issue is not really
> trivial... 
> 
What about "new" style virtuals that took a similar but slightly different
route? I'm of course speaking for vested intersts - the virtual/perl-* family
:)

------- Comment #13 From Chris Gianelloni (RETIRED) 2006-05-23 06:32:05 0000 -------
oops...

------- Comment #14 From Jason Stubbs (RETIRED) 2006-05-28 02:00:07 0000 -------
Created an attachment (id=87708) [details]
All/ ${cat} symlink switch

Just for kicks, I had a quick go at a patch. This works for local packages, but
there's no support for updating an existing binary repository. The directory
format of PORTAGE_BINHOST also does not allow for a quick fix. There are also a
bunch of tools within portage (quickpkg, fixpackages, etc) that would need to
be updated as well.

In short, I think the moving from All/* to ${CATEGORY}/* is viable, keeping
symlinks in All/ for backward compatibility, but I think it will need a fair
bit of testing and so should wait until 2.2.

------- Comment #15 From Zac Medico 2006-06-23 18:46:16 0000 -------
(In reply to comment #4)
> Proper fix IMO would be to add an alternate bindbapi implementation (also gives
> the chance to use a new container format)

How about if we use a flag such as FEATURES="oldbinrepo" so that people that
rely on the old $PKGDIR/All can delay migration until they're other tools have
been updated for forward compatibility?

------- Comment #16 From solar 2006-06-24 22:55:26 0000 -------
(In reply to comment #15)
> (In reply to comment #4)
> > Proper fix IMO would be to add an alternate bindbapi implementation (also gives
> > the chance to use a new container format)
> 
> How about if we use a flag such as FEATURES="oldbinrepo" so that people that
> rely on the old $PKGDIR/All can delay migration until they're other tools have
> been updated for forward compatibility?

How about inverting that logic so that those wanting newstyle binrepo 
support can enable it? Then we hash out most of the bugs with the tools.
That way we do it without forcing the new behavior on the larger 
majority right away. Eventually obsoleting the newstyle feature when 
we are content.

------- Comment #17 From Zac Medico 2006-06-24 23:20:41 0000 -------
I was thinking FEATURES="oldbinrepo" would be in make.globals.  Either way,
it's essentially the same thing.

How about if we have portage detect the repo format automatically.  That way
the user can use either type of repo transparently (could simply use
$PKGDIR/All to detect the old format).  The feature would control whether an
empty $PKGDIR will default to the old or new format.  Eventually, we can remove
"oldbinrepo" from make.globals so that an empty $PKGDIR defaults to the new
format.  The transition will be transparent for the user (we'll provide a
migration script anyhow, in case a user wants to convert the repo format from
old to new or vice versa).

------- Comment #18 From solar 2006-06-25 13:01:37 0000 -------
seem sane enough to allow for the testing and migration phases.

------- Comment #19 From Zac Medico 2006-07-25 23:18:13 0000 -------
*** Bug 105308 has been marked as a duplicate of this bug. ***

------- Comment #20 From Wolfram Schlich 2006-10-12 02:59:58 0000 -------
Any news on this issue?

------- Comment #21 From Zac Medico 2006-10-14 01:52:50 0000 -------
If we want to aim for maximum compatibility, we can keep the existing
repository format (mostly), and only put tbz2 files directly in
$PKGDIR/${CATEGORY}/${PF}.tbz2 when a collision occurs.

------- Comment #22 From Zac Medico 2006-10-16 02:01:21 0000 -------
This is fixed in svn r4722.  Collisions are in ${PKGDIR}/All/ are prevented by
automatically bumping colliding packages to ${PKGDIR}/${CATEGORY}/ just before
a collision would occur.  Newly built packages are always stored in
${PKGDIR}/All/, so this should this be 100% compatible with previous behavior.

------- Comment #23 From Zac Medico 2006-10-16 19:40:31 0000 -------
This has been released in 2.1.2_pre3-r3.

------- Comment #24 From Ulrich Müller 2007-09-30 10:44:50 0000 -------
Is the following the intended behaviour?

# emerge =app-emacs/gentoo-syntax-1.7
[...]
# cd /usr/portage/packages; ls -l */gentoo-syntax*
-rw-r--r-- 1 root root 39828 Sep 30 12:29 All/gentoo-syntax-1.7.tbz2
lrwxrwxrwx 1 root root    29 Sep 30 12:29 app-emacs/gentoo-syntax-1.7.tbz2 ->
../All/gentoo-syntax-1.7.tbz2

Emerging a package with the same name, but from a different category will move
the existing binpkg from All to $CATEGORY:

# emerge =app-xemacs/gentoo-syntax-1.7
[...]
# cd /usr/portage/packages; ls -l */gentoo-syntax*
-rw-r--r-- 1 root root 46428 Sep 30 12:30 All/gentoo-syntax-1.7.tbz2
-rw-r--r-- 1 root root 39828 Sep 30 12:29 app-emacs/gentoo-syntax-1.7.tbz2
lrwxrwxrwx 1 root root    29 Sep 30 12:30 app-xemacs/gentoo-syntax-1.7.tbz2 ->
../All/gentoo-syntax-1.7.tbz2

And emergeing the old one again will result in another move:

# emerge =app-emacs/gentoo-syntax-1.7
[...]
a1iulm2 packages # cd /usr/portage/packages; ls -l */gentoo-syntax*
-rw-r--r-- 1 root root 39820 Sep 30 12:31 All/gentoo-syntax-1.7.tbz2
lrwxrwxrwx 1 root root    29 Sep 30 12:31 app-emacs/gentoo-syntax-1.7.tbz2 ->
../All/gentoo-syntax-1.7.tbz2
-rw-r--r-- 1 root root 46428 Sep 30 12:30 app-xemacs/gentoo-syntax-1.7.tbz2

IMHO, this is not very transparent. Wouldn't it make more sense to implement it
as it was suggested in comment #17? And eventually drop $PKGDIR/All/
completely?

------- Comment #25 From Zac Medico 2007-09-30 16:30:55 0000 -------
(In reply to comment #24)
> IMHO, this is not very transparent. Wouldn't it make more sense to implement it
> as it was suggested in comment #17? And eventually drop $PKGDIR/All/
> completely?

That's the plan. However, current PORTAGE_BINHOST support relies on the All/
format. Of course, collisions are still a problem for the old PORTAGE_BINHOST
protocol, but that's just how it is. We currently have experimental new
PORTAGE_BINHOST support (in trunk) and the packages go into ${CATEGORY}
directories by default. It just hasn't been released yet.

------- Comment #26 From Chris Gianelloni (RETIRED) 2007-10-02 19:49:27 0000 -------
Is there a bug for the new support?  Anything that makes the current situation
better would be a major boon for Release Engineering.

------- Comment #27 From Zac Medico 2007-10-02 20:42:10 0000 -------
I've just filed bug #194552 for the PORTAGE_BINHOST issue.

------- Comment #28 From Zac Medico 2007-10-06 15:17:10 0000 -------
Created an attachment (id=132740) [details]
script that moves packages from the "All" directory to separate ${CATEGORY}
directories

This script might be useful for people who are bothered by the behavior
described in comment #24. Versions of portage since 2.1.2.x can use packages
from inside ${CATEGORY} directories as well as the "All" directory. Newly built
packages will always be placed in the "All" directory, so you'll have to run
this script again each time that you build packages if you want to keep them
all in ${CATEGORY} directories.

First Last Prev Next    No search results available      Search page      Enter new bug