Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Update 0.1.4.0_beta10 [git] --toolchain, --perl
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6 ... 9, 10, 11  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Sat Jan 05, 2008 12:09 pm    Post subject: Reply with quote

I have a recurring problem with update-0.1.4.0_beta3b when upgrading linux-headers:
Code:
Toolchain: sys-kernel/linux-headers is being upgraded
        This requires a rebuild of glibc afterwards which will be done by this script.
@ About to cancel, Y to proceed (y/N)?
** Toolchain: upgrading linux-headers
* Checking dependencies for sys-kernel/linux-headers-2.6.23-r3..done
[Toolchain] Upgrading sys-kernel/linux-headers
* Downloading gentoo-headers-2.6.23-5.tar.bz2
* (50.48 KB/s) - `/usr/portage/distfiles/gentoo-headers-2.6.23-5.tar.bz2' saved [8185]
* Patching:done
* Patching:done
* Patching:done
* Patching:done
* Patching:done
* Patching:done
* Patching:done
** Compiling Source ...
** Installing sys-kernel/linux-headers-2.6.23-r3
** Uninstalling sys-kernel/linux-headers-2.6.23-r2
** sys-kernel/linux-headers-2.6.23-r3 installed successfully.
Packages installed so far: 1 of 1.      14 remaining
* Checking dependencies for sys-libs/glibc..done
! Toolchain: sys-libs/glibc not in list
!! update: !! sys-kernel/linux-headers-2.6.23-r3 has been emerged; it is important that you emerge glibc ASAP. -- Emerge of sys-libs/glibc failed.

This happens on 3 systems (2 x86 & 1 amd64) ...

Greetz
swimmer
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Jan 05, 2008 7:54 pm    Post subject: Reply with quote

Damn sorry about that swimmer, it's supposed to deal with that ok. Ah well regression ftl :)
Quick workaround is just to update glibc and then carry on.
You should still be able (i hope) to use update -1 glibc if you want to use update -r afterwards for the original list. (It should work for any 0-9 and means it uses a subdirectory for that run, which can also be resumed.)
I'll look into sorting that asap.
Back to top
View user's profile Send private message
ryker
Guru
Guru


Joined: 28 May 2003
Posts: 412
Location: Portage, IN

PostPosted: Thu Feb 07, 2008 4:48 pm    Post subject: Reply with quote

I finally found this thread again. I don't know why, but I have a really hard time finding it. I know I could create a bookmark, but that would be too easy. ;)
This script really needs an ebuild so it's easy for everyone to find it and update to the latest version.
I noticed that there is a new version on the server: 20080109. I'm giving it a run right now. So far so good.
Thanks again for all of your hard work.
_________________
Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM
Back to top
View user's profile Send private message
LXj
Tux's lil' helper
Tux's lil' helper


Joined: 03 Dec 2005
Posts: 107

PostPosted: Tue Feb 12, 2008 6:07 pm    Post subject: Reply with quote

Thanks for the script, overlay is highly needed ;)

Two suggestions:
1. There should be a more clear explanation of -i option. And actually a man-like listing of all non-emerge options
2. Please show the current time for ** messages. Currently I always run your script in one console and tail -f /var/log/emerge.log | formatlog in another (formatlog is my script which converts dates in emerge.log to readable format)

Edit: Also, a question: how am I supposed to upgrade glibc? This script just skips it...
Back to top
View user's profile Send private message
ryker
Guru
Guru


Joined: 28 May 2003
Posts: 412
Location: Portage, IN

PostPosted: Tue Feb 12, 2008 7:01 pm    Post subject: Reply with quote

LXj wrote:
Thanks for the script, overlay is highly needed ;)

Two suggestions:
1. There should be a more clear explanation of -i option. And actually a man-like listing of all non-emerge options
2. Please show the current time for ** messages. Currently I always run your script in one console and tail -f /var/log/emerge.log | formatlog in another (formatlog is my script which converts dates in emerge.log to readable format)

Edit: Also, a question: how am I supposed to upgrade glibc? This script just skips it...


Agree with your suggestions.

It looks like your answer to upgrading glibc is two posts above. ;)
_________________
Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM
Back to top
View user's profile Send private message
m_gustafsson
Apprentice
Apprentice


Joined: 18 Mar 2007
Posts: 243
Location: Sweden

PostPosted: Wed Feb 13, 2008 6:58 am    Post subject: Reply with quote

One question...
What is the function of the noCompile in /etc/update?
On my computer I don't want to have gnome-extra/gnome-screensaver installed so I put it into the parenthesis after no-compile:
Code:
# cat /etc/update | grep noCompile
# These are: noCompile, noRebuild, and noDowngrade
noCompile=(gnome-extra/gnome-screensaver)


but still it is among the ebuilds that will be emerged if I run:
Code:
# update

** Emerging -uDN world then running revdep-rebuild.
** Resolving..

These are the packages that would be merged, in order:

Calculating world dependencies  ... done!
[ebuild  N    ] gnome-extra/gnome-screensaver-2.20.0  USE="opengl pam -debug


Thanks for a nice script :-)
Back to top
View user's profile Send private message
m_gustafsson
Apprentice
Apprentice


Joined: 18 Mar 2007
Posts: 243
Location: Sweden

PostPosted: Wed Feb 13, 2008 8:12 am    Post subject: Reply with quote

Hmm, sorry for my other post :oops:
The script does of course do what was expected...
It just lists all ebuilds that would be updated etc, and the a bit further down it says that gnome-screensaver is skipped.
Sorry...
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Feb 13, 2008 6:44 pm    Post subject: Reply with quote

Hi guys, glad people are still using this. Just to say sorry; I've got a stinking flu, and am unable to code atm. Development has been a bit slower over last couple of months, but we should have a new version out soon.
@ryker: yeah somehow looking for 'update' doesn't narrow things down ;) I was hoping to put an ebuild together once 0.1.4 is finished (just depclean and bugfixing to go.) I'll post a preview for the pkgcore i/f once I'm feeling a bit better and have fixed a glitch in it (that's why that version was on server, ryker, it was for uberpinguin to add pmerge, which he's done nicely! :D) And yeah, I know we still need to fix the tmpfs thing and add highlighting of errors.

@LXj: Hmm, ok, we'll add the timing thing. Have you used -l at all? Not sure about it logging via syslog (which is normally /var/log/messages) maybe it should be writing to a user-defined file? (default to /var/log/update or w.e) I have nfc about a man page tbh.

@m_gustafsson: heh np, thanks for using it :-)
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 605
Location: Manchester, CT, USA

PostPosted: Wed Feb 27, 2008 4:26 am    Post subject: Reply with quote

I absolutely love using this script :mrgreen:
THANK YOU!

Got this error after autounmasking though -
Code:
# update -s
** Emerging -uDN world then running revdep-rebuild.
# You will be asked for confirmation; CTRL-C to abort at any time
** Syncing portage tree
** Updating eix
 * Removing old portage-cache in /var/cache/edb/dep ...                   [ ok ]
 * Running emerge --metadata ...                                          [ ok ]
 * Copying old /var/cache/eix cache to /var/cache/eix.previous ...        [ ok ]
 * Running update-eix ...                                                 [ ok ]
Diffing databases (12396 - 12398 packages)
[>]   == app-antivirus/klamav (0.41 -> 0.42): KlamAV is a KDE frontend for the ClamAV antivirus.
[*>]  == app-emulation/vmware-server ([M]~1.0.3.44356 ~1.0.4.56528 -> 1.0.4.56528): VMware Server for Linux
[>]   == app-i18n/man-pages-ja (20060415-r2 -> 20070515): A collection of manual pages translated into Japanese
[>]   == app-i18n/man-pages-pl (20051024 -> 20070628): A collection of Polish translations of Linux manual pages.
[U]   == dev-libs/libmowgli (0.6.0@02/25/08; 0.6.0 -> 0.6.1): High-performance C development framework. Can be used stand-alone or as a supplement to GLib.
[*>]  == media-gfx/xsvg (~0.2.1 -> 0.2.1): a command line viewer for SVG files
[>]   == sys-fs/mdadm (2.6.2 -> 2.6.4): A useful tool for running RAID systems - it can be used as a replacement for the raidtools
[U]   == sys-libs/readline (5.2_p7@12/31/07; 5.2_p7 -> 5.2_p12-r1): Another cute console display library
[<]   == www-apps/mediawiki (1.8.5(1.8.5)!m 1.11.1(1.11.1) -> 1.11.1(1.11.1)): The MediaWiki wiki web application (as used on wikipedia.org)
[U]   == www-client/mozilla-launcher (1.56@10/13/07; 1.56 -> 1.58): Script that launches mozilla or firefox
[>]   == www-servers/lighttpd (1.4.18 -> 1.4.18-r1): Lightweight high-performance web server
[>]   == x11-terms/roxterm (1.7.4 -> 1.9.1): A terminal emulator designed to integrate with the ROX environment
[N]   >> dev-embedded/urjtag (~0.8): tool for communicating over JTAG with flash chips, CPUs, and many more (fork of openwince jtag)
[N]   >> media-libs/rubberband (~1.0.1): An audio time-stretching and pitch-shifting library and utility program
** Resolving..

These are the packages that would be merged, in order:

Calculating world dependencies  ..

!!! Problem resolving dependencies for app-misc/freemind

!!! All ebuilds that could satisfy "dev-java/xsd2jibx" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-java/xsd2jibx-0.2a_beta (masked by: ~amd64 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.
(dependency required by "app-misc/freemind-0.9.0_beta15" [ebuild])

!!! Depgraph creation failed.
** Do you want to unmask the following packages?
app-misc/freemind-0.9.0_beta15
** Autounmask (Y/n)?

 autounmask version 0.21 (using PortageXS-0.02.07 and portage-2.1.4.4)

 * Using repositories:
     /usr/portage
     /usr/local/portage

 * Using package.keywords file: /etc/portage/package.keywords
 * Using package.unmask file: /etc/portage/package.unmask

 * Unmasking app-misc/freemind-0.9.0_beta15 and its dependencies.. this might take a while..

 * Added 'dev-java/xsd2jibx ~amd64' to /etc/portage/package.keywords
 * Added 'dev-java/jibx ~amd64' to /etc/portage/package.keywords
 * Added 'dev-java/hoteqn ~amd64' to /etc/portage/package.keywords
 * Added 'dev-java/simplyhtml ~amd64' to /etc/portage/package.keywords
 * Added 'dev-java/groovy ~amd64' to /etc/portage/package.keywords
 * Added 'dev-java/asm ~amd64' to /etc/portage/package.keywords
 * Added 'dev-java/xstream ~amd64' to /etc/portage/package.keywords
 * done!

/sbin/update: line 1563: quitPhase: command not found
System is up to date.

It wrongly says "up to date" instead of doing the pending updates, or the packages it just unmasked.
_________________
Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Feb 27, 2008 6:05 am    Post subject: Reply with quote

Yeah that's fixed in the 20080109 version, om; sorry forgot about the bug.
http://dev.gentooexperimental.org/~igli/src/update/update-20080109
md5: 65218b557aad0d4f875d46944c18d1a0

I'll post it as link in main post (it has the same version number but I don't think anyone will mind ;)

edit: got in trouble with work for new version as I borrowed some ideas and code (it's half-mine anyhow! well ok not the best half..) Nearly ready, and they agreed we can put it out under CC Attribution-NonCommercial-ShareAlike so it shouldn't affect anyone. At least we'll be able to use the full lib for 0.1.5 so that'll make things a lot quicker to code. Meh, I hate this crap.
_________________
creaker wrote:
systemd. It is a really ass pain

update - "a most excellent portage wrapper"

#friendly-coders -- We're still here for you™ ;)


Last edited by steveL on Mon Mar 10, 2008 4:46 am; edited 1 time in total
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Fri Feb 29, 2008 3:00 pm    Post subject: Reply with quote

@steveL

Thanks for such a useful tool. I just recently found this last week when you mentioned it in another thread.
_________________
John

My gentoo overlay
Instructons for overlay


Last edited by drescherjm on Fri Feb 29, 2008 3:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Fri Feb 29, 2008 3:22 pm    Post subject: Reply with quote

I am not sure if this is one of the goals of the update script or not but I have began adding a very important feature for myself. The feature is about limited recovery of failed packages. Since I manage dozens of gentoo boxes I see some errors that are very easily fixed in a predictable way and I have always wanted to have a script do some of this for me instead of the ebuild failing then some manual steps for me to do to recover.

One such failure is:
Code:
x86_64-pc-linux-gnu-g++ -O2 -ffast-math -march=k8 -O2 -pipe -fomit-frame-pointer -msse3 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -o .libs/codeblocks app.o appglobals.o compilersettingsdlg.o crashhandler.o dlgabout.o dlgaboutplugin.o environmentsettingsdlg.o infopane.o main.o prefix.o printdlg.o scriptconsole.o scriptingsettingsdlg.o splashscreen.o startherepage.o -pthread  -L/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/src/wxAUI /var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/src/wxAUI/.libs/libwxaui.a /usr/lib64/libgtk-x11-2.0.so /usr/lib64/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libpangoft2-1.0.so /usr/lib64/libpango-1.0.so /usr/lib64/libcairo.so /usr/lib64/libfontconfig.so /usr/lib64/libfreetype.so /usr/lib64/libxml2.so /usr/lib64/libpng12.so -lm -lz /usr/lib64/libXrender.so /usr/lib64/libX11.so /usr/lib64/libXau.so /usr/lib64/libXdmcp.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so /usr/lib64/libglib-2.0.so -L/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/sdk /var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/sdk/.libs/libcodeblocks.so -L/usr/lib64 -L/usr/X11R6/lib64 -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_dbgrid-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_odbc-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8 -lpthread -ldl
/usr/lib64/libwx_gtk2u_adv-2.8.so: undefined reference to `g_assertion_message_expr'
collect2: ld returned 1 exit status
distcc[24706] ERROR: compile (null) on localhost failed
make[3]: *** [codeblocks] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/work/codeblocks-2.0_pre4866/src'
make: *** [all-recursive] Error 1
 *
 * ERROR: dev-util/codeblocks-2.0_pre4866 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3064:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed"
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/environment'.
 * This ebuild is from an overlay: '/usr/local/portage/gentoo-overlay/'
 *


In this failure the error line is:
Code:
/usr/lib64/libwx_gtk2u_adv-2.8.so: undefined reference to `g_assertion_message_expr'


Which can easily be found by looking at the bottom 30 lines and using grep.

The fix for this error is very simple. Strip that line down to
Code:
/usr/lib64/libwx_gtk2u_adv-2.8.so


And then do an equery belongs on that file to find out what package or packages this file is from. Then inject these into the list of things to emerge in the script before the current failed package and force update not to terminate if no packages were built on this pass.

I have this working in my modified update script and it has saved me for over 20 packages on my home desktop. I did run the update script on a few machines at work to update them to current and it never failed once. However I know from the code there that if the injected package to rebuild does not fix the problem it will be injected again at each pass. This could easily be fixed by adding the injected packages to a file and a grep to make sure it is not already there but I did not do that yet.

Here is the complete run with the modifyied update:
Code:
# /root/shell-scripts/update codeblocks
** Resolving..

These are the packages that would be merged, in order:

Calculating dependencies  ... done!
[ebuild   R   ] dev-util/codeblocks-2.0_pre4866  USE="contrib unicode -debug" 0 kB [1]

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage/gentoo-overlay
Checking dev-util/codeblocks-2.0_pre4866        dev-util/codeblocks-2.0_pre4866
** Rebuilding dev-util/codeblocks
* ${ESVN_OPTIONS} contains -r, this usage is unsupported. Please
* see ${ESVN_REPO_URI}
* subversion update start -->
*      repository: svn://svn.berlios.de/codeblocks/trunk
*    working copy: /usr/portage/distfiles/svn-src/codeblocks-2.0_pre4866/trunk
* QA Notice: USE Flag 'vanilla' not in IUSE for dev-util/codeblocks-2.0_pre4866
* Patching:done
** Compiling Source ...
* Code::Blocks source tree has been configured. *
* ERROR: dev-util/codeblocks-2.0_pre4866 failed.
* Call stack:
*               ebuild.sh, line   49:  Called src_compile
*             environment, line 3064:  Called die
* The specific snippet of code:
*       emake || die "emake failed"
*  The die message:
*   emake failed
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/environment'.
* This ebuild is from an overlay: '/usr/local/portage/gentoo-overlay/'
/usr/lib64/libwx_gtk2u_adv-2.8.so: undefined reference to `g_assertion_message_expr'
R x11-libs/wxGTK-2.8.7.1-r1 x11-libs/wxGTK-2.8.7.1-r1 0
These are the packages that would be merged, in order:

Calculating dependencies ... done!
[ebuild   R   ] x11-libs/wxGTK-2.8.7.1-r1  USE="X doc gnome odbc opengl -debug -gstreamer -pch -sdl" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
emerge -pv =x11-libs/wxGTK-2.8.7.1-r1
x11-libs/wxGTK-2.8.7.1-r1

!! dev-util/codeblocks-2.0_pre4866 failed to install.
! Failed so far: x11-libs/wxGTK-2.8.7.1-r1 dev-util/codeblocks-2.0_pre4866
!! 1 packages, 2 processed.
x11-libs/wxGTK-2.8.7.1-r1: tail -n30 /var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/build.log
dev-util/codeblocks-2.0_pre4866: tail -n30 /var/tmp/portage/dev-util/codeblocks-2.0_pre4866/temp/build.log
@ Retrying 2 packages:
  x11-libs/wxGTK-2.8.7.1-r1, dev-util/codeblocks-2.0_pre4866

Checking x11-libs/wxGTK-2.8.7.1-r1      x11-libs/wxGTK-2.8.7.1-r1
** Rebuilding x11-libs/wxGTK - 1 of 2
* Checking wxPython-src-2.8.7.1.tar.bz2 RMD160 SHA1 SHA256
* Unpacking wxPython-src-2.8.7.1.tar.bz2 to x11-libs/wxGTK-2.8.7.1-r1
* Patching:.......done
** Compiling Source ...
** Installing x11-libs/wxGTK-2.8.7.1-r1
** x11-libs/wxGTK-2.8.7.1-r1 installed successfully.
Checking dev-util/codeblocks-2.0_pre4866        dev-util/codeblocks-2.0_pre4866
** Rebuilding dev-util/codeblocks - 2 of 2
* ${ESVN_OPTIONS} contains -r, this usage is unsupported. Please
* see ${ESVN_REPO_URI}
* subversion update start -->
*      repository: svn://svn.berlios.de/codeblocks/trunk
*    working copy: /usr/portage/distfiles/svn-src/codeblocks-2.0_pre4866/trunk
* QA Notice: USE Flag 'vanilla' not in IUSE for dev-util/codeblocks-2.0_pre4866
* Patching:done
** Compiling Source ...
* Code::Blocks source tree has been configured. *
** Installing dev-util/codeblocks-2.0_pre4866
** dev-util/codeblocks-2.0_pre4866 installed successfully.
** All packages compiled successfully
2 passes were required.


A second failure case where a fix is easy comes from using confcache. I know for a fact that confcache does not work with every package so rebuilding an entire system it may cause failures for 2 to 5 packages. This failure the in last few lines of the log you will find "econf failed". Although this is not the only cause for econf failed in my case it is the most common. The fix for this (although it is not in my modified update) is to rebuild the package with FEATURES="-confcache"

And finally. Building the docs for packages fail for probably 4 to 10 packages on my systems. One such package is net-misc/iputils. It would be nice to see the emerge retried with USE="-doc" in the case that it is detected that a doc build fails.
_________________
John

My gentoo overlay
Instructons for overlay


Last edited by drescherjm on Fri Feb 29, 2008 7:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Fri Feb 29, 2008 5:16 pm    Post subject: Reply with quote

drescherjm wrote:
I am not sure if this is one of the goals of the update script or not but I have began adding a very important feature for myself. The feature is about limited recovery of failed packages. Since I manage dozens of gentoo boxes I see some errors that are very easily fixed in a predictable way and I have always wanted to have a script do some of this for me instead of the ebuild failing then some manual steps for me to do to recover.

Yes it is one of the goals, John, and what you've done in your modifications is excellent!
Quote:
A second failure case where a fix is easy comes from using confcache. I know for a fact that confcache does not work with every package so rebuilding an entire system it may cause failures for 2 to 5 packages. This failure the in last few lines of the log you will find "econf failed". Although this is not the only cause for econf failed in my case it is the most common. The fix for this (although it is not in my modified update) is to rebuild the package with FEATURES="-confcache"

That sounds like another useful one, and we already check FEATURES. Could you add that too, or in any case can you get in touch with us on irc.freenode.org in #friendly-coders? (I'm igli.) This last one could be made optional, but I think the first one should always run, since it's clear which lib needs upgrading. If neither case trigger, we need the tail output to go through a colourisation.
Quote:
And finally. Building the docs for packages fail for probably 4 to 10 packages on my systems. One such package is net-misc/iputils. It would be nice to see the emerge retried with USE="-doc" in the case that it is detected that a doc build fails.

Yeah that's a nice one; it'll help with fresh installs as well. New version we're working on now has USE handling, but the data has been there for a while in the flags array. It'd be cool to have this stuff integrated for the final version of 0.1.4. :-)
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Fri Feb 29, 2008 5:28 pm    Post subject: Reply with quote

BTW, thanks for your comments. :)

Here is my diff based on the previous release 20071121

A few notes. I am by no means a bash guru more like a long time windows programmer who has had very limited bash programming. Also one of the fixes in here is an update for revdep-rebuild to work with the ~ version of getntoolkit which had a problem with the color option.

Code:
# diff -Naru /home/john/update /root/shell-scripts/update
--- /home/john/update   2008-02-29 12:26:25.000000000 -0500
+++ /root/shell-scripts/update  2008-02-24 23:40:44.000000000 -0500
@@ -458,13 +458,16 @@

 # fail pkg [silent]
 fail() {
-       echo "$1" >> "$failFile"
-       failList+=("$1")
        [[ $logFile ]] && {
+               process_reasons
                fR+=("$1: tail -n30 $logFile")
                echo "$1: tail -n30 $logFile" >> "$reasonsFile"
                logFile=
        }
+
+       echo "$1" >> "$failFile"
+       failList+=("$1")
+
        if [[ $emergeFile = $warnList ]]; then
                grep -qF "$1" "$mainEmergeFile" && let pA++
        fi
@@ -473,6 +476,79 @@
        ((round)) || log "$1 failed"
 }

+process_reasons() {
+       tail -n30 $logFile > $dir/lastFailure
+       grep failure $dir/lastFailure
+       grep undefined $dir/lastFailure
+
+#      grep undefined $dir/lastFailure | awk '{ print $1 }' | uniq | grep : | sed 's/://' | xargs -n1 -i equery belongs {} | head -1 >> "$failFile"
+       fail_other `grep undefined $dir/lastFailure | awk '{ print $1 }' | uniq | grep : | sed 's/://' | xargs -n1 -i equery belongs {}`
+
+       echo $failList
+}
+
+CpArray_Mac() {
+# Assignment Command Statement Builder
+
+    echo -n 'eval '
+    echo -n "$2"                    # Destination name
+    echo -n '=( ${'
+    echo -n "$1"                    # Source name
+    echo -n '[@]} )'
+
+# That could all be a single command.
+# Matter of style only.
+}
+
+declare -f CopyArray                # Function "Pointer"
+CopyArray=CpArray_Mac               # Statement Builder
+
+InsertArray() {
+
+# Input the array named $1.
+# Insert string $2.
+# Pos to insert $3
+
+    [ -z "$3" ] &&  return;
+
+    local n=$3
+
+    local -a TMP
+
+    local -a First
+
+    $($CopyArray $1 First)
+    TMP=( ${First[@]:0:n} $2 ${First[@]:n} )
+    $($CopyArray TMP $1)
+}
+
+fail_other() {
+       until [ -z "$1" ]  # Until all parameters used up . . .
+       do
+                InsertArray buildType "R" $p
+               InsertArray list "$1" $p
+               InsertArray oldVer "$1" $p
+               InsertArray sizes "0" $p
+
+               echo -n "${buildType[p]}" "${list[p]}" "${oldVer[p]}" "${sizes[p]}"
+
+               let p++
+               let added++
+               fR+=("$1: tail -n30 $logFile")
+               echo "$1: tail -n30 $logFile" >> "$reasonsFile"
+
+               emerge -pv ="$1" 2> /dev/tty |tee >(stripList >> "$emergeFile")
+               echo emerge -pv ="$1" 2> /dev/tty |tee >(stripList >> "$emergeFile")
+
+#              emerge -pv ="$1" | grep USE >> "$emergeFile"
+
+               echo "$1" >> "$failFile"
+               failList+=("$1")
+               shift
+       done
+
+}
+
 installedNow=()
 # installed pkg [silent]
 installed() {
@@ -812,7 +888,7 @@
 # - if Setup, won't check list at all
 checkType() {
 local l idx= line=
-       #echo "Checking $*"
+       echo "Checking $*" "$TAB$1"
        old=
        new=
        pfx=
@@ -3019,7 +3095,7 @@
                done # next in list
                ((p==tot)) || errMsg "$tot packages, $p processed."
                # Stop when can't install anything
-               ((n)) || { reportFailure; return 1; }
+               ((n+added)) || { reportFailure; return 1; }
                # Installed something; any failures?
                f=${#failList[@]}
                if ((f)); then
@@ -3116,7 +3192,8 @@
 revdepR() {
        startPhase "$how"
 #      echo "$# args: $*"
-       revdep-rebuild -i -pq "$@" $colourOpt 2>/dev/null | tee "$usrFile"
+       echo revdep-rebuild -i -pq "$@"
+       revdep-rebuild -i -pq "$@" 2>/dev/null | tee "$usrFile"
        r=$PIPESTATUS
        ((r)) && { checkCTRLC $r revdep 'Unable to resolve revdep-rebuild'; quitPhase; }
        grep -qF "$OK" "$usrFile" || {
@@ -4319,6 +4396,7 @@
 p=0
 # n = num successfully compiled
 n=0
+added=0
 if ((resume)); then
        pf=${#failList[@]}
        if ((pf>=tot)); then { pf=0; failList=(); fR=(); }

_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 605
Location: Manchester, CT, USA

PostPosted: Sun Mar 02, 2008 9:25 pm    Post subject: Reply with quote

steveL wrote:
Yeah that's fixed in the 20080109 version, om; sorry forgot about the bug.
http://dev.gentooexperimental.org/~igli/src/update/update-20080109
md5: 65218b557aad0d4f875d46944c18d1a0


Almost fixed :P
I get the y/N message this time around after auto-unmasking, but no prompt. The script just exits.

Code:
# update -s
** Emerging -uDN world then running revdep-rebuild.
# You will be asked for confirmation; CTRL-C to abort at any time
** Syncing portage tree [getting file list] ..
-----------------8<-----------------8<-----------------8<-----------------------------
]0;Resolving emerge -uDN world** Resolving..

These are the packages that would be merged, in order:

Calculating world dependencies  .

!!! Problem resolving dependencies for app-misc/freemind

!!! All ebuilds that could satisfy ">=dev-java/junit-3.8.2:0" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-java/junit-3.8.2-r1 (masked by: ~amd64 keyword)

For more information, see MASKED PACKAGES section in the emerge man page or
refer to the Gentoo Handbook.
(dependency required by "dev-java/groovy-1.5.4" [ebuild])

!!! Depgraph creation failed.
** Do you want to unmask the following packages?
dev-java/junit-3.8.2-r1
dev-java/groovy-1.5.4
** Autounmask (Y/n)?
y

 autounmask version 0.21 (using PortageXS-0.02.07 and portage-2.1.4.4)

 * Using repositories:
     /usr/portage
     /usr/local/portage

 * Using package.keywords file: /etc/portage/package.keywords
 * Using package.unmask file: /etc/portage/package.unmask

 * Unmasking dev-java/junit-3.8.2-r1 and its dependencies.. this might take a while..

 * Added 'dev-java/junit ~amd64' to /etc/portage/package.keywords
 * done!

]0;Resolving emerge -uDN world** Resolving..

These are the packages that would be merged, in order:

Calculating world dependencies ... done!
[ebuild     U ] dev-python/sip-4.7.3 [4.7.1] USE="-debug" 436 kB
[ebuild     U ] dev-java/junit-3.8.2-r1 [3.8.1-r3] USE="-doc -source" 451 kB
[ebuild  N    ] dev-java/jline-0.9.91  USE="-doc -source -test" 733 kB
[ebuild  N    ] dev-java/ant-antlr-1.7.0  0 kB
[ebuild  N    ] dev-java/bsf-2.4.0-r1  USE="python -doc -examples -javascript -source -tcl" 293 kB
[ebuild     U ] dev-java/groovy-1.5.4 [1.0-r1] USE="(-bsf%)" 6,738 kB
[ebuild     U ] net-p2p/transmission-1.0.6 [1.0.4] USE="gtk" 4,134 kB

Total: 7 packages (4 upgrades, 3 new), Size of downloads: 12,783 kB
* 7 in total
@ About to cancel, Y to proceed (y/N)?
#

Thanks again
_________________
Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Mar 10, 2008 7:48 am    Post subject: Reply with quote

om wrote:
Almost fixed :P
I get the y/N message this time around after auto-unmasking, but no prompt. The script just exits.

Hmm if I'm honest I didn't test that properly (it used to wfm, promise ;) autounmask was kinda sucky so I backported the new version:
wget -O /sbin/update http://dev.gentooexperimental.org/~igli/src/update/update-20080110
md5: 34f58f3afaa39fb0bb4e23c93ab931f1

Still not totally happy with it in that it does -n for stuff in world/listed on cmd-line, no parameter for others, but the -n will filter down to deps; maybe we shouldn't do it for cmd-line stuff unless it's in world or about to be?

We should be able to separate out the target and unmask it ourselves if it's simple, with no versions, etc.. Sets in 2.2 will have to factor into this at some point. We'll get there ;-)

@John: Thanks for the patch; we'll definitely have that functionality, perhaps implemented slightly differently. New version is nearly ready; we'll add it once the USE editor's finished, along with other error stuff. I'll break out a diff for that part when we add it, so you can see how your spec is incorporated.
Here's some docs you might like:
friendlyToaster wrote:

man bash | http://bash-hackers.org/wiki/doku.php?id=scripting:basics | http://wooledge.org/mywiki/BashGuide | http://wooledge.org/mywiki/BashFAQ | http://wooledge.org/mywiki/BashPitfalls | http://www.shelldorado.com/ | and of course | http://forum.bash-hackers.org/ ;)
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Mar 10, 2008 4:18 pm    Post subject: Reply with quote

Quote:
Thanks for the patch; we'll definitely have that functionality, perhaps implemented slightly differently. New version is nearly ready; we'll add it once
the USE editor's finished, along with other error stuff. I'll break out a diff for that part when we add it, so you can see how your spec is incorporated.
Here's some docs you might like:


:)

Thank You. I fully expected my code to be modified. I know this feature is difficult to test and I wrote the patch based on a few cases that happened to me a while upgrading machines at home and at work a few weeks back so if you have any questions what I was trying to accomplish with parts of the patch I can help there. One thing I would like to mention is that in a few cases the injection was absolutely necessary. I mean when rebuilding a library to fix the first breakage you may hit other libraries that have the same problem.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Fri Mar 14, 2008 8:12 am    Post subject: Reply with quote

drescherjm wrote:
Thank You. I fully expected my code to be modified. I know this feature is difficult to test and I wrote the patch based on a few cases that happened to me a while upgrading machines at home and at work a few weeks back so if you have any questions what I was trying to accomplish with parts of the patch I can help there. One thing I would like to mention is that in a few cases the injection was absolutely necessary. I mean when rebuilding a library to fix the first breakage you may hit other libraries that have the same problem.

Yeah that makes a lot of sense; hopefully we can start to work on this stuff now the list editing is almost done ;P

[edit: old pre-release deleted]

NB: This is work in-progress. It works fine for USE editing with single package.use file; we'll add the directory code soon. There should be some other bugs fixed, eg in ABI rebuilding, plus it works with pkgcore (although pkgcore doesn't display fetch sizes.) List editing is the best bit though :-)


Last edited by steveL on Tue Mar 18, 2008 5:38 am; edited 1 time in total
Back to top
View user's profile Send private message
achimh
n00b
n00b


Joined: 02 Sep 2006
Posts: 54
Location: Austria

PostPosted: Sun Mar 16, 2008 3:36 pm    Post subject: Reply with quote

I just came across your script, the last version of it to be exact.

I gave it a try, albeit I did a emerge -uDN world yesterday.

So out of curiosity I tried update without any parameters nevertheless.

One package that does not work is alsa-sound, no suprise I know about this, I deselected in the update list editor, and the next question whether I not want to continue with the update I answered with 'Y'. The next question:

Code:
@ Nothing selected. Do you want to quit? (y/N)?


When I type 'y' it does not quit, update list editor is shown.
When I type 'N' it quits.

Little bit strange, isn't it? :D

I will give it again a shot when there is something substantial to update on my box.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Mar 17, 2008 10:23 am    Post subject: Reply with quote

achimh wrote:
Code:
@ Nothing selected. Do you want to quit? (y/N)?


When I type 'y' it does not quit, update list editor is shown.
When I type 'N' it quits.

Little bit strange, isn't it? :D

Heh indeed, Achim, it is; I'll get on to it later today.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Tue Mar 18, 2008 5:36 am    Post subject: Reply with quote

wget -O /sbin/update http://dev.gentooexperimental.org/~igli/src/update/update-20080318
bbc0df8c73621f85e19a4fe322e822ca /sbin/update

same version, sue me ;)
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 605
Location: Manchester, CT, USA

PostPosted: Thu Mar 20, 2008 2:35 pm    Post subject: Reply with quote

Are there any plans to support dispatch-conf, the official Portage config file updater?

The backups that dispatch-conf makes are not ignored by update -
Code:
# update -s
!! You have 123 config file updates pending!
--------8<----------------8<----------------
** About to cancel, Y to proceed, E to edit list (N y e) N
! Config file updates pending
# cfg-update -l
Searching for updates...
No ._cfg0000_* files found...
# dispatch-conf


EDIT: looks like update is reading these files -
Code:
#cd /var/lib/cfg-update/backups
#ls -laR | grep '._old-cfg_' | wc -l
124
#ls -laR | grep '._new-cfg_' | wc -l
124

_________________
Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it.
Back to top
View user's profile Send private message
ryker
Guru
Guru


Joined: 28 May 2003
Posts: 412
Location: Portage, IN

PostPosted: Thu Mar 20, 2008 3:28 pm    Post subject: Reply with quote

OmSai wrote:
Are there any plans to support dispatch-conf, the official Portage config file updater?...


Sorry, this is a little off topic, but I couldn't resist commenting on that. I don't see anywhere in the handbook, dispatch-conf touted as the 'official' config file updater. AFAIK etc-update is still the closest thing to an 'official' config file updater. I really don't care at all for dispatch-conf. If I had to vote for a config file updater, I would say cfg-update beats them all, hands down.
_________________
Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Thu Mar 20, 2008 4:00 pm    Post subject: Reply with quote

ryker wrote:
OmSai wrote:
Are there any plans to support dispatch-conf, the official Portage config file updater?...


Sorry, this is a little off topic, but I couldn't resist commenting on that. I don't see anywhere in the handbook, dispatch-conf touted as the 'official' config file updater. AFAIK etc-update is still the closest thing to an 'official' config file updater. I really don't care at all for dispatch-conf. If I had to vote for a config file updater, I would say cfg-update beats them all, hands down.

LMAO that was hilarious! Sorry i'm in a silly mood today, and that just cracked me up. I've been using etc-proposals for over a year, but have to say I prefer dispatch-conf out of the box; I just couldn't get my head round cfg-update. Here's a tip on setting up dispatch-conf btw. It'd be good to have some similar info for cfg-update I guess; I just love the way etc-proposals pops up in whichever desktop I'm on with a nice QT4 (could be gtk) GUI. It runs nicely from cmd-line as well when your X is borked ;)

To answer your question OmSai, you just need to set configUpdater=dispatch-conf in /etc/update. update -h config will always show you the latest config settings with their defaults.
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 605
Location: Manchester, CT, USA

PostPosted: Thu Mar 20, 2008 4:16 pm    Post subject: Reply with quote

steveL wrote:
To answer your question OmSai, you just need to set configUpdater=dispatch-conf in /etc/update. update -h config will always show you the latest config settings with their defaults.
Thank you!
_________________
Gentoo is the stick-shift of Linux.
You work it manually, it has somewhat better performance, but it's really for the fun of it.
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 Previous  1, 2, 3, 4, 5, 6 ... 9, 10, 11  Next
Page 5 of 11

 
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