Multiple package installation/removal with PPM

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Multiple package installation/removal with PPM

#1 Post by mavrothal »

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 :D .
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 :D

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 :D )
Attachments
NewPPM_inst.png
(108.06 KiB) Downloaded 975 times
NewPPM_remv.png
(106.32 KiB) Downloaded 963 times
ppm_multi-12.pet
Does not allow simultaneous automatic installation and removal
(50.23 KiB) Downloaded 675 times
ppm_multi-11.pet
(50.15 KiB) Downloaded 660 times
multi_remove.jpg
(51.4 KiB) Downloaded 1689 times
Last edited by mavrothal on Wed 04 Feb 2015, 21:18, edited 61 times in total.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

stemsee

#2 Post by stemsee »

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.

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#3 Post by mavrothal »

@stemsee
thanks for testing.
Do try the just uploaded v2.
Is considerably improved.
I would say "alpha" quality :D
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#4 Post by slavvo67 »

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

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#5 Post by zigbert »

I think we could do most input in the main gui.
Attachments
Screenshot_2014-12-05_125805.jpg
(37.66 KiB) Downloaded 1683 times

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#6 Post by mavrothal »

zigbert wrote:I think we could do most input in the main gui.
:lol:
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:
(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)
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

stemsee

#7 Post by stemsee »

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!

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#8 Post by mavrothal »

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 ... :roll:
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#9 Post by mavrothal »

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...
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#10 Post by zigbert »

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 :) 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 !
Attachments
v4 gui.tar.gz
(10.27 KiB) Downloaded 557 times

stemsee

#11 Post by stemsee »

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..

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#12 Post by mavrothal »

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 :) 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" :shock: ). I actually think to revert the changes and do not allow auto-installations in classic. A real "classic" :lol: Will also be a good reference point that nothing is messed up in the process
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#13 Post by mavrothal »

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

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 :D )
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:
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#14 Post by zigbert »

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

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#15 Post by mavrothal »

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.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#16 Post by mavrothal »

Uploaded v5
v5 reports the overall space needed before the installation begins and can be cancelled at this point.
I have the feeling that is a bit pessimistic. ie reports that more space is required than it is actually used. Please test, particularly with "big" packages with many dependencies.

The other feature of v5 is that menu and gtk-icon update as well as checking for all user-installed packages happens at the end of the process and not after every installed package as in v1-4.

As far as I'm concern all the features are there. Now we need to find the bags and hopefully the solutions. Please test.

On related issue, I found during tests that not all of the 50-some files ( :shock: ) that PPM generates in /tmp are properly updated in every run resulting in strange results some times. So it is recommended that if you find some strange behavior, close PPM, run the attached clean_ppm_tmp.sh script and try again to see if the "problem" goes away.
Attachments
clean_ppm_tmp.sh.gz
remove /tmp files generated by PPM. Close PPM and run it.
(563 Bytes) Downloaded 375 times
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#17 Post by zigbert »

I'm working on converting ppm to use vector-icons.
... We need more icons :)
Attachments
Screenshot_2014-12-08_214911.jpg
(56.43 KiB) Downloaded 390 times

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#18 Post by mavrothal »

mavrothal wrote:Uploaded v5
v5 reports the overall space needed before the installation begins and can be cancelled at this point.
I have the feeling that is a bit pessimistic.
Indeed it was.
Till the next version of the "ppm_multi" pet, the attached ppm_multi_5-sizefix.pet fixes that and now total space needed for all to-be-installed packages and their dependencies, is reported more accurately.
Please install this pet after you have installed the ppm_multi-5.pet

Edit: v6 is out and includes the changes added by the pet. The pet is removed to avoid confusion or addition to future releases.
Last edited by mavrothal on Wed 10 Dec 2014, 11:47, edited 2 times in total.
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#19 Post by mavrothal »

zigbert wrote:I'm working on converting ppm to use vector-icons.
Isn't this going to make it more difficult to port in older puppy versions?

I said I'm not going to support older puppies but at this point I think that the current pet should work OK in some of them and easily modified by the respective "puppyteer" ( :D ) to work with others (tested in slacko 5.7 OK. Precise 5.7.2 has issues)
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#20 Post by zigbert »

mavrothal wrote:Isn't this going to make it more difficult to port in older puppy versions?
I can make it work for both mini-icons and the woof-vectors. - simple.

Post Reply