Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eapi5 sub-slots rebuilding ... portage alpha purpose?
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
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Thu Apr 18, 2013 1:06 pm    Post subject: eapi5 sub-slots rebuilding ... portage alpha purpose? Reply with quote

At first I didnt understand eapi5, because I just saw some weird "unmathematical" series of slots in addition to the simple slots which I knew already.

How cool is that, I don't have to care about revdep-rebuild anymore when xorg-server is updated:
Code:
...
[ebuild  r  U  ] x11-base/xorg-server-1.14.1:0/1.14.1 [1.14.0:0/1.14.0] 5,381 kB
[ebuild  rR    ] x11-drivers/xf86-input-keyboard-1.7.0  0 kB
[ebuild  rR    ] x11-drivers/xf86-input-evdev-2.8.0  0 kB
[ebuild  rR    ] x11-drivers/xf86-video-vesa-2.3.2-r1  0 kB
[ebuild  rR    ] x11-drivers/xf86-input-mouse-1.9.0  0 kB
[ebuild  rR    ] x11-drivers/xf86-video-nouveau-1.0.7  0 kB
...

Is there any purpose of sys-apps/portage-2.2.0_alpha, do we need these alphas anymore?
(It was aimed to fully implement the mathematical theory of sets with portage alpha. But I doubt this will be reached ever. Especially if there is no real purpose anymore.)
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Thu Apr 18, 2013 2:00 pm    Post subject: Reply with quote

There's still purpose. Set math was also to be supported and this makes some very useful things possible. For example, in a full system recompile, where you want to recompile the @system set first and then everything else, being able to specify something like (I'm not sure exactly what the envisioned syntax is):
Code:
emerge --emptytree (@world - @system)
for the "everything else" case neatly eliminates redundant compilation. I for one am looking forward to that.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sun Apr 21, 2013 7:32 am    Post subject: Reply with quote

John R. Graham wrote:
For example, in a full system recompile, where you want to recompile the @system set first and then everything else ...
Code:
emerge --emptytree (@world - @system)
for the "everything else" case neatly eliminates redundant compilation

Sounds great, but is erronous lazy thinking:

emerge -1 @system
shows the @system set only has 50 ebuilds, but

emerge --emptytree @system
what is what you have done before, has done already ca 500 rebuilds. You will spare 10 percentage of the double work.
I have a better idea: The portage-2.1.xx versions already have the feature of user created sets. So here is my script
/usr/local/bin/myolderbuilds
Code:
#!/bin/bash
# licenced GPL2 by Ralph Ulrich

b_showAge=1
b_overwriteOldOlderbuildset=0
f_olderbuilds="/etc/portage/sets/olderbuilds"
set -e
helpexit() {
  echo ""
  echo "   Help: $0 <INT>"
  echo "         gives a set of INT hours older builds of your system"
  echo "Example: $0 24"
  echo " Result: a set @olderbuilds of >1day old installs"
  echo "   then: emerge -1 @olderbuilds"
  echo "         works with stable portage"
  echo "         Misuse with 0 to show your latest builds!"
  exit 1
}
[ "$1" = "-h" ] && helpexit
[ "$1" = "--help" ] && helpexit
if [ -z "$1" ] ; then
   echo ""
   echo "  Error: missing integer parameter age in hours!"
   helpexit
fi
if [ "${b_overwriteOldOlderbuildset}" = "0" ]; then
   if [ -e "${f_olderbuilds}" ] ; then
      echo ""
      echo "  Error: set file exists! Please"
      echo "         rm ${f_olderbuilds}"
      helpexit
   fi
fi
mkdir -p "/etc/portage/sets"
touch "${f_olderbuilds}"
export now=$(date +%s)
export s=$(( $1 * 3600 ))
s=$(( ${now} - $s ))

cd "/var/db/pkg" || exit 2
find . -type f -name "BUILD_TIME" -exec grep -H -e'^1' '{}' \;  \
 |sed -e's/..//' -e's/\(^.*\):\(.*$\)/\2 \1/' -e's/-100dpi/xYYY/' -e's/-75dpi/XyXX/' \
                          -e's/-[0-9]..*$//' -e's/xYYY$/-100dpi/' -e's/XyXX$/-75dpi/'\
 |sort \
 |while read old line ; do
    if [[ $s -gt ${old} ]] ; then
       #l="${line:2}" ;#line="${l%-[0-9]*}"
       if [ "${b_showAge}" = "1" ] ; then
          older=$(( ${now} - ${old} ))
          echo "$(( ${older} / 86400 )) days  ${line}">&2
       fi
       echo "${line}"
    fi
  done>"${f_olderbuilds}"
echo ""
echo "  created file:    ${f_olderbuilds}"
echo "  use for example:        emerge -1 @olderbuilds"
# Changelog
# 2013-04-21 catch -100dpi and -75dpi before cutting the version tail
It is only a handfull of script command lines getting a much better result! I assume the other ca five use cases of portage-alpha could be scripted likewise easily ...

Last edited by ulenrich on Sun Apr 21, 2013 2:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sun Apr 21, 2013 7:53 am    Post subject: Reply with quote

ulenrich wrote:
emerge -1 @system
shows the @system set only has 50 ebuilds, but

emerge --emptytree @system
what is what you have done before

No, for most cases (toolchain upgrade etc) you have only done emerge -1 @system before. Actually, I usually have done only emerge -1 @toolchain before (where toolchain is my own set consisting of - surprise - toolchain packages).
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sun Apr 21, 2013 7:55 am    Post subject: Reply with quote

John R. Graham wrote:
Code:
emerge --emptytree (@world - @system)

For this case, if would be sufficient if --exclude would accept sets (which is not the case yet). Then you could simply do:
Code:
emerge @world --exclude @system
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sun Apr 21, 2013 8:11 am    Post subject: Reply with quote

mv wrote:
would be sufficient if --exclude would accept sets (which is not the case yet). Then you could simply do:
Code:
emerge @world --exclude @system
This sounds so easy to implement in my (normal) user ears:
simply expanding all ebuild names to "--exclude category/name"
I wonder this is not done yet?

@mv,
but do you know of any other use cases of the alpha series of portage?
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sun Apr 21, 2013 8:16 am    Post subject: Reply with quote

ulenrich wrote:
but do you know of any other use cases of the alpha series of portage?

@revdep-rebuild
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sun Apr 21, 2013 8:24 am    Post subject: Reply with quote

mv wrote:
@revdep-rebuild
It is not possible to substitude this totally by using sub-slots?
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sun Apr 21, 2013 8:36 am    Post subject: Reply with quote

ulenrich wrote:
mv wrote:
@revdep-rebuild
It is not possible to substitude this totally by using sub-slots?

No, there are some different use cases. For instance, libraries where the old version is needed until everything is recompiled (e.g. because an important system tool would break, preventing you from recompiling).
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1480

PostPosted: Sun Apr 21, 2013 8:56 am    Post subject: Reply with quote

mv wrote:
For instance, libraries where the old version is needed until everything is recompiled (e.g. because an important system tool would break, preventing you from recompiling).
Ah, yes. This is when I get the hint at the end:

Please use
revdep-rebuild -L NAME

But still I wonder:
Using portage-2.1.xx I have user sets. Why not should portage-2.1xx be able to also create a set @preserve-rebuild?
As I also wondered (above) why with alpha --exclude @set is not implemented yet:

There might be corner cases I cannot imagine as a simple user ...

But I can imagine an extra tool, something like qlist for sets, outside of portage, could seperate problems and make things more tranparent:
qsetcreate @world --exlcude @system
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