Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 20 Jun 2013, 03:54
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
Making Pets that don't wipe out needed files on uninstall
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 4 [47 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
amigo

Joined: 02 Apr 2007
Posts: 1776

PostPosted: Mon 08 Aug 2011, 02:20    Post subject:  

Of course, that is not what I meant -that would lead to huge duplication of libs and giant packages. The solution is a package format which follows reasonable standards and a package manager smart enough to know where it installs every file from a package, is able to remove those same files when necessary or upgrade them. The current system is only able to 'upgrade' by forcefully installing a new version of a program or libs over the old one -and as pointed out before, it does nothing about any leftover files from the old version.

BTW, it is not just simply about tracking the program version -you also need a 'build' or 'release' number which accounts for re-builds of the same prog/lib version. For instance, when a package is incorrectly built, you should be able to rebuild the package (correctly now) and it have a new 'build' number which would clearly indicate that it is newer than the old one and be upgradable. Also, if puppy is ever to be available for other architectures besides x86_32, then packages should also have an indication of which architecture they are for.

In light of these considerations, the present system clearly fails on every point. A complete re-think is needed, starting with the format of the package -but taking into consideration all implications of repo-management, upgrading/downgrading, possible dependency management(the most difficult aspect of all -along with complete system upgrades). There is a great need for consistency in packing, which implies a standard way of creating packages, and/or a great package 'lint' program which can inspect and/or correct defective packages. But, I'm preaching to the choir here, or am I?
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 2449

PostPosted: Mon 08 Aug 2011, 02:24    Post subject:  

It's also nice to have a list of built-in files that can be compared with a pet's files before installing/uninstalling it. This generates one in /mnt/home:

Code:

#!/bin/sh

## Generate builtin file list

[ -f /tmp/files ] && rm /tmp/files
[ -f /tmp/cat_files ]  && rm /tmp/cat_files
[ -f /tmp/builtin-list ] && rm /tmp/builtin-list

ls /root/.packages/builtin_files >/tmp/files
PTH="/root/.packages/builtin_files"

while read line
 do
cat "${PTH}/${line}" >>/tmp/cat_files
done < /tmp/files

while read line
 do
    VAR=`echo ${line} | grep \/`
       if [ "$VAR" ]; then
         DIR="$VAR"
       else
         FILE="${DIR}/${line}"
         echo "$FILE" >>/tmp/builtin-list
      fi

 done < /tmp/cat_files
cp /tmp/builtin-list  /mnt/home/

## clean up

rm /tmp/files /tmp/cat_files /tmp/builtin-list
echo "builtin filelist is in /mnt/home/builtin-list"
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 1776

PostPosted: Mon 08 Aug 2011, 11:13    Post subject:  

There should be *no* 'built-in' files. Every file should be part of a single package which can be installed, removed upgraded, etc. It seems like a good idea, jam a bunch of stuff into a single image and call it a 'base' installation, but that concept is at the core of the problem with puppy package management -how can you manage these built-ins? We have had a special program which could remove parts of the base, but why have a special program to do it at all? A simple list of all the base files doesn't help when we want to remove coherent parts of that base, update it or whatever. Everything should simply be part of an individual package to keep track of it. There should only be very limited exceptions to that 'rule' -as said before, many packages contain a script which should be run before or after installation or removal of the package. They commonly create links and sometimes even directories, but they should not create any files. In short, any actions taken by scripts during installation should be accountable (reversable if needed) when the package is removed.
The whole approach of a main 'blob' of content with only extras as packages just is not workable. I know that my saying so will only make those who believe in that system try even harder to make it work -more complex, hackish workarounds to cover up a fundamental design error.
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3033
Location: Oregon

PostPosted: Mon 08 Aug 2011, 11:26    Post subject:  

Flash wrote:
Thank you, amigo. I agree, the solution is to give every application its own directory which also contains all the dependencies the application needs. Smile


If I remember correctly, Apple does that sort of thing with it's applications.
To install an application, all you have to do is add the application directory.
To remove it, you just had to drag the directory to trash.
As to handling menu entries for the applications though, I am unsure of how that was done.

In Puppy though, more than one application may use the same supporting files. And a separate directory for each application with needed support files included would be a lot of duplication of those files.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 2449

PostPosted: Mon 08 Aug 2011, 12:51    Post subject:  

8-bit wrote:


In Puppy though, more than one application may use the same supporting files. And a separate directory for each application with needed support files included would be a lot of duplication of those files.


As long as updates are reflected in .packages/builtin_files, I can make sure my locally installed pets aren't clobbering or deleting anything (needed by the built-ins) It's best if local pets get installed to /usr/local, but unless rebuilt, many aren't. I also run an "in use" check when uninstalling.
I also like to check for duplicate files already installed when looking at a pet.
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3033
Location: Oregon

PostPosted: Mon 08 Aug 2011, 16:57    Post subject:
Subject description: Never ever make a PET when you are tired!
 

I want to confess!
When I made a PET for system_info, I was very tired and all the things I should have checked never happened.

So, when creating a Pet Package, be sure to check it out on Puppy booted with "pfix=ram".
In doing so, I discovered that Puppy Lucid 520 does not have "zenity" or "sensors" as well as supporting files for them.
And that means I must have installed them either through an update or as a pet or tar.gz and forgot about it.

So I learned a lesson.
Always, always check your Pet on Puppy booted with "pfix=ram".

That is because trying to remember everything you installed is almost impossible.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 9911
Location: Arizona USA

PostPosted: Mon 08 Aug 2011, 21:30    Post subject:  

8-bit, is that bit of wisdom to be found anywhere in the various threads and Wiki articles that describe how to make a .pet for Puppy?
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3033
Location: Oregon

PostPosted: Mon 08 Aug 2011, 22:51    Post subject:  

Flash,
Thank you for letting me know what I should have known all along.
As if I do not feel bad enough at myself for not following instructions and other posts about PET creation.
At any rate, I apologize to all that this may have created a problem for!
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 9911
Location: Arizona USA

PostPosted: Mon 08 Aug 2011, 23:59    Post subject:  

I wasn't trying to make you feel bad. I thought you did a good thing! Very Happy Booting Puppy from a CD with pfix=ram in order to check for dependencies sounds to me like a simple and easy way to insure your .pet will work for everyone who uses that version of Puppy.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 2449

PostPosted: Tue 09 Aug 2011, 01:42    Post subject:  

8-bit wrote:

As if I do not feel bad enough at myself for not following instructions and other posts about PET creation.


Check around a bit, and suddenly you won't feel bad. For example, I just downloaded audacity-1.3.12-lucid525.pet from Lucid repository. I checked after PFIX=RAM, and still found that it clobbers a bunch of already installed libs (and yes, I'm using lucid525) The last two are in the built-in files (so I'm guessing the others would uninstall?) The package is also full of useless manuals, etc. See.....don't you feel better now?

/usr/lib/libXfixes.so.3.1.0
/usr/lib/libICE.so.6.3.0
/usr/lib/libICE.so.6
/usr/lib/libXfixes.so.3
/usr/lib/libSM.so.6
/usr/lib/libSM.so.6.0.1
/usr/lib/libXdamage.so.1.1.0
/usr/lib/libXdamage.so.1
/lib/libdrm.so.2.4.0
/lib/libdrm.so.2
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3033
Location: Oregon

PostPosted: Tue 09 Aug 2011, 02:58    Post subject:  

An uninstall of that PET would answer the question as to if built in files would get deleted.
In my case, I assumed, mistakenly, that zenity was a bulit in file in Lupu 520. After booting it with "pfix=ram" I found out it was not.
So from now on, I am going to check PETS I write by booting with "pfix=ram" and see what dependencies it needs that are not in the built in files.

Also, since zenity, although still being supported by the developers, now requires an updated gtk 3.0 to compile, I am going to recommend yad with a system link to it called zenity.

There are a few users that have downloaded and installed the system_info.pet package I made and so far, other than one user not having a system link to gtkdialog3 of gtkdialog, and another that requested a smaller window version for his smaller screen resolution, I have received no further feedback.
I can also say the same for a specialized utility I created to format both USB and internal floppy disks.
So I will remember to check and double check any Pet packages I make to see if I can crash them before releasing them.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 2449

PostPosted: Tue 09 Aug 2011, 03:10    Post subject:  

8-bit wrote:
An uninstall of that PET would answer the question as to if built in files would get deleted.


Reportedly only the builtins remain, so the other clobbered libs would get deleted. I added them back after uninstalling the package. I repackaged audacity without the already installed libs and got rid of the manuals/docs...which saved 720K in addition to making it safe to uninstall in the future. The point is, check them before you install..even if they're in the repository.
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3033
Location: Oregon

PostPosted: Tue 09 Aug 2011, 03:39    Post subject:  

I have a little utility called "unzipper_dragndrop" that wil make a directory with the same name as a PET and uncompress the PET to that directory. It helps me to see what is in a PET before installing it.
I guess one thing I would like to see is an option in Puppy Package Manager to be able to download a PET without installing it.
It seems that every time I try out a new Puppy version, I am installing the same PET packages.
If I have the option to just download the PET, I can use it later and save the bandwidth it takes using Puppy Package Manager to install them each time.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 2449

PostPosted: Tue 09 Aug 2011, 03:52    Post subject:  

8-bit wrote:
I have a little utility called "unzipper_dragndrop" that wil make a directory with the same name as a PET and uncompress the PET to that directory. It helps me to see what is in a PET before installing it.
I guess one thing I would like to see is an option in Puppy Package Manager to be able to download a PET without installing it.
It seems that every time I try out a new Puppy version, I am installing the same PET packages.
If I have the option to just download the PET, I can use it later and save the bandwidth it takes using Puppy Package Manager to install them each time.


It's really just a targz file. You can download from http://distro.ibiblio.org/puppylinux/
Back to top
View user's profile Send private message 
puppyluvr


Joined: 06 Jan 2008
Posts: 3053
Location: Chickasha Oklahoma

PostPosted: Tue 09 Aug 2011, 08:42    Post subject:  

Very Happy Hello,
I rename every package *.tar.gz, and unpack it into a directory, and have a look inside, before I install it..

Couldnt the PPM parse /root/.packages and compare against a list of builtins before uninstalling?

@8-bit..
I once released a remastered Puplet..
In short order, a user emailed me..
From my account, to explain that I should clean things up a bit before releasing... Embarassed
Live and learn.. Wink

_________________
"Close the "Windows", and open your eyes, to a whole new world"
http://puppylinuxstuff.meownplanet.net/puppyluvr/
http://theplpd.webs.com/

Nothing but Puppy since 2.15CE...
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 4 [47 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Suggestions
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0755s ][ Queries: 13 (0.0058s) ][ GZIP on ]