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 Mon 09 Dec 2019, 03:37
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Multiple package installation/removal with PPM
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 24 [351 Posts]   Goto page: 1, 2, 3, ..., 22, 23, 24 Next
Author Message
mavrothal


Joined: 24 Aug 2009
Posts: 3088

PostPosted: Wed 03 Dec 2014, 14:50    Post subject:  Multiple package installation/removal with PPM  

There is a long standing request for PPM to be able to install or remove multiple packages simultaneously and without further user intervention, the way "big" package managers do Very Happy .
Here is the Project's github site

See the videos "tutorials of the new PPM_auto and the older ppm_multi versions of the revised Puppy Package Manager

The PPM modification has 2 parts. One is to introduce the /usr/loac/petget/installwindow.sh and removewindow.sh scripts that intervenes in the package selection process with corresponding modifications in ui_{Ziggy,Classic} scripts and allows packages to be accumulated in the "install window". There is also a new installed_size_preview.sh script to calculate the needted space for the installation of all the selected packages and a reportwindow.sh script to report cumulative installation results
The second part of changes is on the check_deps.sh, installpkg.sh, downloadpkgs.sh, installpreview.sh and removepreview.sh scripts where default values are passed to some variables.
You can choose to downloads packages with or without dependencies and to install packages with any dependencies (installing packages with no dependencies is deem as a source of unnecessary frustrations...)
You can still run PPM interactively the way PPM runs traditionally and go through the usual dialogs for every package in the install/remove list.

This is currently beta stage. So although fairly usable, backup your save-file/folder Wink.

Please test and report any bugs (and if possible their solution Wink ) as best as you can.
Please do not request features before you test and see what is provided.

Attached is a pet, a patch-set and few pics showing the features.

Note the pet is build for Slacko/Tahr-6 and other puppies build from the current woof-CE. Although it does work with older puppies of all flavours, version 5.5 or greater (tested to work in slacko 5.5-5.7, precise 5.6-5.7.2, racy 5.5 - fails in Lucid 5.2.8 and slacko-5.3.1), I do not indent to look at backwards compatibility problems/bugs at this point.

Note 2The pet is not compatible with the choose-download-folder pet, though the patches work either way Wink

Edit: v2 allows simultaneous installation from different repos. Blocks repetitive entries in the installwindow. Adds a cumulative report window. Is pretty usable Very Happy

Edit 2: v3 allows removal of multiple packages too. Fixes some reporting issues.
Re-uploaded v3 by mistake so I deleted the original v3. It actually has a minor fix for the appearance of an "rm" file at /root (typo).

Edit 3: v4 provides the option to instal or download only the packages in the list with or without their dependencies (for download).

Edit 4: v5 Calculates the total size needed for installation of the selected packages and any dependencies they may have. Please test for accuracy as it may be a bit pessimistic.
v5 also checks for missing dependencies for all uses-installed packages and fixes menus only after the installation of all the packages.
v5 looks feature-complete for me.

Edit 5: v6 Provides the option to remove a package from the install/remove window without cancelling and restarting the entire process.
v6 also has a more accurate pre-calculation of the required installation size
I think v6 is all I can do!

Edit 6: v7 has no new functions/features but rather some bug fixes. Specifically:
Do not chock during multiple package removal in full installs (where no installed packages should depend on a removed package for the package to be removed).
Fix a typo that was bypassing the dependencies dialog (not function) when in the traditional "supervised" mode.
Fix a case where the old install/remove-list dialogs failed to close upon addition of new items.
Add the installed dependencies in the overall installation report.

Edit 7: v8 implements the "silent" mode suppressing all the PPM popups common during installation and replaces them with a small terminal window that shows activity.
It also eliminates the Xmessage dialogs and you can now choose the mode of installation from the install/remove list window.
Finally it fixes a bug in cases we auto download packages without dependencies.- BUGGY

Edit 8: v9 fix a major bug with dependencies in silent mode. Thanks to MochiMoppel for discovering it.
Minor cosmetic changes

Edit 9: v10 (or maybe 1.0 Wink ) Pre-calculates accurately the required size for installation. It also runs indexgen.sh after PPM is closed speeding up the process considerably. Plus small cosmetic changes.
Ooops. ppm_multi-10.pet was a malformed pet. 10R should be OK.

Edit 10: v11 has the following improvements (from the git log Wink )
Do not allow a second instance or install/removewindow
fix typo in the instalwindow.sh rxvt call
Check needed space only in auto mode
Title terminal as the function
Correct typos

Edit 11: v12 does not allow simultaneous automatic installation and removal. Tell us how you feel about it Wink

NOTE: After a month or so of further development and debugging the new PPM has reached version 1.0 and the pet is renamed to ppm_auto. Now, thanks to Zigbert the UI looks much better.

Latest version is here (or maybe after that if I'm lazy Very Happy )
NewPPM_inst.png
 Description   
 Filesize   108.06 KB
 Viewed   950 Time(s)

NewPPM_inst.png

NewPPM_remv.png
 Description   
 Filesize   106.32 KB
 Viewed   940 Time(s)

NewPPM_remv.png

ppm_multi-12.pet
Description  Does not allow simultaneous automatic installation and removal
pet

 Download 
Filename  ppm_multi-12.pet 
Filesize  50.23 KB 
Downloaded  593 Time(s) 
ppm_multi-11.pet
Description 
pet

 Download 
Filename  ppm_multi-11.pet 
Filesize  50.15 KB 
Downloaded  575 Time(s) 
multi_remove.jpg
 Description   
 Filesize   51.4 KB
 Viewed   1665 Time(s)

multi_remove.jpg


_________________
== Here is how to solve your Linux problems fast ==

Last edited by mavrothal on Wed 04 Feb 2015, 17:18; edited 61 times in total
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2543
Location: In The Way

PostPosted: Thu 04 Dec 2014, 08:25    Post subject:  

I tried to upgrade gawk. First I used remove-builtin to uninstall gawk-3 then used your ppm to install gawk-4, unattended, what happened then it got stuck in a loop! Couldn't find awk or dependency... after reopening ppm I installed gawk-4 no problem.

EDIT: Another small bug, I began unattended install of apt and continued to search for autoconf, when I selected to install it opened a box with both apt (which was being installed) and autoconf. I cancelled then selected autoconf again and it went fine. Maybe apt had finished installing in the meantime.
Back to top
View user's profile Send private message MSN Messenger 
mavrothal


Joined: 24 Aug 2009
Posts: 3088

PostPosted: Thu 04 Dec 2014, 16:17    Post subject:  

@stemsee
thanks for testing.
Do try the just uploaded v2.
Is considerably improved.
I would say "alpha" quality Very Happy

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
slavvo67

Joined: 12 Oct 2012
Posts: 1617
Location: The other Mr. 305

PostPosted: Fri 05 Dec 2014, 01:15    Post subject:  

Interesting. Along the same lines, one of the regulars here (Dejan) helped me do a "quiet install" of multiple pet packages that I keep in one directory. I use this to install my basic pets when I change the puppy I will be using. Of course, not all packages work with all puppies but most of mine are generic enough that they work in any new pup.

The premise there was to install (without GUI) multiple pets that you have already downloaded and would like to move to another puppy distro.

Anyway, I haven't tested but this seems like a nice move forward.

Best,

Slavvo67
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 6608
Location: Valåmoen, Norway

PostPosted: Fri 05 Dec 2014, 10:15    Post subject:  

I think we could do most input in the main gui.
Screenshot_2014-12-05_125805.jpg
 Description   
 Filesize   37.66 KB
 Viewed   1659 Time(s)

Screenshot_2014-12-05_125805.jpg


_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 3088

PostPosted: Fri 05 Dec 2014, 10:48    Post subject:  

zigbert wrote:
I think we could do most input in the main gui.

Laughing
I would certainly love that .

Just in time for the uploaded v3 where I have added multiple package removal too.

I do not think that any more GUI elements will be added except maybe in the config window.
What it now needs is more testing.
Come on people be brave Twisted Evil
(do not get discourage by the low download numbers is because I upload a new pet/tarball instead of updating the old one so it starts from zero every time)

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2543
Location: In The Way

PostPosted: Fri 05 Dec 2014, 15:00    Post subject:  

mavrothal wrote:

Just in time for the uploaded v3 where I have added multiple package removal too.


Exactly what I restrained myself from mentioning yesterday!
Back to top
View user's profile Send private message MSN Messenger 
mavrothal


Joined: 24 Aug 2009
Posts: 3088

PostPosted: Fri 05 Dec 2014, 15:19    Post subject:  

stemsee wrote:
mavrothal wrote:

Just in time for the uploaded v3 where I have added multiple package removal too.


Exactly what I restrained myself from mentioning yesterday!

Well, I got tired removing all these pets I was installing testing the mods ... Rolling Eyes

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3088

PostPosted: Sun 07 Dec 2014, 01:18    Post subject:  

Uploaded v4.
It now provides the options the selected packages to be automatically installed, or downloaded only, or downloaded with their dependencies.

I considered the option to be able to install the selected packages without dependencies, but dismissed it as it will likely provide many non-functional installations.
Then again, without any feedback is hard to decide...

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 6608
Location: Valåmoen, Norway

PostPosted: Sun 07 Dec 2014, 12:29    Post subject:  

This is v4 with my alternative gui.
Note! I have not implemented the 'installation_mode' (auto-install...). That requires some changed in installwindow.sh

A cleanup would be nice Smile ui_classic should either be updated or removed. Is there any reason for having different guis?

I will continue to improve, but for now, this is what I got...

I installed 2 packages in 1 operation, and it all went well !
v4 gui.tar.gz
Description 
gz

 Download 
Filename  v4 gui.tar.gz 
Filesize  10.27 KB 
Downloaded  470 Time(s) 

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
stemsee

Joined: 27 Jun 2013
Posts: 2543
Location: In The Way

PostPosted: Sun 07 Dec 2014, 12:48    Post subject:  

I hope you will add option for info! And if I have a list on the right and change my mind about one or two items, I hope you add the ability to delete them, without restarting the ppm? But looking and working great so far! Zigbert's version uninstalls after one click without any notification ... I may have uninstalled two or three apps..
Back to top
View user's profile Send private message MSN Messenger 
mavrothal


Joined: 24 Aug 2009
Posts: 3088

PostPosted: Sun 07 Dec 2014, 16:13    Post subject:  

zigbert wrote:
This is v4 with my alternative gui.
Note! I have not implemented the 'installation_mode' (auto-install...). That requires some changed in installwindow.sh

A cleanup would be nice Smile ui_classic should either be updated or removed. Is there any reason for having different guis?

I will continue to improve, but for now, this is what I got...

I installed 2 packages in 1 operation, and it all went well !


Looks good but would be nice to be able to remove a package either in the ui_Ziggy window or the installwindow. Preferably I would do away with the installwindow altogether and just bring up the install options dialog directly.

Looking at the new Ziggy GUI it appears that the "Package types" frame is not functional and also when it starts has no packages showing. This is (partly) the code you removed in pkg_chooser.sh

Regarding GUIs, I think "Classic" is there for historical reasons but some people may prefer it because it shows in the same window the install packages. I would say leave it alone (for the "purists" Shocked ). I actually think to revert the changes and do not allow auto-installations in classic. A real "classic" Laughing Will also be a good reference point that nothing is messed up in the process

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3088

PostPosted: Sun 07 Dec 2014, 16:42    Post subject:  

stemsee wrote:
I hope you will add option for info!

Confused which "option for info"? Confused

The thinks I would like to implement is check all user dependencies and update menus and icons only at the end of multiple package installation and not after every package (I'm half way there but short on time), and try to calculate the overall size needed.
The problem with the last is that will need a dry run first to accumulate all the data and then do the actual installation. It will become even slower... Alternatively a script could be build just for that but will still need all these sed and grep and awk etc to get the number (where is techno when you need him Very Happy )
I'm thinking plan C. Just require a fixed amount of free space (say 100MB) for the automatic installation to run.
We'll see...
BTW if you run out of space the process just stops, not real harm done. You can either uninstall or add space Wink

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 6608
Location: Valåmoen, Norway

PostPosted: Sun 07 Dec 2014, 18:08    Post subject:  

Quote:
Looking at the new Ziggy GUI it appears that the "Package types" frame is not functional and also when it starts has no packages showing. This is (partly) the code you removed in pkg_chooser.sh
The "Package types" frame becomes functional as soon as you choose a category. And, yes - it starts without showing any packages.
I did this for 2 reasons:
- There is no doubt what the user should do at first run.
- 'Desktop' is not highlighted in the category-list (as the radiobuttons in ui_classic), so not logic to show its content.

No problem including a remove-button or any other stuff, but for now - this will do. I will do more when your coding settle down...


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 3088

PostPosted: Mon 08 Dec 2014, 02:12    Post subject:  

zigbert wrote:

No problem including a remove-button or any other stuff, but for now - this will do. I will do more when your coding settle down...


Fair enough.

I'll take a stub at pre-calculating installed size and if too much, I'll get out v5 (without any of your changes) and I'm done.

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 24 [351 Posts]   Goto page: 1, 2, 3, ..., 22, 23, 24 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.0680s ][ Queries: 13 (0.0107s) ][ GZIP on ]