You are not logged in.

#1 2007-01-23 07:37:56

kyku
Member
Registered: 2006-02-07
Posts: 24

Rebuilding installed packages.

Hello again,

I'd like to know how to optimize my system by rebuilding installed (and only installed except builddeps perhaps) packages using makepkg or makeworld.
Are there some scripts or ready solutions?

Thanks in advance.

Offline

#2 2007-01-23 09:57:42

clarence
Member
From: fremantle.au
Registered: 2005-10-12
Posts: 294

Re: Rebuilding installed packages.

Doesn't makeworld do that already as long as you have changed your build options in /etc/makepkg.conf ?


fck art, lets dance.

Offline

#3 2007-01-23 12:52:22

kyku
Member
Registered: 2006-02-07
Posts: 24

Re: Rebuilding installed packages.

clarence wrote:

Doesn't makeworld do that already as long as you have changed your build options in /etc/makepkg.conf ?

Could you please specify which options you mean?

Offline

#4 2007-01-23 13:42:19

clarence
Member
From: fremantle.au
Registered: 2005-10-12
Posts: 294

Re: Rebuilding installed packages.

For instance changing the default from

export CFLAGS="-march=i686 -O2 -pipe"

to

export CFLAGS="-march=pentium4 -O1 -pipe"

The gentoo wiki has everything you ever wanted to know about compiler options here http://gentoo-wiki.com/CFLAGS


fck art, lets dance.

Offline

#5 2007-01-23 18:27:38

kyku
Member
Registered: 2006-02-07
Posts: 24

Re: Rebuilding installed packages.

clarence wrote:

For instance changing the default from

export CFLAGS="-march=i686 -O2 -pipe"

to

export CFLAGS="-march=pentium4 -O1 -pipe"

The gentoo wiki has everything you ever wanted to know about compiler options here http://gentoo-wiki.com/CFLAGS

You misunderstood me. I know about the CFLAGS and the likes, these are already configured.
What I want to do is to rebuild from source all packages I've INSTALLED with pacman. In other word I'd like to install from source what I already have installed in binary. If I do makeworld it will build entire group in ABS tree. I don't think this is necessary. I ONLY want to build and reinstall the packages that are installed on my system.  Doing this manually with makepkg is boring.

Offline

#6 2007-01-23 19:35:24

Xarturkhann
Member
From: Ankara
Registered: 2006-02-17
Posts: 55

Re: Rebuilding installed packages.

Usage: /usr/bin/makeworld [options] <destdir> <category> [category]

ok some example:
this is for custom packages.

cd /var/abs
mkdir my-pkgbuild
mkdir my-packages

cp -R /var/abs/office/acroread /var/abs/my-pkgbuild
cp -R /var/abs/network/firefox /var/abs/my-pkgbuild

in /var/abs

makeworld -c my-packages my-pkgbuild

2nd example:
this is for all base packages...

cd /var/abs
mkdir my-package
makeworld -c my-packages base

3th example:
this is for extra/multimedia-plugins...

cd /var/abs
mkdir my-package
makeworld -c my-packages extra/multimedia-plugins

4th example:
this is for base & extra/editors &  kernels...

cd /var/abs
mkdir my-package
makeworld -c my-packages base extra/editors kernels

Offline

#7 2007-01-23 20:37:10

clarence
Member
From: fremantle.au
Registered: 2005-10-12
Posts: 294

Re: Rebuilding installed packages.


fck art, lets dance.

Offline

#8 2007-05-07 13:57:44

Urkburk
Member
From: Stockholm, Sweden
Registered: 2007-05-07
Posts: 17

Re: Rebuilding installed packages.

Here's how I rebuild every package installed on my system, except those not found in aur tree, and those already installed as source smile

#!/bin/bash

#
# Update abs tree and pacman db
#
abs
pacman -Sy

#
# Get list of installed packages
#
pkglist=`pacman -Q | cut -d' ' -f1 | paste -s`

#
# Locate each package in abs tree
#
for pkg in $pkglist; do 
    search=`find /var/abs/ -type d -name $pkg`

    echo
    echo "Searching for: $pkg"
    echo "Result: $search"
    
    # Add it to makelist or norebuildlist
    pkgbuild="$search/PKGBUILD"
    if [ -f "$pkgbuild" ] ; then
        # Check if its already installed from source
        source=`srcpac -Qi $pkg | grep 'Source         :'`
        if [ "$source" = "Source         : No" ] ; then
            makelist="$makelist $pkg"
        else
            echo "Package was already built from source..."
            norebuildlist="$norebuildlist $pkg"
        fi
    else
        norebuildlist="$norebuildlist $pkg"
    fi
done

#
# Show list of packages not found in abs
#
echo
echo "Packages that won't be rebuilt:"
echo "-------------------------------"
echo
echo "$norebuildlist"

#
# Show list of packages to build
#
echo
echo "Packages to build:"
echo "------------------"
echo
echo "$makelist"

#
# Write to treebuildlist file
#
echo $makelist > treebuildlist
echo
echo "...wrote list to file: treebuildlist"

#
# Build the packages using aurbuild
#
echo
echo "Starting build..."
echo "-----------------"
echo
srcpac -Sb $makelist


echo
echo "-----------------------------------------------------------"
echo "                    REBUILD COMPLETE!"
echo "-----------------------------------------------------------"
echo

Offline

Board footer

Powered by FluxBB