A .pet I made does not contain all the files in the folder

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

A .pet I made does not contain all the files in the folder

#1 Post by chrome307 »

Hi there

I have attempted to compile xvid 1.32 and ended up with a directory of files.

From within that directory I used new2dir make install and ended up with a pet file, however this does not contain all the files in the original folder.

If anyone can give give me some tips/advice that would be great.

Built using Lucid 528-005

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#2 Post by Karl Godt »

new2dir uses installwatch script and installwatch.so to create a /tmp/pkginstall.lst file which contains a lot of unneeded entries .

My actual line looks like this :

$INSTALL_WATCH_EXE\
-o /tmp/pkginstall.list\
${MAKE}
I am having the problem that on one 511 and 430 installation new2dir make install would end up in a neverending loop without instlling anything.

So i made a workaround for this using find command :

Code: Select all

echo "
searching for modified files '$F_TYPE' '$MMIN' .."
echo -n "In /usr .."
F=`find /usr $F_TYPE $MMIN`
echo -n " /etc .. "
if [ ! "`echo "$EXE_TARGETDIR" | grep 'cups'`" ];then
E=`find /etc $F_TYPE $MMIN | grep -vi 'cups'`  #certs file gets updated apparently by cupsd
else
E=`find /etc $F_TYPE $MMIN`
fi
echo -n " /sbin .. "
S=`find /sbin $F_TYPE $MMIN`
echo -n " /bin .. "
B=`find /bin $F_TYPE $MMIN`
echo -n " /lib .. "
L=`find /lib $F_TYPE $MMIN`
echo " /var .. "
V=`find /var $F_TYPE $MMIN`

C="$F
$E
$S
$B
$L
$V"
C=`echo "$C" |sort`

Code: Select all

function strip_func(){
#strip the file...
 if [ ! -h "$1" ];then #make sure it isn't a symlink
  FILE_FILE=`file "$1" | grep 'ELF'`
  #[ ! "`file "$1" | grep 'ELF' | grep 'shared object'`" = "" ] && strip --strip-debug "$1"
  #[ ! "`file "$1" | grep 'ELF' | grep 'executable'`" = "" ] && strip --strip-unneeded "$1"
  [ "`echo "$FILE_FILE" |grep 'shared object'`" ] && strip --strip-debug "$1"
  [ "`echo "$FILE_FILE" |grep 'executable'`" = "" ] && strip --strip-unneeded "$1"
 fi
 sync
}
function strip_it(){
[ "`echo "$1" | grep -e '\.[[:alnum:]]*$' |grep -vEe '\.so$|\.so.[\.[0-9]]*$'`" ] && return 0
strip_func
}
function copy_files(){
if [ -f "$1" ];then
strip_it "$@"
cp -a $INTERACTIVE "${1}" "${2}${1}"
elif [ -L "$1" ];then
RL=`readlink "$1"`
RLF=`readlink -f "$1"`
RLE=`readlink -e "$1"`
RLM=`readlink -m "$1"`
RLS="$RL
$RPF
$RPE
$RLM"
RLS=`echo "$RLS" |sort -u`
for j in $RLS;do
cp -a $INTERACTIVE "${j}" "${2}${j}"
done
fi
}

Code: Select all

for i in $C ; do
echo "$i"

dn="${i%/*}"

if [ "`echo "$i" | grep -Ei '\.la$|\.a$|\.h$|\.m4$|\.pc$|\-config$|config.sh$|Conf.sh$|/aclocal/|/cvs/|/svn/'`" ];then
mkdir -p "${DEV_TARGETDIR}${dn}"
copy_files "$i" "${DEV_TARGETDIR}"
with several elif down .

Code: Select all

new2dir -h
/usr/bin/new2dir [-new2dir_option1 -option2 ..] make [make_options] install[-doc|-etc..]

Script to list installed files by 'make install' using
'installwatch/checkinstall pkg' and to copy these files into a
seperate directory to easily be packaged further .
Also strips binaries automatically and libraries to reduce size .

Script specific options :
-c) forcibly delete already existing destination directory(s);
default is to rename .
-d) debug by 'set -x' .
-f) answer all dialog questions automatically:yes,cpu-type,
split-level(-f default = 3); includes -k .
-h) show this usage .
-V) show version information .
-i) interactive modes for binaries used by this script .
-I/path/to/bin/installwatch) if installwatch script to use
to monitor make install is installed not first in the PATH .
-k) keep binaries and libraries unstripped .
-K) strip only installed bins and libs .
-l) run with logsave -a /tmp/new2dir.log .
-u) update already existing _DESTDIR s , do not delete _DESTIR s .
-M) Menu for selecting various used executables .
-m #) set the MMIN level for the find command in -r mode below;
default is -2 (means to look for modified files not
older than the last two minutes) .
-A #) switch to AMIN instead of MMIN for above
-C #) switch to CMIN instead of MMIN for above
-r) rescue mode if installwatch does not work . Does not strip .
-v) give verbose output by '2>&1' .

For make specific options, see 'man make|make --help' .

I have added the strip functions for the Rescue Mode (find) part just today and not tested .

To run the find way :

Code: Select all

make install
new2dir -f -r  
Attachments
new2dir.bz2
(8.12 KiB) Downloaded 360 times

Post Reply