PPM2

Using applications, configuring, problems
Message
Author
Jasper

#141 Post by Jasper »

Hi mavrothal,

Re:
Listing of installed dependencies that you may not need anymore
Say, this morning I have used the ppm to install a particular pet and all its say, 101 necessary dependencies.

Now, within hours, I do not like that pet and during the process of uninstalling it I see your note about dependencies.

Presumably your note means:

(1) none of the 101 dependencies will have been uninstalled
or
(2) some of the 101 may, or may not, have uninstalled
and
(3) all/any of those 101 that remain be will listed individually
or
(4) as per (3) above plus any unneeded history will be listed
----------------------------
or
(5) if none of the above - in what circumstance(s) might that message be populated with names of dependencies (or whatever)?
Also, to run everything that remains - dependencies either are needed (or they are not needed) - so how is the word "may" applicable?

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

#142 Post by mavrothal »

Jasper wrote:Hi mavrothal,

Re:
Listing of installed dependencies that you may not need anymore
Say, this morning I have used the ppm to install a particular pet and all its say, 101 necessary dependencies.

Now, within hours, I do not like that pet and during the process of uninstalling it I see your note about dependencies.

Presumably your note means:

(1) none of the 101 dependencies will have been uninstalled
or
(2) some of the 101 may, or may not, have uninstalled
and
(3) all/any of those 101 that remain be will listed individually
or
(4) as per (3) above plus any unneeded history will be listed
----------------------------
or
(5) if none of the above - in what circumstance(s) might that message be populated with names of dependencies (or whatever)?
Also, to run everything that remains - dependencies either are needed (or they are not needed) - so how is the word "may" applicable?
When you uninstall a specific program, PPM (and all package managers I know of) uninstall only this program and none of its dependencies, as there is no way to know the context within which the dependencies were installed or if you may be installing something related next.
However, what PPM does during the removal process is to query the dependencies of the package you are about to remove, examine if any user-installed packages belong to those dependencies and suggest their removal if no other installed package has them as dependencies.
So ideally all 101 dependencies should have been listed under
Listing of installed dependencies that you may not need anymore
However, PPM goes only one step deep, so will only suggest the removal of the immediate dependencies of the removed package. When you try remove those you'll probably be prompted to remove their dependencies and so on.
Is not very efficient/effective but is a lot safer, given the quality of puppy packages (:roll:) and the variety of the puppy sources, as they may not cite dependencies correctly, or with the correct package name or even at all.

Regarding the use of "may", as mentioned above PPM looks only at user-installed packages assuming that whatever is in the SFS is all fine. However, we all now you may need to install a package from the binary compatible repo for example (ie Ubuntu/Slackware) or maybe a newer pet version, for a program already in the main SFS, to work correctly. PPM can not check for this.
And as we said before not all packages list their dependencies properly if at all. Thus, "may".

After all these, the sort answer to your questions is (1).

BTW In cases like the one with the 101 dependencies the safest way is to remove the previous 101 packages in the list as packages in the remove window are listed with their installation order.
== [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
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#143 Post by MochiMoppel »

Hopeless.

@ASRI
Regarding your opinion "For most users, the use of PPM with silent mode seems risky". Please keep in mind that I didn't suggest to implement this. Mavrothal asked me to specify my concerns and I gave an example where his changes can cause unnecessary trouble. It is moot to debate about a feature that I personally use, but which officially does not exist and is not on the agenda. Nevertheless since you voiced your opinion, let me add mine:

As far as the risk is concerned I can't agree. You did this yourself and I'm sure you knew what you were doing. Having to install the same pets, which are locally saved, which you have examined and which you trust, over and over again is no fun. That's why I implemented this - as an option and not as default! Most users will not need this anyway. But what I fail to understand is why the new ppm2 would be considered to be less risky. In ppm2 you are offered the option to install multiple packages, packages that you have never used or tested before, "simultaneously" without further interaction ("one-click") . Looks pretty silent to me - and very risky. Where is the difference? The horror scenario mavrothal pictured, the pet from hell that runs a mean preinstall script, this scenario is much more likely with untested pets installed via ppm than with local pets which you can inspect and run in confidence. I can agree here in one point: The immediate execution of included pre/postinstall scripts is a huge security risk and I'm surprised that for this action no confirmation dialog exists. It does not matter if you install a pet silently, "automatic" or in old fashioned classic mode: If a pet contains a preinstall script that wipes your hard disc there is not much you can do about it.

@bigpup
Nobody wants to reduce information. I only object to giving the same message to the user twice because I don't believe that the quality of information a user gets has anything to do with the number of messages he receives. Probably you are referring to the new little console window with the fast junk output. I agree that it is comforting to see that the computer is busy and not dead, and that's probably the sole purpose, but information? Not for me. The progress bar at the bottom is much nicer.

Concerning the example I gave and which mavrothal was quick to denounced as "does not happen !!!" you can test yourself if you like: Open a text terminal (on my machine it's Ctrl+Alt+F2, ID:root, password:woofwoof), enter petget path/to/foo.pet and enjoy a fancy installation. When it's finished, run the same command again and watch for the last 2 messages. Depending on your final version messages may time out, but you still get 2 when you should see only 1. And yes, it's a coding proposal and something that can wait, but judging from the reaction I received I don't think that time is the decisive bottleneck here.

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

#144 Post by mavrothal »

MochiMoppel wrote:Hopeless.
I agree

But why are we really discussing this in an open source project.
The code is out there and you are totally capable to write code.
Instead of trying to tell me what I'm doing wrong, do what you consider right and put it out there for the people and the puppy builders to use (I'm sure I'll find several things I'll like and "steal")
== [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
michaellowe
Posts: 66
Joined: Sat 17 Dec 2011, 08:33
Location: The Garden

PPM seems faulty in P 525 and Prec 5.7 and other oddities

#145 Post by michaellowe »

PPM seem to be broken in Puppy 525 and Precise 5.7
Never used to be, used to work fine, dont know what happened?
Sorry I know this might have nothing to do with the aforementioned discussion but it has everything to do with PPM and how it doesn't seem to work properly.
in fact I very rarely use it anymore. I just compile from source, much better, much more reliable.
Why not release a Puppy without a PPM, call it PupCom, would certainly make for a much neater minimalistic menu?
Unfortunuately my compiling knowledge and experience is limited to
./config
make
make install
and I'm happy with that for now as it seems to do the job.

I wish I knew how to get rid of all the menu entries that I never use and probably never will use? just seems such a waste of desktop space and more than anything a waste of time trawling through them each time I want to access an app. have been trying out macpup 599 recently and although the desktop is probably just up my street its going to take a lot of getting used to as I have gotten so comfortable with my good old favourite puppy 525 the first linux distro I was ever introduced to and will probably always love, however not always Wine friendly! how to use wine as non root???? something else I tried and failed at miserably! anyway rambling on PPM would be great if it actually worked? my big question is why does it continue to download and install all the reps when I specifically select only a few? that to me seems flawed, why put a selection of reps when PPM will always just download all of them regardless of the choice I have just made????
Smash forehead on keyboard to continue.....
well thats at least how some of us deal with ba$h !

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

Re: PPM seems faulty in P 525 and Prec 5.7 and other oddities

#146 Post by bigpup »

michaellowe wrote:PPM seem to be broken in Puppy 525 and Precise 5.7
Never used to be, used to work fine, dont know what appened?
This is no information, at all, to understand what your problem is :shock:

Specific details of what you feel is broken?
You do what?
You see what?
rambling on PPM would be great if it actually worked? my big question is why does it continue to download and install all the reps when I specifically select only a few? that to me seems flawed, why put a selection of reps when PPM will always just download all of them regardless of the choice I have just made????
If you are talking about the repo update.
You should be getting an option for each one to update or not.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#147 Post by rg66 »

Nice job on ppm2 Mavrothal

If I change to classic mode from the dropdown list it keeps using ziggy but always defaults to auto. If I check traditional in config > options it uses classic :cry: . Is there anyway to use "traditional mode" with ziggy interface or have last choice as default from dropdown list? Just a personal opinion that ui_classic shouldn't even be used.

TIA
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

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

#148 Post by mavrothal »

rg66 wrote:If I change to classic mode from the dropdown list it keeps using ziggy but always defaults to auto. If I check traditional in config > options it uses classic :cry: . Is there anyway to use "traditional mode" with ziggy interface or have last choice as default from dropdown list? Just a personal opinion that ui_classic shouldn't even be used.
There are several more options that I have tried and latter revered since the options list was becoming ridiculously long and mostly confusing. :twisted:

One of them is a config option to set step-by-step as default
Another is to be able to set either classic or the old Ziggy UI in the "traditional" mode.

These patches (and some more) are reverted but you can apply any of the 2 if want in your X-puppies. Be advised that they are tested only briefly though.
== [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
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#149 Post by rg66 »

Thanks Mav, I'll have a look at those patches. Ultimately, I'd like it to default to last used and remove "traditional" from options but editing ppm scripts is a nightmare!
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

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

#150 Post by mavrothal »

rg66 wrote:Thanks Mav, I'll have a look at those patches. Ultimately, I'd like it to default to last used and remove "traditional" from options but editing ppm scripts is a nightmare!
Yes it is :roll:

Removing traditional is fairly easy.
Delete lines 388-392 from pkg_chooser.sh, lines 173-178 from configure.sh and the ui_Classic file.

Using the last mode used should also not be very difficult. Should be analogous to "Option to set default mode." patch mentioned above but make it a case instead if you want any of the 4 options to be the default on next start. The way the mode is preserved between installs in the clean_up function of the installmodes.sh script may be helpful.
I personally do not like the idea since I think that a package manager should default to its main function ie to install packages, but please post a patch here if you find the time to get to it :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
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#151 Post by rg66 »

Well, I got it to work how I wanted.

Any idea how to gettext "<default>'`cat /usr/local/petget/last_mode`'</default>" everything I've tried has failed.

Edit: /usr/local/petget/last_mode would say: Auto mode, as an example.
Last edited by rg66 on Wed 18 Mar 2015, 11:34, edited 1 time in total.
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

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

#152 Post by mavrothal »

rg66 wrote:Well, I got it to work how I wanted.

Any idea how to gettext "<default>'`cat /usr/local/petget/last_mode`'</default>" everything I've tried has failed.
I probably miss something but there is no text to gettext here. Just a command and a file name. :?
Maybe you want to post the entire approach here or maybe in a gettext thread to understand what exactly you are trying to gettext (the content of the last_mode file?)
== [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
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#153 Post by rg66 »

Ok, here's what I'm talking about

<comboboxtext width-request="150" space-expand="false" space-fill="false">
<variable>INSTALL_MODE</variable>
<default>'`cat /usr/local/petget/last_mode`'</default>
<item>'$(gettext 'Auto install')'</item>
<item>'$(gettext 'Step by step installation (classic mode)')'</item>
<item>'$(gettext 'Download packages (no install)')'</item>
<item>'$(gettext 'Download all (packages and dependencies)')'</item>
<action>change_mode</action>
</comboboxtext>

/usr/local/petget/last_mode would read "Auto install" (without quotes) as an example, which I assume would need to be gettexted.
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

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

#154 Post by mavrothal »

Not in puppy right now but did you try

Code: Select all

<default>'$(gettext "$(cat /usr/local/petget/last_mode)")'</default>
?
You may want to try the gtkdialog thread if this fails.
== [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
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#155 Post by rg66 »

mavrothal wrote:Not in puppy right now but did you try

Code: Select all

<default>'$(gettext "$(cat /usr/local/petget/last_mode)")'</default>
?
You may want to try the gtkdialog thread if this fails.
That works, thanks. Probably the only thing I didn't try.

I've uploaded patches for pkg_chooser.sh and configure.sh if anyone wants them. I'll assume that ui_Classic is no longer needed after.

Edit: New patches below
Last edited by rg66 on Thu 19 Mar 2015, 08:23, edited 1 time in total.
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

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

#156 Post by mavrothal »

rg66 wrote:
mavrothal wrote:Not in puppy right now but did you try

Code: Select all

<default>'$(gettext "$(cat /usr/local/petget/last_mode)")'</default>
?
You may want to try the gtkdialog thread if this fails.
That works, thanks. Probably the only thing I didn't try.

I've uploaded patches for pkg_chooser.sh and configure.sh if anyone wants them. I'll assume that ui_Classic is no longer needed after.
Nice.
You may also want to change line 93 of pkg_chooser.sh as it currently defaults to install_pets_quietly and will enforce size recalculation every time if you are in a different mode (and probably other issues), to read last_mode and set the flag accordingly.
Also you may want to keep the variable in /var/local/petget with the rest of PPM variables/options
== [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
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#157 Post by rg66 »

mavrothal wrote:Nice.
You may also want to change line 93 of pkg_chooser.sh as it currently defaults to install_pets_quietly and will enforce size recalculation every time if you are in a different mode (and probably other issues), to read last_mode and set the flag accordingly.
Also you may want to keep the variable in /var/local/petget with the rest of PPM variables/options
Ok, I changed path to /var/local/petget but am not too sure what to do with line 93. I'm assuming that line is for Auto install so changed it to:

Code: Select all

 [ "`cat /var/local/petget/last_mode`" = "Auto install" ] && touch /tmp/install_pets_quietly
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#158 Post by 01micko »

Nice work Mav (and Ziggy)!

Works pretty good in slacko64.

I did make a patch, if interested, to partly address Mochimoppel's issue.

Historically, petget basically worked unattended for installation of packages when X was not running, albeit with a bug concerning the display not running! (Which incidentally was safe to ignore).

This patch adds a 'developer' flag to /var/local/petget, well it doesn't add the flag, a dev adds it her/his self (which, if accepted, should merely be documented in the html docs I suppose).

I'd just like to see thoughts for or against, additions/subtractions (if any) also..

Mochimoppel, you may have ideas for more?
Attachments
petget-developer.patch.gz
(1.04 KiB) Downloaded 233 times
Puppy Linux Blog - contact me for access

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

#159 Post by mavrothal »

:D
Glad to see you back Mick
:D

Regarding the patch is less messy to change

Code: Select all

[ ! "$DISPLAY" ] && touch /tmp/install_quietly
to

Code: Select all

[ -f /var/local/petget/developer ] && touch /tmp/install_quietly
and then use the install_quite flag (remember to remove it :D ). Would remove many more messages.

However, as I explained before, providing the infrastructure for an "under the radar" (visible or not but without user confirmation) installation in a system that runs by default as root and never asks for a password to change any system file is a major liability.
The simplest social hacking could take over the system (not to mention anything on server-side) ...

I could (barely) live with it, if the flag was deleted by petget and resetting would demand every time a password, that should be different than the default "woofwoof". But then this would block scripted use of petget (which is actually the idea).

As ASRI éducation said earlier, for a developer is fairly easy to script quite package installation... Is a good first step for the "developer's mode" :lol:
== [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
rg66
Posts: 1158
Joined: Mon 23 Jul 2012, 05:53
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

#160 Post by rg66 »

I've changed line 93 to this:

Code: Select all

LAST_MODE="`cat /var/local/petget/last_mode`"
[ "$LAST_MODE" = "Auto install" ] && touch /tmp/install_pets_quietly
[ "$LAST_MODE" = "Download packages (no install)" ] && touch /tmp/download_only_pet_quietly
[ "$LAST_MODE" = "Download all (packages and dependencies)" ] && touch /tmp/download_pets_quietly
[ "$LAST_MODE" = "Step by step installation (classic mode)" ] && touch /tmp/install_classic
That should put the /tmp file there for each mode on default.
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

Post Reply