Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63703 - ut2004 ebuild requires install CDs when updating, but it doesn't need to
Summary: ut2004 ebuild requires install CDs when updating, but it doesn't need to
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-11 14:00 UTC by Steven Robertson
Modified: 2005-02-22 16:38 UTC (History)
3 users (show)

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


Attachments
ut2004-3323.ebuild (ut2004-3323.ebuild,8.68 KB, text/plain)
2004-09-19 07:29 UTC, Elias Kunnas
Details
ut2004-3323.ebuild (ut2004-3323.ebuild,8.63 KB, text/plain)
2004-09-19 07:39 UTC, Elias Kunnas
Details
games-fps/ut2004-data/ut2004-data-3186.ebuild (ut2004-data-3186.ebuild,4.92 KB, text/plain)
2005-02-09 04:13 UTC, Chris Gianelloni (RETIRED)
Details
games-fps/ut2004-bonuspack-ece/ut2004-bonuspack-ece-1.ebuild (ut2004-bonuspack-ece-1.ebuild,1.27 KB, text/plain)
2005-02-09 04:15 UTC, Chris Gianelloni (RETIRED)
Details
games-fps/ut2004/ut2004-3339-r1.ebuild (ut2004-3339-r1.ebuild,3.40 KB, text/plain)
2005-02-09 04:15 UTC, Chris Gianelloni (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Robertson 2004-09-11 14:00:50 UTC
The ut2004 ebuild requires a complete reinstall every time a new version is released.  This means lugging out the CDs, inserting them one by one...  A much faster solution is simply to unpack the patch tarball in the /opt/ut2004 directory, then move files around for amd64 (if necessary).  I'd love to see this implemented.

I've already started writing an ebuild to do this, but I've run into two problems: detecting if ut2004 is installed or not, and file ownership.  The former could be solved with some ungainly hacks accessing /var/db/pkg.  However, the second is much harder to deal with.  Barring some butt-ugly sed or awk nastiness, updating the ebuild will mean the newest version only owns the patch files, and an 'emerge --clean' will emerge the old version and with it all files that are not a part of the patch.

Thus, I propose splitting the ut2004 package into two ebuilds: ut2004-base, which is the install from CDs, and ut2004, which installs the patch (and DEPENDs on ut2004-base).  With an appropriate eclass, the ut2004 ebuid could also be reused pretty much verbatim to work with modifications, mutators, level packs...

The only issue I see with the split is how not to force everyone with the current ut2004 ebuild to have to merge ut2004-base.  I think that you could use a portage update thing (sorry, don't know the correct term) to move the current ut2004 to ut2004-base, but I don't know if that would work for people who would have the proposed ut2004 and ut2004-base emerged.

If you don't like this solution, or just feel that it's not worth it, please offer suggestions as to what you'd prefer (or just tell me to get off my lazy bum and start shoving CDs in the drive).  Barring any objections, however, I'll get started on it.

Thanks for your consideration!
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2004-09-11 14:23:22 UTC
Sorry, but portage does not work this way.  If we only updated to the patch, then portage would remove the rest of ut2004 when it did its cleanup process.  My solution for you would be to keep a copy of the ut2004 files from media on your hard drive somewhere.
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2004-09-11 14:35:09 UTC
Sorry about that... I missed the whole "break up the package" thing.

Well, that won't fly either, and here's why.  We have a guideline which says that no two ebuilds can own the same file.  So what would you do for /opt/ut2004/System/ut2004-bin or any of the other files that the patches would update?

This has been brought up many times for various games-* ebuilds and my answer is always the same.  You're just going to learn to accept it, write a nice patch for portage itself that uses some form of md5 hashing to determine if an already-installed file needs to be upgraded or not, or not use portage for your cd-based games.
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2004-09-15 02:00:14 UTC
*** Bug 64084 has been marked as a duplicate of this bug. ***
Comment 4 Elias Kunnas 2004-09-19 07:29:34 UTC
Created attachment 39914 [details]
ut2004-3323.ebuild

I modified the ut2004 ebuild from portage so that it asks, if ut2004 is
installed, to just install the patches, not the game completely. It copies all
files from ut2004 that are specified in portage CONTENTS file to sandbox, that
way it is unnecessary to keep those files from CDs/DVD separately on hd.

Those patch-functions are portable, so they can be used in other
ebuilds/eclasses pretty easily.
Comment 5 Elias Kunnas 2004-09-19 07:39:50 UTC
Created attachment 39915 [details]
ut2004-3323.ebuild

Oops, didn't notice I left few things there that were replaced by portageq.
Anyway, both this and that older ebuild should work the same way but those
things I removed were unnecessary in there.
Comment 6 atom 2004-10-02 11:04:19 UTC
elias: thank you.

i do want to point out that this worked perfectly for me. i would ask the games devs to seriously consider using this method. we all agree that reading the whole game off the original disks for each upgrade is absurd, right?
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2004-11-30 09:02:48 UTC
*** Bug 72927 has been marked as a duplicate of this bug. ***
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2005-02-09 04:12:24 UTC
I'm going to reopen this... you'll see why shortly.
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2005-02-09 04:13:58 UTC
Created attachment 50813 [details]
games-fps/ut2004-data/ut2004-data-3186.ebuild

This is a ut2004-data ebuild, which will install the files off the CD/DVD.  It
should also detect whether the DVD is an ECE DVD or not.
Comment 10 Chris Gianelloni (RETIRED) gentoo-dev 2005-02-09 04:15:06 UTC
Created attachment 50814 [details]
games-fps/ut2004-bonuspack-ece/ut2004-bonuspack-ece-1.ebuild

This is the ECE ebuild.  It should simply complete without installing anything
if the ECE DVD is detected.  This will also require the DVD to be in the
system.
Comment 11 Chris Gianelloni (RETIRED) gentoo-dev 2005-02-09 04:15:48 UTC
Created attachment 50815 [details]
games-fps/ut2004/ut2004-3339-r1.ebuild

This would be the new ut2004 ebuild, which only installs the patch files.  This
ebuild does *not* require the DVD.
Comment 12 Chris Gianelloni (RETIRED) gentoo-dev 2005-02-09 04:23:55 UTC
This method is much preferred from reading files off the live filesystem.  I really dislike the idea of breaking up the ebuild, but since it seems to be a major complaint from a few very vocal users, I've decided to go ahead and do it.

There's only one caveat, which I am still working on before I put this in the tree, and that is to force buildpkg off on the ut2004-data ebuild, as it will undoubtedly fail on any machine without several gigabytes of RAM.
Comment 13 Chris Gianelloni (RETIRED) gentoo-dev 2005-02-22 16:38:31 UTC
This has been setup as the 3355 ebuild... enjoy