projects / fglrx-packaging.git / commitdiff
Build Results
 
Summary

Description: The git repository for the ATI/AMD fglrx packaging scripts.
Last Change: Mon 8/30/10 10:11

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Thu 7/8/10 5:52
Alberto Milone  
Ubuntu: add initial... 
Sat 8/28/10 12:47
Alberto Milone  
Ubuntu: add links to the... 
Fri 8/27/10 11:22
Alberto Milone  
Ubuntu: Add support for... 
Sat 8/14/10 9:39
Anssi Hannula  
Mandriva: fix XvBA on... 
Wed 8/11/10 19:08
Anssi Hannula  
Mandriva: mark cards as... 
Wed 8/11/10 18:59
Anssi Hannula  
Mandriva: switch to using... 
 
> --git a/Slackware/ati-packager.sh b/Slackware/ati-packager.sh
index e812c9d
..b9e6a03 100755
--- a/Slackware/ati-packager.sh
+++ b/Slackware/ati-packager.sh
@@ -26,+26,@@ function _init_env
 
{
     [ $(
id -u) -gt 0 ] && echo ${MESSAGE[6]} && exit 1;

-    
BUILD_VER=1.3.3;
+    
BUILD_VER=1.3.4;

     
# ROOT_DIR = directory attuale
     
ROOT_DIR=$PWD;
@@ -
40,+40,@@ function _init_env
     strip tar tr xargs
);

     
# Comandi esterni da cui il builder dipende nella fase di installazione dei pacchetti
-    INSTALL_DEPS=(basename dirname depmod installpkg md5sum upgradepkg);
+    
INSTALL_DEPS=(basename dirname depmod installpkg lsmod md5sum modprobe ps upgradepkg);

     
# Mi assicuro che tutti i comandi interni alla bash necessari, siano abilitati
     
enable ${BUILTIN_DEPS[@]};
@@ -
227,+227,45 @@ function _buildpkg

     
return 0;
 }
+
+
# Implemente l'opzione --installpkg dello script
+function _installpkg
+{
+  
_print_with_color '1;32' "${MESSAGE[19]}";
+
+  
# Controllo l'esistenza del file temporaneo in cui sono scritti i nomi dei pacchetti
+  # da installare
+  [ ! -${TMP_FILE} ] && _print_with_color '1;31' "${MESSAGE[16]} ${TMP_FILE}${MESSAGE[17]}&& return 1;
+
+  
# Controllo che il server X non sia attivo
+  ps -C X >/dev/null && _print_with_color '1;31' "${MESSAGE[16]} ${MESSAGE[20]}&& return 1;
+
+  
# Se MODULE_IN_MEMORY == 1 il modulo è già presente in memoria
+  local MODULE_IN_MEMORY=0;
+  
lsmod grep -${MODULE_NAME%.ko.gz} && MODULE_IN_MEMORY=1;
+
+  
# Installo i pacchetti
+  for pkg in $(<${TMP_FILE});
+    do
+      if [ -
${DIR_PACKAGE}${pkg%.tgz} ]; then
+        upgradepkg --reinstall "${DEST_DIR}/$pkg"# Il pacchetto era già installato
+      elif [ -${DIR_PACKAGE}$(echo $pkg cut -d'-' -f-2)* ]; then
+    upgradepkg "${DEST_DIR}/$pkg"# Il pacchetto era installato ad una versione diversa
+      else
+    
installpkg "${DEST_DIR}/$pkg"# Il pacchetto non era installato
+      fi
+    done
+
+  
# Se il modulo è già in memoria, scarico il vecchio e
+  # ricarico il nuovo
+  if [ $MODULE_IN_MEMORY -eq 1 ]; then
+    echo "${MESSAGE[21]} ${MODULE_NAME%.ko.gz};";
+    
modprobe -${MODULE_NAME%.ko.gz};
+    
modprobe ${MODULE_NAME%.ko.gz};
+  
fi
+
+  return 
0;
+}

 
# Directory che contiene l'elenco dei pacchetti installati nelle distribuzioni
 # basate su Slackware
@@ -333,23 +372,13 @@ case $1 in
     
# Installo i pacchetti creati dall'opzione --buildpkg, il nome dei pacchetti creati
     # si trova nel file ${TMP_FILE}. Alla fine elimino suddetto file.
     
--installpkg)
-    [ ! -
${TMP_FILE} ] && echo "${MESSAGE[16]} ${TMP_FILE}${MESSAGE[17]}&& exit 1;
-
-    for 
pkg in $(<${TMP_FILE});
-    do
-        if [ -
${DIR_PACKAGE}${pkg%.tgz} ]; then
-        upgradepkg --reinstall "${DEST_DIR}/$pkg"# Il pacchetto era già installato
-        elif [ -${DIR_PACKAGE}$(echo $pkg cut -d'-' -f-2)* ]; then
-        upgradepkg "${DEST_DIR}/$pkg"# Il pacchetto era installato ad una versione diversa
-        else
-        
installpkg "${DEST_DIR}/$pkg"# Il pacchetto non era installato
-        fi
-    done
+        _installpkg;
+        
VALUE=$?;

     
rm -${TMP_FILE};
-    exit 
0;
+    exit 
$VALUE;
     ;;
-
+
     *)
     echo 
"${1}: unsupported option passed by ati-installer.sh";
     exit 
1;
diff --git a/Slackware/languages/ati-packager.en b/Slackware/languages/ati-packager.en
index dfa49a8
..6db2901 100644
--- a/Slackware/languages/ati-packager.en
+++ b/Slackware/languages/ati-packager.en
@@ -16,+16,@@ ERRORthe version of kernel must be
 ERROR
the version of glibc must be
 ERROR
:
 
file not found
-must be either blank or --dryrun
No newline at end of file
+must be either blank or --dryrun
+Install/Upgrade package/s
+must be kill server X
+Refresh module
No newline at end of file
diff 
--git a/Slackware/languages/ati-packager.it b/Slackware/languages/ati-packager.it
index 50e1fc5
..e733df1 100644
--- a/Slackware/languages/ati-packager.it
+++ b/Slackware/languages/ati-packager.it
@@ -16,+16,@@ ERROREla versione del kernel deve essere
 ERRORE
la versione delle librerie glibc deve essere
 ERRORE
:
 
file non trovato
-deve essere o blank o --dryrun
No newline at end of file
+deve essere o blank o --dryrun
+Installazione/Upgrade dei pacchetti
+si deve killare il server X
+Ricarico il modulo
No newline at e
 
Phoronix.com
Linux Driver Forums
Copyright © 2010 by Phoronix Media