Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Automatically re-creating your world file
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue May 14, 2002 5:52 pm    Post subject: Automatically re-creating your world file Reply with quote

Lost your world file? Irritated by the fact that your world file only contains things you explicitly emerged but not their dependencies, but you'd like to know when these dependencies are updated too? This quick'n'dirty perl script will create a file called world.new containing a list of all of your installed packages in /var/cache/edb. Remove the bits you don't want, then copy it over your world file. This script depends on app-admin/gentoolkit being installed. It's fairly simple so I make no guarantee that it won't break completely when things change at some point :wink:

Save it into a file such as makeworld.pl then perl makeworld.pl or mark the file as executable with chmod to avoid having to invoke it with the perl command. IMPORTANT: There may be line breaks where there shouldn't be as displayed here, copy and paste the text into a decent text editor and it should be fine

Ignore the next paragraph! - see Davide's post below.

Having certain builds in your world file makes emerge --update world do absolutely nothing it seems. If anyone knows why and/or which ones, let me know and I can make this work 100% without editing of the created world file being necessary.

EDIT: Updated for use with gentoolkit-0.1.11

Code:
#!/usr/bin/perl -w
use strict;

# 12/09/2002 - Updated for use with app-admin/gentoolkit-0.1.11

my %syspackages;  # System packages (filtered - shouldn't be in world)
my @array;        # Temp array

# Die if process owner isn't root
if ($< != 0) {
   print "You must be root to run this script.\n\n";
   exit 0;
}

# Determine which packages are part of the "system" set
print "Determining system packages for exclusion (use emerge system for updating such packages) ...\n";
my @temp = `emerge --pretend --emptytree system` or die "Problem invoking emerge!\n";
foreach (@temp) {
   # Push system packages into temporary array
   if (/\] .+\/(.+?)-.+\ /s) {
      push @array, $1 => 1;
   }
}

# Assign to hash for fast checking below
%syspackages = @array;

# Grab list of installed packages
print "Determining installed packages on your system ...\n";
my @packages = `qpkg -I` or die "Problem invoking qpkg, make sure you have gentoolkit installed!\n";

# Now filter and output to world.new
print "Lists compiled. Attempting to create /var/cache/edb/world.new ...\n";
open(FILE, '>/var/cache/edb/world.new') || die "Couldn't create /var/cache/edb/world.new - check permissions?\n";
foreach (@packages) {
   # Grab pure package name
   /^\x1B.+?m(.+)\/\x1B.+?m(.+)\ /s;
   my $package = "$1\/$2";
   my $name = $2;
   # Output package to world.new unless it is a system package
   unless ($syspackages{$name}) {
      print FILE "$package\n" || die "Could not output $package to /var/cache/edb/world.new";
       print "Added: $package\n";
   }
}
close(FILE);

# Finished
print "Success. Please edit the world.new file to your satisfaction. Then rename to world.\n\n";
1;


Last edited by 474 on Wed Jun 12, 2002 7:32 pm; edited 5 times in total
Back to top
View user's profile Send private message
Tatonet
n00b
n00b


Joined: 26 Apr 2002
Posts: 16
Location: Rome - Italy

PostPosted: Thu May 16, 2002 12:54 pm    Post subject: Re: Automatically re-creating your world file Reply with quote

kerframil wrote:
...
Having certain builds in your world file makes emerge --update world do absolutely nothing it seems. If anyone knows why and/or which ones, let me know and I can make this work 100% without editing of the created world file being necessary. ...


Sorry but my English is very limited:
I think that happends because it writes '\' instead of '/' in package name.
It works for me if I modify line 41, from:
Code:
my $package = "$1\\$2";

to:
Code:
my $package = "$1\/$2";

P.s.: really nice script :)
Best regards,
Davide Guerri
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Thu May 16, 2002 1:11 pm    Post subject: Re: makeworld issue Reply with quote

:oops: Doh! Thanks very much Davide - I'll alter the post!
Back to top
View user's profile Send private message
PhadeRunner
n00b
n00b


Joined: 18 Apr 2002
Posts: 12
Location: UK

PostPosted: Mon May 20, 2002 10:56 pm    Post subject: Missing ! in shell script magic Reply with quote

Source code has a typo meaning you can't invoke the script directly (e.g. ./makeworld.pl).

Code:
#/usr/bin/perl -w


Should read:

Code:
#!/usr/bin/perl -w


Sorry for being pedantic but someone might not notice when simply copying and pasting the script. Although I only had to try to run it once before I noticed.

Nevertheless this is a cool script. Kudos to you kerframil! 8)

Phade...
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue May 21, 2002 11:30 am    Post subject: OK, fixed ... Reply with quote

Quote:
Source code has a typo meaning you can't invoke the script directly
It certainly did, sorry about that everyone. You know I was just too tired the day I posted that :lol:

Edited, fixed - along with another typo in one of the status messages, and some additional (redundant) dogma removed which had no need to be there, so it's a little shorter now.
Back to top
View user's profile Send private message
psionix
n00b
n00b


Joined: 11 May 2002
Posts: 3

PostPosted: Tue Jun 11, 2002 8:18 pm    Post subject: Script is now b0rked. Reply with quote

The updated version of qpkg in gentoolkit-0.1.11-r1 causes the script to puke. :(
Back to top
View user's profile Send private message
Tatonet
n00b
n00b


Joined: 26 Apr 2002
Posts: 16
Location: Rome - Italy

PostPosted: Tue Jun 11, 2002 8:36 pm    Post subject: Reply with quote

Simply change the invocation of qpkq from:
my $packages = 'qpkg -I' ...
to:
my $packages = 'qpkg -I -v' ...
(or you can modify the regular expression in the last foreach statement :) )
Back to top
View user's profile Send private message
psionix
n00b
n00b


Joined: 11 May 2002
Posts: 3

PostPosted: Tue Jun 11, 2002 8:51 pm    Post subject: Reply with quote

Tatonet wrote:
Simply change the invocation of qpkq from:
my $packages = 'qpkg -I' ...
to:
my $packages = 'qpkg -I -v' ...
(or you can modify the regular expression in the last foreach statement :) )


Yeah, I ended up doing the latter before checking back here. Wish I had known about "-v" before wasting that time. :?
Back to top
View user's profile Send private message
psionix
n00b
n00b


Joined: 11 May 2002
Posts: 3

PostPosted: Tue Jun 11, 2002 9:05 pm    Post subject: -v doesn't work Reply with quote

Actually, changing 'qpkg -I' to 'qpkg -I -v' caused some problems. It doesn't list versions for everything. I was able to get things to work by changing line 6 to:
Code:

my $lastpackage = "";

and line 36 to:

Code:

  /^\x1B.+?m(.+)\/\x1B.+?m(.+)\ /s;


I'm sure there's a better way but this appears to work so far.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Wed Jun 12, 2002 7:30 pm    Post subject: Fixed ... Reply with quote

Tatonet, psionix ... thanks very much. Edited and fixed. I've been busy with a few other things, hence you guys noticed before I did. The new qpkg is much better, and actually simplifies matters. Also, the regexps were a bit mucky, so they've been tidied up. AFAIK, it's perfect now ... I'm sure you'll let me know if it isn't. :-)
Back to top
View user's profile Send private message
sibbe
n00b
n00b


Joined: 31 Jan 2003
Posts: 35
Location: Helsinki, Finland

PostPosted: Fri Jan 31, 2003 6:14 pm    Post subject: modified the script a bit, bump up. Reply with quote

Found this (ancient :) thread while searching things related to world-file. The script seems to work just fine, but i modified it a bit to suit my personal needs; removed uid root -checking, added ability to save output wherever i want it (including stdout) with -o flag. Also, -v flag turns on verboseness - which is disabled by default.

http://www.kruu.org/jvtm/files/genworldfile.pl

Code:

#!/usr/bin/perl -w
# Script for regenerating world-file in Gentoo Linux
# http://forums.gentoo.org/viewtopic.php?t=2480
#
# 2002-09-12 - Updated for use with app-admin/gentoolkit-0.1.11
#
# 2003-01-31 - jyrki muukkonen (sibbe@localhost)
#   - proper date format :P
#   - removed root-uid check
#   - added some command line parameters (uses Getopt::Std)
#       -o file,    print output to file, defaults to "-" (stdout)
#       -v,         be verbose, turned off by default
#       -h          print usage
#

use strict;
use Getopt::Std;

my %syspackages;    # System packages (filtered - shouldn't be in world)
my @array;          # Temp array
my %opts;           # hash for command line options

# parse command line options
getopts("hvo:", \%opts);
$opts{o} = "-"  unless defined $opts{o}; # print to stdout if no file given
$opts{v} = 0    if $opts{o} eq "-";      # be non-verbose if writing to stdout

# print usage and exit if we got -h as a parameter
if($opts{h}) {
    print "usage: $0 [-h] [-v] [-o filename]\n";
    print "\t-h\t\tthis help screen\n";
    print "\t-v\t\tbe verbose\n";
    print "\t-o filename\twrite output to \"filename\", "
          ."defaults to \"-\" (stdout)\n";
    print "\t\t\t-v flag is disabled when using stdout\n";
    print "\n";
    exit 0;
}

print "Writing output to \"$opts{o}\".\n" if($opts{v});

# Determine which packages are part of the "system" set
print "Determining system packages for exclusion (use emerge system for "
      ."updating such packages)...\n" if($opts{v});
my @temp = `emerge --pretend --emptytree system`
    or die "Problem invoking emerge!\n";
foreach (@temp) {
    # Push system packages into temporary array
    if (/\] .+\/(.+?)-.+\ /s) {
        push @array, $1 => 1;
    }
}

# Assign to hash for fast checking below
%syspackages = @array;

# Grab list of installed packages
print "Determining installed packages on your system...\n" if($opts{v});
my @packages = `qpkg -I`
    or die "Problem invoking qpkg, make sure you have gentoolkit installed!\n";

# Now filter and output to world.new
print "Lists compiled. "
      ."Attempting to write to \"$opts{o}\"...\n" if($opts{v});
open(FILE, "> $opts{o}")
    or die "Couldn't write to \"$opts{o}\" - check permissions?\n";
foreach (@packages) {
    # Grab pure package name
    /^\x1B.+?m(.+)\/\x1B.+?m(.+)\ /s;
    my $package = "$1\/$2";
    my $name = $2;
    # Output package to world.new unless it is a system package
    unless ($syspackages{$name}) {
        print FILE "$package\n" or
            die "Could not output $package to \"$opts{o}\"";
        print "Added: $package\n" if($opts{v});
    }
}
close(FILE);

# Finished
print "Success. Please edit the \"$opts{o}\" file to your satisfaction. "
      ."Then copy it to \"/var/cache/edb/world\"\n\n" if($opts{v});
1;


Feel free to comment.
_________________
jyrki muukkonen
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Fri Jan 31, 2003 6:48 pm    Post subject: Reply with quote

I'm currently advising people not to add things to the world file manually (deleting is OK), because of some reports of Portage errors saying "Error: package in world file not installed". Can anybody verify that this is or is not a problem (and if it is, is there a way around it so that manual adding to the world file can be made safe)?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
iKiddo
Guru
Guru


Joined: 27 Jun 2002
Posts: 341
Location: Europe?

PostPosted: Sat Feb 01, 2003 10:30 pm    Post subject: Reply with quote

rac wrote:
I'm currently advising people not to add things to the world file manually (deleting is OK), because of some reports of Portage errors saying "Error: package in world file not installed". Can anybody verify that this is or is not a problem (and if it is, is there a way around it so that manual adding to the world file can be made safe)?


Doesn't portage have a second place where it stores which apps are installed using something like /var/db/app-name/ ?? (It's where all the sizes of the files that are installed by packages are stored. I can't check, as I'm using windows right now). It might be used for backing up a lost world file, but portage might use it to make sure the world file is OK. I guess portage uses both locations, so that the world file can be used for updating (and not updating) without losing information necessary to unmerge stuff.
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sun Feb 02, 2003 1:11 am    Post subject: Reply with quote

iKiddo wrote:
Doesn't portage have a second place where it stores which apps are installed using something like /var/db/app-name/ ??
I think you're referring to /var/db/pkg. Yes, that directory is really the crucial one for Portage. However, the world file is more selective. You can have things on your machine that aren't in your world file, because they may have been brought in as dependencies. Also, one of the main tricks for people mixing stable and unstable packages is removing unstable things from the world file, so it's not necessarily a one-to-one correspondence between /var/cache/edb/world and the contents of /var/db/pkg.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
iKiddo
Guru
Guru


Joined: 27 Jun 2002
Posts: 341
Location: Europe?

PostPosted: Sun Feb 02, 2003 3:09 pm    Post subject: Reply with quote

rac wrote:
iKiddo wrote:
Doesn't portage have a second place where it stores which apps are installed using something like /var/db/app-name/ ??
I think you're referring to /var/db/pkg. Yes, that directory is really the crucial one for Portage. However, the world file is more selective. You can have things on your machine that aren't in your world file, because they may have been brought in as dependencies. Also, one of the main tricks for people mixing stable and unstable packages is removing unstable things from the world file, so it's not necessarily a one-to-one correspondence between /var/cache/edb/world and the contents of /var/db/pkg.


I'm sorry if I wasn't being clear, but that was what I wanted to say, plus that portage stores what's being installed in /var/db/pkg. The world file (just like the gnome and kde files in /var/cache/edb/) are simply files which can be used to collect different packages so you can update or install more easy.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Sun Feb 02, 2003 7:22 pm    Post subject: Reply with quote

Quote:
The world file (just like the gnome and kde files in /var/cache/edb/) are simply files which can be used to collect different packages so you can update or install more easy.


Yes, that is correct. The only inherent danger of densely populating your world file is that Portage may upgrade libraries (when issuing emerge world or emerge -u world) before applications that depend on those libraries have been re-written to cope with them. In the case where the API for these libraries has been changed substantially, or in a way that breaks compatibility - that could cause a problem. That is why I propose adding a switch to the script that filters anything from ".+\-lib\/.+" from going into the world file.

BTW, some nice changes sibbe.
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sun Feb 02, 2003 7:43 pm    Post subject: Reply with quote

mjc was kind enough to discuss this issue with me on IRC, and here's the official word - you can add anything to the world file manually that you want, but after adding things, the very next thing you should do is "emerge world". Otherwise, you may get the "package in world file not installed" error when doing other emerges.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Mon Feb 03, 2003 10:20 am    Post subject: Reply with quote

Quote:
you can add anything to the world file manually that you want, but after adding things, the very next thing you should do is "emerge world"

Very interesting; thank you for sharing that. I must be fortunate not to have been afflicted by this already. Would you happen to know if this is considered as a bug, and whether it has been filed as such?
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Mon Feb 03, 2003 7:07 pm    Post subject: Reply with quote

kerframil wrote:
Would you happen to know if this is considered as a bug, and whether it has been filed as such?
mjc seemed to pretty much shrug off the "package in world file not installed error", saying that it wasn't a big deal because you could just "emerge world". I speculate that it's considered a feature, because of the following case: you add A to the world file manually, but don't actually have it installed yet. Now you "emerge B", which has a dependency on A. Portage looks and sees that A is in the world file, so it doesn't need to install it, but then realizes that it's not actually on the system. I supposed the kind thing to do would be to install A, but maybe we're talking about a broken contract between two parts of Portage.

I took mjc's statement to mean "running emerge in general in a state where the world file contains things that aren't on the system is not such a great idea, and "emerge world" after adding them manually avoids this". If all you're doing is adding things to the world file that are installed already, there should be no problem.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
frodo
n00b
n00b


Joined: 13 Dec 2002
Posts: 22
Location: Bloomington, Indiana, USA

PostPosted: Mon Mar 03, 2003 7:33 pm    Post subject: Using this script results is a much larger world file Reply with quote

I accidently deleted my /var/cache/edb/world file, so I tried this script, with some disconcerting results. Clearly, I have a lot to learn about the world file, and portage. Anyway, just prior to stupidly, accidentally deleting /var/cache/edb/world file, I had this in my xterm:

Code:

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

Calculating world dependencies ...done!
[ebuild    U ] app-admin/gentoolkit-0.1.19-r1 [0.1.18-r3]
[ebuild    U ] sys-kernel/gentoo-sources-2.4.20-r1 [2.4.19-r10]
[ebuild    U ] x11-libs/qt-3.1.0-r3 [3.1.0-r1]
[ebuild    U ] app-office/openoffice-1.0.2 [1.0.1-r1]
[ebuild    U ] sys-apps/cpio-2.5 [2.4.2-r4]
[ebuild    U ] sys-apps/pcmcia-cs-3.2.1-r4 [3.2.1-r3]


After running the script, I get this:

Code:

Calculating world dependencies ...done!
[ebuild  N   ] net-libs/linc-1.0.1 
[ebuild  N   ] gnome-base/ORBit2-2.6.0 
[ebuild    U ] gnome-base/gconf-1.2.1 [1.0.8-r3]
[ebuild    U ] sys-kernel/gentoo-sources-2.4.20-r1 [2.4.19-r10]
[ebuild    U ] net-print/cups-1.1.18-r4 [1.1.17_pre20021025]
[ebuild    U ] media-gfx/gimp-print-4.2.4 [4.2.2]
[ebuild    U ] dev-java/ant-1.5.1-r3 [1.5.1-r2]
[ebuild  N   ] gnome-base/bonobo-activation-2.2.1 
[ebuild  N   ] gnome-base/libbonobo-2.2.0 
[ebuild  N   ] net-nds/portmap-5b-r6 
[ebuild  N   ] app-admin/fam-oss-2.6.9-r1 
[ebuild    U ] gnome-base/gnome-vfs-2.2.2 [1.0.5-r3]
[ebuild  N   ] media-libs/libart_lgpl-2.3.10 
[ebuild  N   ] gnome-base/libgnomecanvas-2.2.0.1 
[ebuild  N   ] gnome-base/libgnome-2.2.0.1 
[ebuild  N   ] gnome-base/libbonoboui-2.2.0 
[ebuild  N   ] x11-themes/gnome-icon-theme-1.0.0 
[ebuild  N   ] x11-themes/gtk-engines-metal-2.2.0 
[ebuild  N   ] x11-themes/gtk-engines-thinice-2.0.2 
[ebuild  N   ] x11-themes/gtk-engines-redmond95-2.2.0 
[ebuild  N   ] x11-themes/gtk-engines-pixbuf-2.2.0 
[ebuild  N   ] x11-themes/gnome-themes-2.2 
[ebuild  N   ] gnome-base/libgnomeui-2.2.0.1 
[ebuild  N   ] x11-libs/startup-notification-0.5 
[ebuild  N   ] gnome-base/gnome-desktop-2.2.0.1 
[ebuild  N   ] x11-wm/metacity-2.4.34 
[ebuild    U ] gnome-base/control-center-2.2.0.1 [1.4.0.5-r1]
[ebuild    U ] net-ftp/curl-7.10.2 [7.9.7]
[ebuild    U ] dev-util/gob-2.0.2 [1.0.12]
[ebuild    U ] x11-libs/qt-3.1.0-r3 [3.1.0-r1]
[ebuild    U ] app-office/openoffice-1.0.2 [1.0.1-r1]
[ebuild    U ] sys-apps/pcmcia-cs-3.2.1-r4 [3.2.1-r3]
[ebuild    U ] app-text/gnome-spell-0.5 [0.4.1-r3]

This looks to me like my new world file is now grossly overpopulated. What are the guidelines regarding what should be in the world file? I have read that the world file contains a list of packages that I have expressly emerged. Most of the files on the second list do not fall into this category.

I have also read that it can be dangerous to add things to the world file, but that it is OK to delete things. I guess what I'm looking for is a little help and guidance in trying to get back to where I was before (or at least close). Thanks.

Bob
Back to top
View user's profile Send private message
frodo
n00b
n00b


Joined: 13 Dec 2002
Posts: 22
Location: Bloomington, Indiana, USA

PostPosted: Mon Mar 03, 2003 7:34 pm    Post subject: Using this script results is a much larger world file Reply with quote

I accidently deleted my /var/cache/edb/world file, so I tried this script, with some disconcerting results. Clearly, I have a lot to learn about the world file, and portage. Anyway, just prior to stupidly, accidentally deleting /var/cache/edb/world file, I had this in my xterm:

Code:

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

Calculating world dependencies ...done!
[ebuild    U ] app-admin/gentoolkit-0.1.19-r1 [0.1.18-r3]
[ebuild    U ] sys-kernel/gentoo-sources-2.4.20-r1 [2.4.19-r10]
[ebuild    U ] x11-libs/qt-3.1.0-r3 [3.1.0-r1]
[ebuild    U ] app-office/openoffice-1.0.2 [1.0.1-r1]
[ebuild    U ] sys-apps/cpio-2.5 [2.4.2-r4]
[ebuild    U ] sys-apps/pcmcia-cs-3.2.1-r4 [3.2.1-r3]


After running the script, I get this:

Code:

Calculating world dependencies ...done!
[ebuild  N   ] net-libs/linc-1.0.1 
[ebuild  N   ] gnome-base/ORBit2-2.6.0 
[ebuild    U ] gnome-base/gconf-1.2.1 [1.0.8-r3]
[ebuild    U ] sys-kernel/gentoo-sources-2.4.20-r1 [2.4.19-r10]
[ebuild    U ] net-print/cups-1.1.18-r4 [1.1.17_pre20021025]
[ebuild    U ] media-gfx/gimp-print-4.2.4 [4.2.2]
[ebuild    U ] dev-java/ant-1.5.1-r3 [1.5.1-r2]
[ebuild  N   ] gnome-base/bonobo-activation-2.2.1 
[ebuild  N   ] gnome-base/libbonobo-2.2.0 
[ebuild  N   ] net-nds/portmap-5b-r6 
[ebuild  N   ] app-admin/fam-oss-2.6.9-r1 
[ebuild    U ] gnome-base/gnome-vfs-2.2.2 [1.0.5-r3]
[ebuild  N   ] media-libs/libart_lgpl-2.3.10 
[ebuild  N   ] gnome-base/libgnomecanvas-2.2.0.1 
[ebuild  N   ] gnome-base/libgnome-2.2.0.1 
[ebuild  N   ] gnome-base/libbonoboui-2.2.0 
[ebuild  N   ] x11-themes/gnome-icon-theme-1.0.0 
[ebuild  N   ] x11-themes/gtk-engines-metal-2.2.0 
[ebuild  N   ] x11-themes/gtk-engines-thinice-2.0.2 
[ebuild  N   ] x11-themes/gtk-engines-redmond95-2.2.0 
[ebuild  N   ] x11-themes/gtk-engines-pixbuf-2.2.0 
[ebuild  N   ] x11-themes/gnome-themes-2.2 
[ebuild  N   ] gnome-base/libgnomeui-2.2.0.1 
[ebuild  N   ] x11-libs/startup-notification-0.5 
[ebuild  N   ] gnome-base/gnome-desktop-2.2.0.1 
[ebuild  N   ] x11-wm/metacity-2.4.34 
[ebuild    U ] gnome-base/control-center-2.2.0.1 [1.4.0.5-r1]
[ebuild    U ] net-ftp/curl-7.10.2 [7.9.7]
[ebuild    U ] dev-util/gob-2.0.2 [1.0.12]
[ebuild    U ] x11-libs/qt-3.1.0-r3 [3.1.0-r1]
[ebuild    U ] app-office/openoffice-1.0.2 [1.0.1-r1]
[ebuild    U ] sys-apps/pcmcia-cs-3.2.1-r4 [3.2.1-r3]
[ebuild    U ] app-text/gnome-spell-0.5 [0.4.1-r3]

This looks to me like my new world file is now grossly overpopulated. What are the guidelines regarding what should be in the world file? I have read that the world file contains a list of packages that I have expressly emerged. Most of the files on the second list do not fall into this category.

I have also read that it can be dangerous to add things to the world file, but that it is OK to delete things. I guess what I'm looking for is a little help and guidance in trying to get back to where I was before (or at least close). Thanks.

Bob
Back to top
View user's profile Send private message
frodo
n00b
n00b


Joined: 13 Dec 2002
Posts: 22
Location: Bloomington, Indiana, USA

PostPosted: Mon Mar 03, 2003 7:34 pm    Post subject: Using this script results is a much larger world file Reply with quote

I accidently deleted my /var/cache/edb/world file, so I tried this script, with some disconcerting results. Clearly, I have a lot to learn about the world file, and portage. Anyway, just prior to stupidly, accidentally deleting /var/cache/edb/world file, I had this in my xterm:

Code:

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

Calculating world dependencies ...done!
[ebuild    U ] app-admin/gentoolkit-0.1.19-r1 [0.1.18-r3]
[ebuild    U ] sys-kernel/gentoo-sources-2.4.20-r1 [2.4.19-r10]
[ebuild    U ] x11-libs/qt-3.1.0-r3 [3.1.0-r1]
[ebuild    U ] app-office/openoffice-1.0.2 [1.0.1-r1]
[ebuild    U ] sys-apps/cpio-2.5 [2.4.2-r4]
[ebuild    U ] sys-apps/pcmcia-cs-3.2.1-r4 [3.2.1-r3]


After running the script, I get this:

Code:

Calculating world dependencies ...done!
[ebuild  N   ] net-libs/linc-1.0.1 
[ebuild  N   ] gnome-base/ORBit2-2.6.0 
[ebuild    U ] gnome-base/gconf-1.2.1 [1.0.8-r3]
[ebuild    U ] sys-kernel/gentoo-sources-2.4.20-r1 [2.4.19-r10]
[ebuild    U ] net-print/cups-1.1.18-r4 [1.1.17_pre20021025]
[ebuild    U ] media-gfx/gimp-print-4.2.4 [4.2.2]
[ebuild    U ] dev-java/ant-1.5.1-r3 [1.5.1-r2]
[ebuild  N   ] gnome-base/bonobo-activation-2.2.1 
[ebuild  N   ] gnome-base/libbonobo-2.2.0 
[ebuild  N   ] net-nds/portmap-5b-r6 
[ebuild  N   ] app-admin/fam-oss-2.6.9-r1 
[ebuild    U ] gnome-base/gnome-vfs-2.2.2 [1.0.5-r3]
[ebuild  N   ] media-libs/libart_lgpl-2.3.10 
[ebuild  N   ] gnome-base/libgnomecanvas-2.2.0.1 
[ebuild  N   ] gnome-base/libgnome-2.2.0.1 
[ebuild  N   ] gnome-base/libbonoboui-2.2.0 
[ebuild  N   ] x11-themes/gnome-icon-theme-1.0.0 
[ebuild  N   ] x11-themes/gtk-engines-metal-2.2.0 
[ebuild  N   ] x11-themes/gtk-engines-thinice-2.0.2 
[ebuild  N   ] x11-themes/gtk-engines-redmond95-2.2.0 
[ebuild  N   ] x11-themes/gtk-engines-pixbuf-2.2.0 
[ebuild  N   ] x11-themes/gnome-themes-2.2 
[ebuild  N   ] gnome-base/libgnomeui-2.2.0.1 
[ebuild  N   ] x11-libs/startup-notification-0.5 
[ebuild  N   ] gnome-base/gnome-desktop-2.2.0.1 
[ebuild  N   ] x11-wm/metacity-2.4.34 
[ebuild    U ] gnome-base/control-center-2.2.0.1 [1.4.0.5-r1]
[ebuild    U ] net-ftp/curl-7.10.2 [7.9.7]
[ebuild    U ] dev-util/gob-2.0.2 [1.0.12]
[ebuild    U ] x11-libs/qt-3.1.0-r3 [3.1.0-r1]
[ebuild    U ] app-office/openoffice-1.0.2 [1.0.1-r1]
[ebuild    U ] sys-apps/pcmcia-cs-3.2.1-r4 [3.2.1-r3]
[ebuild    U ] app-text/gnome-spell-0.5 [0.4.1-r3]

This looks to me like my new world file is now grossly overpopulated. What are the guidelines regarding what should be in the world file? I have read that the world file contains a list of packages that I have expressly emerged. Most of the files on the second list do not fall into this category.

I have also read that it can be dangerous to add things to the world file, but that it is OK to delete things. I guess what I'm looking for is a little help and guidance in trying to get back to where I was before (or at least close). Thanks.

Bob
Back to top
View user's profile Send private message
frodo
n00b
n00b


Joined: 13 Dec 2002
Posts: 22
Location: Bloomington, Indiana, USA

PostPosted: Mon Mar 03, 2003 7:35 pm    Post subject: Using this script results is a much larger world file Reply with quote

I accidently deleted my /var/cache/edb/world file, so I tried this script, with some disconcerting results. Clearly, I have a lot to learn about the world file, and portage. Anyway, just prior to stupidly, accidentally deleting /var/cache/edb/world file, I had this in my xterm:

Code:

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

Calculating world dependencies ...done!
[ebuild    U ] app-admin/gentoolkit-0.1.19-r1 [0.1.18-r3]
[ebuild    U ] sys-kernel/gentoo-sources-2.4.20-r1 [2.4.19-r10]
[ebuild    U ] x11-libs/qt-3.1.0-r3 [3.1.0-r1]
[ebuild    U ] app-office/openoffice-1.0.2 [1.0.1-r1]
[ebuild    U ] sys-apps/cpio-2.5 [2.4.2-r4]
[ebuild    U ] sys-apps/pcmcia-cs-3.2.1-r4 [3.2.1-r3]


After running the script, I get this:

Code:

Calculating world dependencies ...done!
[ebuild  N   ] net-libs/linc-1.0.1 
[ebuild  N   ] gnome-base/ORBit2-2.6.0 
[ebuild    U ] gnome-base/gconf-1.2.1 [1.0.8-r3]
[ebuild    U ] sys-kernel/gentoo-sources-2.4.20-r1 [2.4.19-r10]
[ebuild    U ] net-print/cups-1.1.18-r4 [1.1.17_pre20021025]
[ebuild    U ] media-gfx/gimp-print-4.2.4 [4.2.2]
[ebuild    U ] dev-java/ant-1.5.1-r3 [1.5.1-r2]
[ebuild  N   ] gnome-base/bonobo-activation-2.2.1 
[ebuild  N   ] gnome-base/libbonobo-2.2.0 
[ebuild  N   ] net-nds/portmap-5b-r6 
[ebuild  N   ] app-admin/fam-oss-2.6.9-r1 
[ebuild    U ] gnome-base/gnome-vfs-2.2.2 [1.0.5-r3]
[ebuild  N   ] media-libs/libart_lgpl-2.3.10 
[ebuild  N   ] gnome-base/libgnomecanvas-2.2.0.1 
[ebuild  N   ] gnome-base/libgnome-2.2.0.1 
[ebuild  N   ] gnome-base/libbonoboui-2.2.0 
[ebuild  N   ] x11-themes/gnome-icon-theme-1.0.0 
[ebuild  N   ] x11-themes/gtk-engines-metal-2.2.0 
[ebuild  N   ] x11-themes/gtk-engines-thinice-2.0.2 
[ebuild  N   ] x11-themes/gtk-engines-redmond95-2.2.0 
[ebuild  N   ] x11-themes/gtk-engines-pixbuf-2.2.0 
[ebuild  N   ] x11-themes/gnome-themes-2.2 
[ebuild  N   ] gnome-base/libgnomeui-2.2.0.1 
[ebuild  N   ] x11-libs/startup-notification-0.5 
[ebuild  N   ] gnome-base/gnome-desktop-2.2.0.1 
[ebuild  N   ] x11-wm/metacity-2.4.34 
[ebuild    U ] gnome-base/control-center-2.2.0.1 [1.4.0.5-r1]
[ebuild    U ] net-ftp/curl-7.10.2 [7.9.7]
[ebuild    U ] dev-util/gob-2.0.2 [1.0.12]
[ebuild    U ] x11-libs/qt-3.1.0-r3 [3.1.0-r1]
[ebuild    U ] app-office/openoffice-1.0.2 [1.0.1-r1]
[ebuild    U ] sys-apps/pcmcia-cs-3.2.1-r4 [3.2.1-r3]
[ebuild    U ] app-text/gnome-spell-0.5 [0.4.1-r3]

This looks to me like my new world file is now grossly overpopulated. What are the guidelines regarding what should be in the world file? I have read that the world file contains a list of packages that I have expressly emerged. Most of the files on the second list do not fall into this category.

I have also read that it can be dangerous to add things to the world file, but that it is OK to delete things. I guess what I'm looking for is a little help and guidance in trying to get back to where I was before (or at least close). Thanks.

Bob
Back to top
View user's profile Send private message
hachre
n00b
n00b


Joined: 21 Jan 2003
Posts: 59
Location: Munich, Germany

PostPosted: Wed Mar 19, 2003 4:00 pm    Post subject: Reply with quote

Why did you post that 4 times?!?!

Well what I dont understand is:

earlier when I installed kde by "emerge kde" and did a emerge -u world after some days it updated all kde packages to newer versions...
nowadays my world file has about 20 entries, one of them is kde but no single kde part is in there (like kdeedu kdebase kdemedia and whatever) so when a new kde is out today emerge -u world does nothing...

also I have following problem: I have samba in use so kde installed samba for me... but samba doesnt appear in the world file so emerge -u world doesn't update samba...

emerge -uD is worse... It installs a 1_beta8 version of xine-libs and afterwards downgrades again because xine doesn't seem to work with it.... I really don't know what to do...

Someone told me not to use this script cause having libs in world will damage my system or something... But wasn't that the way it was some portage versions ago??

"cat world | wc -l" results in 45...
"cat world.new | wc -l" results in 211...

That means my original world file has got 45 entries - my new one created by this script has got 211 entries... Why doesn't world simply contain ALL stuff that has been installed??
_________________
He's not much to look at but it's sooo hard to find a family guy...
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Apr 29, 2003 8:54 pm    Post subject: Reply with quote

I presume some of the concerns raised here have been put to rest since. But just in case, let me point out a few things:
  • The use of this script is largely superceded by:
    Code:
    emerge regenworld
    which is safer.
  • Also, the emerge -u --deep options help to apply extra depth when searching for possible things to update. This wasn't supported by Portage at the time of the post
  • Yes, it can be dangerous to update a shared library. A given package may only be coded to work properly with a particular version of a shared library. If this library is updated, then the package which depends upon it can (in theory) break, whereas other dependent packages may continue to work fine. Furthermore, you may need to recompile some apps so that they get linked against the new libs for best results.
  • That is why world only contains what you explicitly ask to be emerged, unless you use the --oneshot option.
  • emerge -u ... will upgrade all dependencies that satisfy a given ebuild as and when it is OK to update them. Negating the -u option will simply check if the named package is updateable itself.

I would also add that this script still has some interesting uses. For example, I wanted to re-install my system from scratch, but using binary packages which were built on a separate, fresh machine. This script provides a handy list that I could edit, then iterate through. For example, to roll back to a stage 3 state I could simply issue:
Code:
for p in `makeworld.pl`; do emerge -C ${p}; done

Its usefulness here is primarily in its method of separating system packages from non-system packages.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum