petget replacement

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
AkhIL
Posts: 3
Joined: Mon 03 Mar 2008, 00:24

petget replacement

#1 Post by AkhIL »

ok. About my expireince of using peteget.

Deinstalation of Python-2.5.1 takes 10 minutes
Some times petget writes garbage in / directory
When petget process multiple package it does one job multiple times
I have to push OK button after every installed package. Try to install 100 package 8)

I already have patch which makes deinstallation 10 times faster. But it is work around. So I suggest to do not remove directories form packagename.files and then just sort with -r this list and do rmdir if dir or remove file if file.
rmdir can't delete not empty directory so you do not need to check is it empty (eack ls -1 takes 0.2 seconds)

I can help you in developing new petget but first you have to make petget code less linear and split petget to separate gui and functional part.
Fuctional part should be fast and work without human interaction.

I already did some stuffs like:
dirsplit - part of new2dir script which split dir to EXE,DOC,DEV and NLS
mkpet - makes pet file form direcotry without questions
src2pet - compiles source and makes pet file. Can install packages from pet or compile from source, make pet and then install it.
metmerge - portage like package manager which uses all scripts above

Once again I NEED TOOL TO INSTALL\DEINSTALL PET FROM COMMAND LINE
Image

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

wow
Posts: 1052
Joined: Fri 30 Jun 2006, 00:18
Location: Peru

#3 Post by wow »

Nathan F wrote another package manager for Puppy/Grafpup which install and uninstall .tar.gz packages. I haven't used it lately but you can learn some tricks from it.

pkgtool-0.4 CLI package manager
http://www.murga-linux.com/puppy/viewtopic.php?t=15285
[url=http://www.puppylinux.com][img]http://i.imgur.com/M4OyHe1.gif[/img][/url]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#4 Post by Lobster »

I already have patch which makes deinstallation 10 times faster. But it is work around.
Welcome to the kennels
:)

The package installer is being worked on right now by Barry (as far as I know)

Please let us see your patch code :)
Last edited by Lobster on Mon 03 Mar 2008, 14:46, edited 1 time in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#5 Post by plinej »

I just hacked pkgtool to accept installation of dotpets. It will only do one at a time so you'd have to use a simple script to install multiple files. Something like:

Code: Select all

#!/bin/bash

ls *.pet | while read FILE
do
pkgtool -install "$FILE"
done
That would install all the dotpets in the current directory. Here's the hacked pkgtool script.
Attachments
pkgtool.tar.gz
(6.57 KiB) Downloaded 708 times

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#6 Post by BarryK »

Well, it is a bit delayed. I plan to work on petget soon.
Once again I NEED TOOL TO INSTALL\DEINSTALL PET FROM COMMAND LINE
petget does install and uninstall from the commandline. See some docs at the start of the script.
[url]https://bkhome.org/news/[/url]

AkhIL
Posts: 3
Joined: Mon 03 Mar 2008, 00:24

#7 Post by AkhIL »

BarryK wrote:Well, it is a bit delayed. I plan to work on petget soon.
Any chence to push petmerge as main package managing tool?
I'll share sources in few days. I have to fix some non logical parts of code.
Petmerge can be used even to automaticaly build distro from unleashed.
BarryK wrote: petget does install and uninstall from the commandline. See some docs at the start of the script.
Yes. but I have to push ok button after each package

2plinej
Nice tool. But once again you are doing:

Code: Select all

find ./$APKGNAME -mindepth 2 -mount -type f | sed -e "$APATTERN" | sed -e 's/\/root0\//\/root\//g' > ./$APKGNAME.files
find ./$APKGNAME -mindepth 2 -mount -type l | sed -e "$APATTERN" | sed -e 's/\/root0\//\/root\//g' >> ./$APKGNAME.files
but we can make deinstalation much faster by doing:

Code: Select all

find ./$APKGNAME -mindepth 2 -mount  | sed -e "$APATTERN" | sed -e 's/\/root0\//\/root\//g' > ./$APKGNAME.files
because of at uninstallation stage we will able to replace

Code: Select all

   for ONEFILE in `cat ./$APKGNAME.files`
   do
    #v2.14 if there is a .desktop file, then need to regenerate the menu...
    [ ! "`echo -n "$ONEFILE" | grep '\.desktop$'`" = "" ] && FDESK="$ONEFILE"
    #.files file may be malformed. check entry is a genuine file...
    #v2.11 some symlinks may not get removed. '-e' will not work if symlink
    #is pointing to a non-existent file. So, check for symlink...
    REMFILE=""
    [ -h $ONEFILE ] && REMFILE="yes"
    [ -e $ONEFILE ] && REMFILE="yes"
    if [ "$REMFILE" = "yes" ];then
     if [ ! -d $ONEFILE ];then
      #v2.0.0
      if [ -e /initrd/pup_ro2$ONEFILE ];then
       #the problem is, deleting the file on the top layer places a ".wh" whiteout file,
       #that hides the original file. what we want is to remove the installed file, and
       #restore the original pristine file...
       cp -af /initrd/pup_ro2$ONEFILE $ONEFILE
      else
       rm -f $ONEFILE
      fi
      #v2.0.0 also, delete empty dirs...
      DELDIR="`dirname $ONEFILE`"
      [ "`ls -1 $DELDIR`" = "" ] && rmdir $DELDIR
     fi
    fi
   done
   #v2.11 go through again and remove any empty dirs...
   #note, it is done above, but is incomplete. this should catch the rest...
   for ONEFILE in `cat ./$APKGNAME.files`
   do
    DELDIR="`dirname $ONEFILE`"
    [ -d $DELDIR ] && [ "`ls -1 $DELDIR`" = "" ] && rmdir $DELDIR
    #check one level up... but do not delete top dir, like /opt...
    DELLEVELS=`echo -n "$DELDIR" | sed -e 's/[^/]//g' | wc -c | sed -e 's/ //g'`
    if [ $DELLEVELS -gt 2 ];then
     DELDIR="`dirname $DELDIR`"
     [ -d $DELDIR ] && [ "`ls -1 $DELDIR`" = "" ] && rmdir $DELDIR
    fi
   done
   #if [ -f ./$APKGNAME.keyword ];then
   # #code here to remove menu entries etc...
   # #if it's a forced removal, due to same package existing in live-cd, don't want to
   # #remove from menus...
   # CPATTERN=""${APKGNAME}""
   # if [ "`cat /tmp/forcepkgremove.txt | grep "$CPATTERN"`" = "" ];then
   #   AKEYWORD="`cat ./$APKGNAME.keyword`"
   #   #v1.0.5
   #   /usr/sbin/fixmenus /root \-$AKEYWORD
   # fi
   #fi
   [ ! "$FDESK" = "" ] && /usr/sbin/fixmenus #v2.14
   rm -f ./$APKGNAME.*
by

Code: Select all

   #v1.0.6 do not remove w.m. menu config files...
   for ONEFILE in `cat ./$APKGNAME.files | grep -v "\\.icewm/menu" | grep -v "\\.jwmrc" | grep -v "\\.fvwm95rc" | sort -r `
   do
    #.files file may be malformed. check entry is a genuine file...
    #v2.11 some symlinks may not get removed. '-e' will not work if symlink
    #is pointing to a non-existent file. So, check for symlink...
    REMFILE=""
    if [ -d $ONEFILE ]
    then
	rmdir $ONEFILE 2> /dev/null # rmdir can't delete non empty dir!
    elif [ -h $ONEFILE ] || [ -e $ONEFILE ] 
    then
      #v2.0.0
      if [ -e /initrd/pup_ro2$ONEFILE ];then
       #the problem is, deleting the file on the top layer places a ".wh" whiteout file,
       #that hides the original file. what we want is to remove the installed file, and
       #restore the original pristine file...
       cp -af /initrd/pup_ro2$ONEFILE $ONEFILE
      else
       rm -f $ONEFILE
      fi
    fi
   done

   if [ -f ./$APKGNAME.remove ];then
    ./$APKGNAME.remove
   fi
   #if [ -f ./$APKGNAME.keyword ];then
   # #code here to remove menu entries etc...
   # #if it's a forced removal, due to same package existing in live-cd, don't want to
   # #remove from menus...
   # CPATTERN=""${APKGNAME}""
   # if [ "`cat /tmp/forcepkgremove.txt | grep "$CPATTERN"`" = "" ];then
   #   AKEYWORD="`cat ./$APKGNAME.keyword`"
   #   #v1.0.5
   #   /usr/sbin/fixmenus /root \-$AKEYWORD
   # fi
   #fi
   #v2.14 if there is a .desktop file, then need to regenerate the menu...
   grep -q '\.desktop' ./$APKGNAME.files && /usr/sbin/fixmenus #v2.14
   rm -f ./$APKGNAME.*
which will work TEN times faster, (tested with time tool)

I hope together we will made great job.
I think petget should be splited. For example petget - is nice GUI which uses pkgtool to install and uninstall packages.

And one more thing. Why you are useing so much syncs?

AkhIL
Posts: 3
Joined: Mon 03 Mar 2008, 00:24

#8 Post by AkhIL »

Ok. This is my petage. Still not works as well but compiles and installs gimp without problem.

How to build gimp:
First you have to get clean puppy301 and devx
Then check your internet connection. Petmerge will download sources for you.
Extract petage anywhere and do

Code: Select all

source env.sh
now you have to fix broken paths in .la files which come form devx. I wrote python script which did it for you (attached). but you need python to run it. So lat's get it

Code: Select all

petmerge --sources Python
after merging run

Code: Select all

python dotla_relocator.py
We are ready to get gimp:

Code: Select all

petmerge --sources gimp 
now

Code: Select all

gimp
and lat's draw 8)

you may look in distfiles dir. there is a lot of pet packages.
next time you can merge it without devx from this packages

Code: Select all

petmerge gimp
Attachments
dotla_relocator.py.gz
(714 Bytes) Downloaded 658 times
petage.tar.bz2
(14.23 KiB) Downloaded 607 times

Post Reply