Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge depclean
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Sun Nov 10, 2002 8:06 pm    Post subject: emerge depclean Reply with quote

I am proud to accept the bone-head award of the day!

I did the ultimate in dumb user / wannabe smart things:

I typed:
Code:
emerge depclean
and let her fly...

I don't think that I broke too much, but I know I broke some things. like my xterm and who knows what else...

My question is...

What do I need to repair the damage that I have done?

Will this work?
Code:
emerge --deep -u world
... or this
Code:
emerge -e world
... or have I really screwed the pooch?

I read the disclaimer that I should be very careful when using this command, but after reading emerge --help, it seemed like the thing to do.

Obviously, I was incorrect... Feel free to point fingers at me and laugh :oops:
_________________
Is the sky really falling???
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Sun Nov 10, 2002 8:57 pm    Post subject: Reply with quote

You should resurrect the deleted missing libraries, should hope that emerge -u world does this for you (I am not familiar with the -deep option). could also do emerge -p -e world and only compile the packages which are new [N],

Hope you'll fix it,

Cya lX.
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Sun Nov 10, 2002 9:05 pm    Post subject: Reply with quote

Thanks for your kind wishes.

As I understand it, the --deep option tells portage to do a deep dependency scan. At least that's what I think I read... :?:

And if I do an emerge -pe world isn't it going to show me all the packages in my world file as new and if I run that isn't it going to rebuild my entire system? If so, this seems like swatting a fly with a sledgehammer... :?:

I would appreciate any corrections to my thought pattern... 8O
_________________
Is the sky really falling???
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Sun Nov 10, 2002 9:34 pm    Post subject: Reply with quote

Yes you are completly right, sorry sorry sorry, lack of sleep, ;-)
maybe this script can help:
Code:
#!/bin/bash
FILES=(`emerge -p -e world | grep -e "^\[" | sed -e "s/\[.*\] //" | sort`)
FILES2=(`/usr/lib/portage/bin/pkglist | cat | sort`)
COUNT=0;
COUNT2=0;
REMOVE=0;
SAME=0;
ADD=0;

while (( $COUNT!=${#FILES[*]} )) && (( $COUNT2!=${#FILES2[*]} )); do

    if [ "${FILES[$COUNT]}" = "${FILES2[$COUNT2]}" ]; then
   (( COUNT++ )); (( COUNT2++ ));
    else
   if [[ "${FILES[$COUNT]}" < "${FILES2[$COUNT2]}" ]]; then
       echo +${FILES[$COUNT]};
       (( COUNT++ ));
   else
       if [[ "${FILES[$COUNT]}" > "${FILES2[$COUNT2]}" ]]; then
      echo -${FILES2[$COUNT2]};
      (( COUNT2++ ));
       else
      exit
       fi
   fi
    fi
done


Copy it to a file and do chmod +x filename. should show the emerge -pe world minus the installed packages.

ps you could change the echo +.... with emerge ..... ${.... but this is very obvious.

Cya lX.
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Sun Nov 10, 2002 9:56 pm    Post subject: Reply with quote

OK, I am not used to this scripting language. So forgive me if this should be obvious...

See above code...

When running the script, I get the following:
Code:
 #sh filteredeworld.sh
 :command not found
 :command not found
 :command not found
 :command not found
 :command not found
 :command not found
 :command not found
 :command not found
 'ilteredeworld.sh: line 24: syntax error near unexpected token `
 'ilteredeworld.sh: line 24: '           fi


I am not experience enough in scripting to troubleshoot this myself. (I did double check the file line for line and it does match your post.)
_________________
Is the sky really falling???
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Sun Nov 10, 2002 10:02 pm    Post subject: Reply with quote

I figured it out. I had copied this to windows notepad to make the file.

I have a whole bunch of ^M return characters that shouldn't be there.

Sorry, for the last post.
_________________
Is the sky really falling???


Last edited by LugnutsForBrains on Sun Nov 10, 2002 10:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Sun Nov 10, 2002 10:09 pm    Post subject: Reply with quote

Well, as it turned out, the emerge -deep -u world restored most everything...

There were a few programs that were missing in action, such as:

vcron
metalog
reiserfsprogs
progsreiserfs

These were obvious from the boot messages.

There was one other that I found that did not get restored:

libpng (which I found with lx's script -- Thanks lx! :D )

[edit]
Well, I still don't have my xterm back so I guess I'm going to have to do a:
Code:
emerge -e xfree
and see if that helps...
_________________
Is the sky really falling???
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Mon Nov 11, 2002 4:38 am    Post subject: Reply with quote

Its time to break out the sledgehammer!!!

Well, I think that I pretty much hosed the system so I decided to re-emerge each package so they all get recorded in my world file, so I don't do something like this again...

I made a really crude script to do this for me:

Code:

date >& startrebuild
emerge =sys-kernel/linux-headers-2.4.19
emerge =sys-devel/gettext-0.11.5
emerge =sys-libs/glibc-2.2.5-r7
emerge =sys-libs/zlib-1.1.4
emerge =dev-python/python-fchksum-1.6.1
emerge =sys-apps/bzip2-1.0.2-r2
emerge =sys-libs/ncurses-5.2.20020511-r3
emerge =sys-apps/bash-2.05a-r3
emerge =sys-devel/libtool-1.4.1-r10
emerge =sys-devel/m4-1.4p
emerge =sys-apps/groff-1.17.2-r3
emerge =sys-libs/db-1.85-r1
emerge =sys-libs/db-3.2.9-r1
emerge =sys-libs/gdbm-1.8.0-r5
emerge =sys-devel/perl-5.6.1-r7
emerge =sys-devel/autoconf-2.53a
emerge =sys-devel/automake-1.6.1-r6
emerge =sys-devel/patch-2.5.4-r4
emerge =sys-libs/readline-4.2a-r1
emerge =dev-libs/expat-1.95.4
emerge =dev-lang/python-2.2.1-r5
emerge =sys-apps/debianutils-1.16.3
emerge =sys-apps/fileutils-4.1.11
emerge =sys-apps/portage-2.0.43
emerge =sys-apps/gawk-3.1.1
emerge =sys-apps/baselayout-1.8.4.2
emerge =sys-devel/binutils-2.13.90.0.4
emerge =sys-apps/texinfo-4.2-r5
emerge =sys-devel/gcc-3.2-r1
emerge =app-shells/sash-3.4-r5
emerge =dev-perl/ExtUtils-MakeMaker-6.05-r1
emerge =sys-libs/slang-1.4.5-r2
emerge =app-editors/nano-1.0.9
emerge =net-ftp/ftp-0.17-r1
emerge =net-misc/dhcpcd-1.3.20_p0-r1
emerge =net-misc/rsync-2.5.5-r1
emerge =dev-libs/openssl-0.9.6g
emerge =net-misc/wget-1.8.2
emerge =sys-apps/kbd-1.06-r1
emerge =sys-apps/cpio-2.4.2-r4
emerge =sys-apps/diffutils-2.8.4-r1
emerge =sys-apps/e2fsprogs-1.29-r1
emerge =sys-apps/ed-0.2-r3
emerge =sys-apps/fbset-2.1
emerge =sys-apps/file-3.39
emerge =sys-apps/findutils-4.1.7-r1
emerge =sys-apps/grep-2.5-r1
emerge =sys-apps/grub-0.90-r7
emerge =sys-apps/gzip-1.3.2
emerge =sys-apps/hdparm-5.2-r3
emerge =sys-apps/iptables-1.2.7a
emerge =sys-apps/less-378
emerge =sys-apps/cronbase-0.2.1
emerge =sys-apps/man-1.5k
emerge =sys-apps/man-pages-1.52
emerge =sys-apps/modutils-2.4.19
emerge =sys-apps/net-tools-1.60-r4
emerge =sys-apps/netkit-base-0.17-r6
emerge =sys-apps/procps-2.0.10-r1
emerge =sys-apps/psmisc-19-r3
emerge =sys-apps/sed-4.0.1
emerge =sys-apps/setserial-2.17-r2
emerge =sys-apps/sh-utils-2.0.15
emerge =sys-devel/flex-2.5.4a-r5
emerge =sys-apps/miscfiles-1.3
emerge =sys-libs/cracklib-2.7-r5
emerge =dev-libs/glib-1.2.10-r5
emerge =sys-libs/pwdb-0.61-r4
emerge =sys-libs/pam-0.75-r10
emerge =sys-apps/shadow-4.0.3
emerge =sys-apps/pam-login-3.7
emerge =sys-apps/sharutils-4.2.1-r6
emerge =app-arch/ncompress-4.2.4
emerge =sys-apps/tar-1.13.25-r3
emerge =sys-apps/textutils-2.1
emerge =sys-apps/util-linux-2.11u
emerge =sys-apps/which-2.14
emerge =sys-devel/bc-1.06-r3
emerge =sys-devel/bin86-0.15.5
emerge =sys-devel/bison-1.35
emerge =sys-devel/make-3.80
emerge =sys-apps/tcp-wrappers-7.6-r4
emerge =net-misc/openssh-3.5_p1
emerge =sys-apps/devfsd-1.3.25
emerge =sys-apps/cronbase-0.2.1
emerge =sys-libs/zlib-1.1.4
emerge =dev-python/python-fchksum-1.6.1
emerge =sys-apps/bzip2-1.0.2-r2
emerge =sys-libs/ncurses-5.2.20020511-r3
emerge =sys-apps/bash-2.05a-r3
emerge =sys-devel/libtool-1.4.1-r10
emerge =sys-devel/gettext-0.11.5
emerge =sys-devel/m4-1.4p
emerge =sys-apps/groff-1.17.2-r3
emerge =sys-libs/db-1.85-r1
emerge =sys-libs/db-3.2.9-r1
emerge =sys-libs/gdbm-1.8.0-r5
emerge =sys-devel/perl-5.6.1-r7
emerge =sys-devel/autoconf-2.53a
emerge =sys-devel/automake-1.6.1-r6
emerge =sys-devel/patch-2.5.4-r4
emerge =sys-libs/readline-4.2a-r1
emerge =dev-libs/expat-1.95.4
emerge =dev-lang/python-2.2.1-r5
emerge =sys-apps/debianutils-1.16.3
emerge =sys-apps/fileutils-4.1.11
emerge =sys-apps/portage-2.0.43
emerge =sys-kernel/linux-headers-2.4.19
emerge =sys-apps/gawk-3.1.1
emerge =sys-apps/baselayout-1.8.4.2
emerge =sys-libs/glibc-2.2.5-r7
emerge =sys-apps/man-1.5k
emerge =sys-apps/man-pages-1.52
emerge =sys-apps/grep-2.5-r1
emerge =sys-libs/gpm-1.20.0-r4
emerge =sys-apps/reiserfsprogs-3.6.4-r1
emerge =media-sound/alsa-driver-0.9.0_rc2
emerge =media-libs/alsa-lib-0.9.0_rc2
emerge =media-sound/alsa-utils-0.9.0_rc2
emerge =media-libs/jpeg-6b-r2
emerge =media-libs/libpng-1.2.4
emerge =media-libs/tiff-3.5.7-r1
emerge =media-libs/netpbm-9.12-r4
emerge =sys-devel/flex-2.5.4a-r5
emerge =x11-base/opengl-update-1.4
emerge =media-libs/freetype-2.1.2-r1
emerge =x11-misc/ttmkfdir-2.0
emerge =sys-apps/miscfiles-1.3
emerge =sys-libs/cracklib-2.7-r5
emerge =sys-apps/texinfo-4.2-r5
emerge =sys-devel/gcc-3.2-r1
emerge =dev-libs/glib-1.2.10-r5
emerge =sys-libs/pwdb-0.61-r4
emerge =sys-libs/pam-0.75-r10
emerge =sys-apps/ed-0.2-r3
emerge =media-libs/fontconfig-2.0-r3
emerge =app-arch/cabextract-0.6
emerge =x11-base/xfree-4.2.1
emerge =media-libs/glut-3.7-r2
emerge =media-libs/gle-3.0.1-r2
emerge =x11-libs/openmotif-2.2.2-r1
emerge =sys-devel/bc-1.06-r3
emerge =dev-libs/popt-1.6.3
emerge =dev-util/intltool-0.22
emerge =x11-libs/gtk+-1.2.10-r9
emerge =sys-apps/tcp-wrappers-7.6-r4
emerge =media-libs/audiofile-0.2.3-r1
emerge =media-sound/esound-0.2.29
emerge =gnome-base/ORBit-0.5.17
emerge =media-libs/giflib-4.1.0-r3
emerge =media-libs/imlib-1.9.14-r1
emerge =gnome-base/gnome-libs-1.4.2
emerge =media-libs/gdk-pixbuf-0.20.0
emerge =dev-util/pkgconfig-0.14.0
emerge =dev-libs/glib-2.0.6-r1
emerge =dev-libs/openssl-0.9.6g
emerge =net-libs/linc-0.5.3
emerge =dev-libs/libIDL-0.8.0
emerge =gnome-base/ORBit2-2.4.3
emerge =dev-libs/libxml2-2.4.24
emerge =gnome-base/bonobo-activation-1.0.3
emerge =gnome-base/libbonobo-2.0.0-r1
emerge =gnome-base/gnome-mime-data-2.0.1
emerge =x11-libs/pango-1.0.5
emerge =dev-libs/atk-1.0.3-r1
emerge =dev-lang/nasm-0.98.34
emerge =media-libs/libmpeg3-1.5-r1
emerge =media-libs/quicktime4linux-1.5.5-r1
emerge =dev-libs/DirectFB-0.9.12
emerge =x11-libs/gtk+-2.0.6-r2
emerge =gnome-base/gconf-1.2.1
emerge =gnome-base/gnome-vfs-2.0.4-r2
emerge =dev-libs/libxslt-1.0.20
emerge =gnome-base/libgnome-2.0.5
emerge =sys-devel/bison-1.35
emerge =media-libs/libart_lgpl-2.3.10
emerge =dev-python/PyXML-0.7.1
emerge =app-text/docbook-xsl-stylesheets-1.52.2
emerge =app-arch/unzip-5.50-r1
emerge =app-text/docbook-xml-dtd-4.1.2-r3
emerge =gnome-base/libglade-2.0.1
emerge =gnome-base/libgnomecanvas-2.0.4
emerge =gnome-base/libbonoboui-2.0.3
emerge =gnome-base/libgnomeui-2.0.5
emerge =app-text/sgml-common-0.6.3-r2
emerge =app-text/docbook-sgml-dtd-3.1
emerge =app-text/docbook-sgml-dtd-3.0
emerge =app-text/docbook-xml-simple-dtd-4.1.2.4
emerge =app-text/openjade-1.3.1-r5
emerge =dev-perl/SGMLSpm-1.03-r4
emerge =app-text/docbook-dsssl-stylesheets-1.77
emerge =app-text/docbook-sgml-dtd-4.0
emerge =app-text/docbook-sgml-dtd-4.1
emerge =app-text/docbook-sgml-utils-0.6.11-r2
emerge =app-text/scrollkeeper-0.3.11-r1
emerge =gnome-base/gnome-desktop-2.0.9
emerge =gnome-base/control-center-2.0.1.1
emerge =x11-misc/xscreensaver-4.05-r3
emerge =sys-apps/netkit-base-0.17-r6
emerge =sys-devel/binutils-2.13.90.0.4
emerge =sys-apps/gzip-1.3.2
emerge =app-arch/ncompress-4.2.4
emerge =sys-apps/tar-1.13.25-r3
emerge =media-libs/nas-1.5
emerge =media-libs/lcms-1.09
emerge =media-libs/libmng-1.0.4
emerge =x11-libs/qt-3.0.5-r2
emerge =x11-misc/bbconf-1.6
emerge =media-libs/alsa-oss-0.9.0_rc1
emerge =net-mail/mailbase-0.00-r4
emerge =net-mail/ssmtp-2.38.14-r1
emerge =sys-apps/vcron-3.0.1-r1
emerge =sys-apps/iptables-1.2.7a
emerge =sys-apps/which-2.14
emerge =dev-db/edb-1.0.3
emerge =media-libs/freetype-1.3.1-r3
emerge =media-libs/imlib2-1.0.6-r1
emerge =x11-libs/libast-0.4-r1
emerge =x11-terms/eterm-0.9.1-r5
emerge =x11-misc/commonbox-utils-0.3
emerge =dev-libs/libpcre-3.9-r1
emerge =sys-apps/supersed-3.58-r2
emerge =x11-themes/commonbox-styles-0.5
emerge =x11-wm/blackbox-0.65.0
emerge =media-gfx/xv-3.10a-r2
emerge =x11-misc/bbrb-0.4.1
emerge =sys-apps/grub-0.90-r7
emerge =sys-apps/findutils-4.1.7-r1
emerge =net-misc/wget-1.8.2
emerge =x11-misc/bbweather-0.5
emerge =x11-misc/bbrun-1.3
emerge =sys-apps/file-3.39
emerge =dev-perl/ExtUtils-MakeMaker-6.05-r1
emerge =dev-perl/Parse-RecDescent-1.80-r3
emerge =dev-perl/XML-Writer-0.4-r2
emerge =dev-perl/XML-Parser-2.31-r1
emerge =dev-perl/gtk-perl-0.7008-r7
emerge =dev-perl/ExtUtils-F77-1.14-r1
emerge =dev-perl/PDL-2.3.2-r2
emerge =media-libs/mpeg-lib-1.3.1-r1
emerge =media-gfx/gimp-1.2.3-r3
emerge =net-ftp/curl-7.9.7
emerge =net-libs/openslp-1.0.9a
emerge =net-print/cups-1.1.17_pre20021025
emerge =net-fs/samba-2.2.5-r1
emerge =net-print/foomatic-2.0.0
emerge =media-gfx/gimp-print-4.2.2
emerge =app-text/ghostscript-7.05.5
emerge =dev-libs/libxml-1.8.17-r2
emerge =gnome-base/gnome-print-0.35-r3
emerge =app-crypt/gnupg-1.0.7
emerge =net-mail/spruce-0.7.6-r2
emerge =sys-apps/modutils-2.4.19
emerge =sys-devel/make-3.80
emerge =sys-kernel/gentoo-sources-2.4.19-r9
emerge =media-video/nvidia-kernel-1.0.3123-r1
emerge =sys-apps/procps-2.0.10-r1
emerge =dev-util/dialog-0.9_beta20020519
emerge =app-admin/gentoolkit-0.1.17-r2
emerge =sys-apps/kbd-1.06-r1
emerge =net-ftp/ftp-0.17-r1
emerge =dev-libs/progsreiserfs-0.3.0.3
emerge =sys-apps/sharutils-4.2.1-r6
emerge =sys-apps/shadow-4.0.3
emerge =sys-apps/setserial-2.17-r2
emerge =sys-apps/e2fsprogs-1.29-r1
emerge =net-misc/openssh-3.5_p1
emerge =sys-apps/diffutils-2.8.4-r1
emerge =media-libs/libdvdcss-1.2.3
emerge =media-libs/libdvdread-0.9.3
emerge =media-libs/libdvdnav-0.1.3
emerge =media-libs/divx4linux-20020418
emerge =media-libs/win32codecs-0.60-r1
emerge =media-libs/libogg-1.0
emerge =media-libs/libvorbis-1.0-r1
emerge =net-nds/portmap-5b-r6
emerge =app-admin/fam-oss-2.6.9
emerge =kde-base/kde-env-3-r2
emerge =kde-base/arts-1.0.4
emerge =kde-base/kdelibs-3.0.4
emerge =media-libs/xine-lib-0.9.13-r2
emerge =media-video/xine-dvdnav-0.9.13
emerge =x11-terms/aterm-0.4.2-r3
emerge =media-video/nvidia-glx-1.0.3123
emerge =app-shells/sash-3.4-r5
emerge =sys-apps/pam-login-3.7
emerge =sys-apps/util-linux-2.11u
emerge =media-libs/a52dec-0.7.4
emerge =media-sound/mad-0.14.2b-r1
emerge =media-video/ogle-0.8.5
emerge =sys-devel/bin86-0.15.5
emerge =sys-libs/lib-compat-1.0-r2
emerge =net-www/netscape-communicator-4.79-r1
emerge =sys-apps/net-tools-1.60-r4
emerge =x11-misc/shared-mime-info-0.7
emerge =app-misc/rox-1.3.2-r2
emerge =net-misc/rdate-990821
emerge =sys-apps/sed-4.0.1
emerge =app-misc/gentoo-0.11.31
emerge =dev-libs/commonc++-1.9.7-r2
emerge =sys-apps/cpio-2.4.2-r4
emerge =sys-libs/slang-1.4.5-r2
emerge =gnome-extra/mc-4.6.0_pre1
emerge =app-games/unreal-tournament-436
emerge =sys-apps/psmisc-19-r3
emerge =net-misc/rsync-2.5.5-r1
emerge =net-misc/dhcpcd-1.3.20_p0-r1
emerge =media-libs/svgalib-1.4.3-r2
emerge =media-libs/libsdl-1.2.4.20020601
emerge =media-libs/libmikmod-3.1.10
emerge =media-libs/smpeg-0.4.4-r4
emerge =media-libs/sdl-mixer-1.2.4
emerge =app-games/gltron-0.61-r2
emerge =sys-apps/hdparm-5.2-r3
emerge =sys-apps/textutils-2.1
emerge =x11-misc/bbkeys-0.8.6
emerge =app-cdr/cdrtools-1.11.33
emerge =app-cdr/xcdroast-0.98_alpha10-r2
emerge =sys-apps/sh-utils-2.0.15
emerge =app-editors/nano-1.0.9
emerge =net-www/dillo-0.6.6-r1
emerge =x11-misc/bbappconf-0.0.1-r1
emerge =app-admin/metalog-0.6-r10
emerge =media-libs/libcdaudio-0.99.6
emerge =x11-misc/bbcd-0.3.1
emerge =x11-misc/bbpager-0.3.0-r3
emerge =sys-apps/devfsd-1.3.25
emerge =dev-java/java-config-0.2.6
emerge =dev-java/sun-jdk-1.4.1.01
emerge =app-shells/tcsh-6.11
emerge =app-arch/zip-2.3-r1
emerge =app-office/openoffice-1.0.1-r1
emerge =sys-apps/less-378
emerge =gnome-base/libglade-0.17-r6
emerge =media-video/ogle-gui-0.8.5
emerge =sys-apps/fbset-2.1
date >& rebuildfinished
echo emerge =complete


If this doesn't bail me out, I will get to practice installing Gentoo :roll:

EDIT - FIXED TYPOS
_________________
Is the sky really falling???
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Mon Nov 11, 2002 5:08 am    Post subject: Reply with quote

Is your script significantly different from the one that lx posted earlier?
_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Mon Nov 11, 2002 5:15 am    Post subject: Reply with quote

YUP!

I understand mine... 8O I assume that his was a perl script, which I have not learned yet. It is on the list though...

Also, it should be recording everything in the world file, so if I am dumb enough to repeat my blunder, I should be OK...

I just noticed that there are some things it is lacking, such as mounting /boot so grub can install and that I should have copied my /etc/fstab, /etc/X11/XF86Config, and my other important configs to a safe place, before starting it...

I'm doing all that in vt2 while the script runs in vt1.
_________________
Is the sky really falling???
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Mon Nov 11, 2002 5:48 am    Post subject: Reply with quote

Could you post your script here so that others may benefit from it?
_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Mon Nov 11, 2002 5:54 am    Post subject: Reply with quote

See the great big code box I posted above...

I saved it as /usr/portage/rebuildsystem.sh and ran it by typing:
Code:
cd /usr/portage
sh rebuildsystem.sh

_________________
Is the sky really falling???


Last edited by LugnutsForBrains on Mon Nov 11, 2002 5:59 am; edited 1 time in total
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Mon Nov 11, 2002 5:57 am    Post subject: Reply with quote

Oh, I'm sorry. I thought that was what your script generated. :oops: Did you type all that out by hand? You're hardcore. :)
_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Mon Nov 11, 2002 6:05 am    Post subject: Reply with quote

No I didn't type it by hand. I think I would have just gone for a re-install -- It would be much less typing... :wink:

It is the result of:
Code:
emerge -ep system >& systemrebuild
and
Code:
emerge -ep world >& worldrebuild
which I cut and pasted them together and did some editing to remove everything except a space before the package name and then replaced the space with "emerge =".

I also added in the date commands to see how long it takes.
_________________
Is the sky really falling???
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Mon Nov 11, 2002 9:13 am    Post subject: Reply with quote

LugnutsForBrains wrote:
I understand mine... 8O I assume that his was a perl script, which I have not learned yet. It is on the list though...


If your talking about my script, it's just plain bash, it ain't that difficult, :wink:

You can do many things with just a few commandline's, you've gotta love linux, :lol:

Cya lX.
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
lx
Veteran
Veteran


Joined: 28 May 2002
Posts: 1012
Location: Netherlands

PostPosted: Mon Nov 11, 2002 9:23 am    Post subject: Reply with quote

This is my script I use to rebuild my whole system it can do a bit of a resume (on packages level), (I use it just for fun, so without damaging my system first ;-) )

Code:
#!/bin/bash
export PKGDIR=/mnt/data/gentoo/buildall
checkpack() {
for CHK in ${BUILD}; do
    if [ "${1}" = "${CHK}" ]; then
   return 0;
    fi
done
return 1;
}

TMPNAME=/tmp/.lx_buildall_packages
PACKAGES="`emerge -p glibc baselayout texinfo gettext zlib binutils gcc | grep -e '^\[' | sed -e 's/\[.*\] //'` `emerge -p -e system | grep -e '^\[' | sed -e 's/\[.*\] //' ` `emerge -p -e world | grep -e '^\[' | sed -e 's/\[.*\] //' `"
BUILD=`cat $TMPNAME`
for PACK in ${PACKAGES}; do
    checkpack "$PACK"
    if (( $? )); then
       echo Building ${PACK}... > /dev/tty1
       emerge -b =${PACK}
       if (( $? )); then
      echo !!!Error building ${PACK}!!!!
      echo -e "\a"
      exit 1
       fi
       BUILD="${BUILD} ${PACK}"
       echo "$BUILD" > "$TMPNAME"
       sync;
    fi
done
echo FINISHED.
rm "$TMPNAME"


if you want to generate a list you only need the PACKAGES line and the replace everything between for / done with an echo =${PACK} or whatever you like:
Code:
#!/bin/bash
PACKAGES="`emerge -p glibc baselayout texinfo gettext zlib binutils gcc | grep -e '^\[' | sed -e 's/\[.*\] //'` `emerge -p -e system | grep -e '^\[' | sed -e 's/\[.*\] //' ` `emerge -p -e world | grep -e '^\[' | sed -e 's/\[.*\] //' `"
for PACK in ${PACKAGES}; do
       echo "emerge =${PACK}"
done


ps. I thought there were other (beter) scripts in tips&tricks, mine is just a quick hack. but it works for me 8O

Cya lX.
_________________
"Remember there's a big difference between kneeling down and bending over.", Frank Zappa
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Mon Nov 11, 2002 3:00 pm    Post subject: Reply with quote

Are you talking about Dolio's
emerge -pe world resuming
? I think that's a really great script. I just don't know how well it would work in this situation because I don't think it does any dependancy reconstruction. I also don't really think that your script is much of a hack; it looks pretty clean to me. :)
_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Mon Nov 11, 2002 4:11 pm    Post subject: Reply with quote

Thanks both of you. I have to admit that until I get some time to sit down with the bash documentation, these scripts are pretty greek looking to me.

I can do a basic kix script or dos batch file or even a little VBScript, but I am no programmer. Not yet anyway... :wink: I have a feeling that as my Gentoo experience progresses, that I will begin to pick up some scripting and programming skills, which I am looking forward to.

I checked the machine this morning and my caveman-ish script is still running, which I expected, as it is just a whole bunch of single commands strung together (I love find and replace). I probably should have attempted some error checking and logging, but I figured that since I was specifying versions that had already been known to install properly on this box, and had already downloaded the tar-balls, that I shouldn't have much difficulty with failures. The only thing that would be likely to fail would be grub, but that is only because /boot is not auto-mounted. I just mounted /boot before I ran the script.

Impatience is the problem for me. You see, I had just finished setting this machine up the night before. I had just managed to get all of my hardware working correctly and software to use the CDR, DVD, Sound, and Video. I went through two weeks of emerging software, configuring, re-configuring and re-configuring until I got it right and BAM! I didn't even get to play with it... sob.

It's a good thing that I actually enjoy blowing away a computer and re-building it, otherwise, this would be unsufferable.

I have one more question that arises from my self-induced fiasco:

Can anyone explain (better that man emerge does) what exactly "emerge depclean" does?

Thanks again! :)
_________________
Is the sky really falling???
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Mon Nov 11, 2002 11:34 pm    Post subject: Reply with quote

I have re-visited the man pages, help, and portage guide. Boy do I feel like an idiot. Everything that I have been complaining about is right in front of my nose. I can't figure out why I mis-interpreted them so badly. They are clear as day. :oops:

Examining the Portage manual, I found a switch that would have saved me a bunch of time. --onlydeps

I have no excuse, what is in the man pages and the help says explicitly what will happen if I were to run emerge depclean. I just didn't pay enough attention. 8O
_________________
Is the sky really falling???
Back to top
View user's profile Send private message
LugnutsForBrains
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2002
Posts: 89
Location: Mesa, AZ

PostPosted: Mon Nov 11, 2002 11:51 pm    Post subject: Reply with quote

Oh, by the way,

The computer is fixed!!! :D

Thanks again!
_________________
Is the sky really falling???
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
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