Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 103078 - portage tries to move newly-built tbz2 to /mnt/cdrom/All
Summary: portage tries to move newly-built tbz2 to /mnt/cdrom/All
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: High major
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-19 12:17 UTC by Anthony DiSante
Modified: 2005-08-20 08:56 UTC (History)
1 user (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 Anthony DiSante 2005-08-19 12:17:12 UTC
I have a newly-installed 2005.1 system, and I'm installing new packages.  I have
the packages CD mounted, and I do export PKGDIR="/mnt/cdrom", and then emerge
-vabk gnome-volume-manager.  (-b because I want it to save binary packages for
anything it builds, and -k because I want it to use binary packages if they are
already available.)

gnome-volume-manager has 8 dependencies, the second of which is dbus, which it
has to build.  Towards the end of building it, it craps out with this:

...
./var/lib/dbus/
./var/lib/dbus/.keep
mv: cannot create regular file `/mnt/cdrom/All/dbus-0.23-r3.tbz2': Read-only
file system

!!! ERROR: sys-apps/dbus-0.23-r3 failed.
!!! Function dyn_package, Line 954, Exitcode 1
!!! Failed to move tbz2 to /mnt/cdrom/All
!!! If you need support, post the topmost build error, NOT this status message.


Reproducible: Always
Steps to Reproduce:
1. mount the packages disc and then export PKGDIR="/mnt/cdrom"
2. emerge -bk whatever

Actual Results:  
If package "whatever" has dependencies that need to be compiled (instead of just
extracted from binaries), then at the end, portage will try to copy the new
binary to the (obviously read-only) /mnt/cdrom/All directory.


Expected Results:  
Copy the new binary somewhere sensible, perhaps /usr/portage/packages/All ?
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2005-08-19 12:22:37 UTC
How about you copy the existing packages in /mnt/cdrom to /usr/portage/packages/All?
Comment 2 SpanKY gentoo-dev 2005-08-19 14:32:24 UTC
yeah, this is kind of a WONTFIX i think ...
Comment 3 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-19 14:47:42 UTC
The handbook instructions for GRP are here:
http://www.gentoo.org/doc/en/handbook/2005.1/handbook-x86.xml?
part=1&chap=11#doc_chap2

You could try --nodep to install the binaries, then install the dependencies 
afterwards, but I'd really take Andrew's advice as you probably want those 
binary packages around anyhow.

I'm pretty sure some sort of PKGDIR_SRC and PKGDIR_DEST could be rigged up using 
Brian's new config scheme, I'll have to let him know about it.
Comment 4 Anthony DiSante 2005-08-19 16:16:54 UTC
Yeah I could manually copy the packages from the disc to the hard drive
beforehand, but that defeats the purpose of setting PKGDIR.

On a related note, after my old system spends 5 hours building the GIMP, gets to
the very end, and then dies just because it can't copy the package over... is
there some way I can avoid having to build the whole thing again?  I tried
copying /var/tmp/portage/gimp-2.2.6-r1/gimp-2.2.6-r1.tbz2 into
/usr/portage/packages/All but then when I emerge again, it still wants to use
the ebuild.

The thing that really bugs me is that especially on such long builds, something
like this -- essentially a technicality, since the package built successfully --
shouldn't prevent the package from being installed.
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-19 16:36:16 UTC
(In reply to comment #4)
> Yeah I could manually copy the packages from the disc to the hard drive
> beforehand, but that defeats the purpose of setting PKGDIR.
> 
> On a related note, after my old system spends 5 hours building the GIMP, gets 
to
> the very end, and then dies just because it can't copy the package over... is
> there some way I can avoid having to build the whole thing again?  I tried
> copying /var/tmp/portage/gimp-2.2.6-r1/gimp-2.2.6-r1.tbz2 into
> /usr/portage/packages/All but then when I emerge again, it still wants to use
> the ebuild.
> 
> The thing that really bugs me is that especially on such long builds, 
something
> like this -- essentially a technicality, since the package built successfully 
--
> shouldn't prevent the package from being installed.
> 
PKGDIR serves two functions.  One is to Fetch binaries from, the other is to 
save built packages.  If the media is read only there is no way to fix it 
without splitting PKGDIR.

If you move the binary files from the CD into /usr/portage/packages/All you will 
get the best of both worlds, since /usr/portage/packages/All is ( hopefully ) 
not read-only.

I don't see how copying the files 'defeats the purpose of using pre-built 
packages'.
Comment 6 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-19 17:13:29 UTC
Needs support for seperate binpkg repositories.
Comment 7 Brian Harring (RETIRED) gentoo-dev 2005-08-19 20:10:44 UTC
intention down the line for a situation like this is a readonly binpkg repo, and
writable binpkg repo.  Akin to apt.sources, just one of the listed sources would
be mutable... :)
Comment 8 Anthony DiSante 2005-08-19 23:33:31 UTC
> I don't see how copying the files 'defeats
> the purpose of using pre-built packages'.

That's not what I said.  I said it defeats the purpose of setting PKGDIR.

In the x86 quick-install guide, which I was following to install Gentoo, it
instructs you to set PKGDIR so that emerge can get the package files off the
packages CD.  The purpose is to get the package files from somewhere (the CD)
other than where portage normally looks (/usr/portage/packages).  Therefore
manually copying the files from the CD to the hard disk beforehand defeats the
purpose: there is no longer any purpose to set PKGDIR="/mnt/cdrom" since the
files have been copied from there to the hard disk.
Comment 9 Jason Stubbs (RETIRED) gentoo-dev 2005-08-20 00:17:33 UTC
Note, the install guide also says to not "emerge sync" if you want to use 
binary packages from the CD. 
Comment 10 Anthony DiSante 2005-08-20 00:28:18 UTC
> Note, the install guide also says to
> not "emerge sync" if you want to use
> binary packages from the CD. 

Not sure if that was directed at me, but I didn't emerge sync on the system.
Comment 11 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-08-20 08:56:41 UTC
(In reply to comment #8)
> > I don't see how copying the files 'defeats
> > the purpose of using pre-built packages'.
> 
> That's not what I said.  I said it defeats the purpose of setting PKGDIR.
> 
> In the x86 quick-install guide, which I was following to install Gentoo, it
> instructs you to set PKGDIR so that emerge can get the package files off the
> packages CD.  The purpose is to get the package files from somewhere (the CD)
> other than where portage normally looks (/usr/portage/packages).  Therefore
> manually copying the files from the CD to the hard disk beforehand defeats the
> purpose: there is no longer any purpose to set PKGDIR="/mnt/cdrom" since the
> files have been copied from there to the hard disk.
> 

The whole end result of this is to get the Binary Packages from the CD into your 
live system.  I'm not going to knock the handbook instructions since you didn't 
follow them.

If you copy the binary packages from the CD to your hard drive, set PKGDIR to 
the location you copied to and use emerge -avbk <whatever_package> everything 
should work fine.  Yeah, it's not what the handbook says, but the handbook 
doesn't say anything about using -b, because -b doesn't work when PKGDIR is 
read-only.  This will get you your end result, Binary Packages from the CD get 
installed, and binary packages of dependencies get built and put on your hard 
drive.  What more are you looking for?