PPM2

Using applications, configuring, problems
Message
Author
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 231 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]

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

#161 Post by mavrothal »

rg66 wrote: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.
That should do it.
You may want to post a revised patch :wink:

BTW, I spend too much time on PPM already and do not intend to make any changes other than bug fixes.
But I really have no issue if other woof-CE members or puppy builders want to change PPM to suit their needs/preferences.
== [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!?!

#162 Post by rg66 »

mavrothal wrote:That should do it.
You may want to post a revised patch :wink:

BTW, I spend too much time on PPM already and do not intend to make any changes other than bug fixes.
But I really have no issue if other woof-CE members or puppy builders want to change PPM to suit their needs/preferences.
Patches are below if anyone else prefers these mods.

I did this for personal preference only and in no way intended or expected the changes to be added to PPM2. Thanks for your help, I really appreciate it.
Attachments
pkg_chooser_last_mode.patch.gz
Change PPM2 install mode to default to last used
(1.05 KiB) Downloaded 271 times
configure_last_mode.patch.gz
Remove &quot;Use traditional, non-auto, user interface&quot; from options
(435 Bytes) Downloaded 206 times
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
[url=http://smokey01.com/rg66/]X-series repo[/url]

john009
Posts: 45
Joined: Thu 22 Jan 2015, 13:03

#163 Post by john009 »

I selected "Do not show the terminal with ppm actions" and after clicking update nothing happened ,so I closed it and restarted ppm again and saw that all the repos(ubuntu) have been deselected ;and can't seem to reselect the repo's???.help please...

Image

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

#164 Post by mavrothal »

john009 wrote:I selected "Do not show the terminal with ppm actions" and after clicking update nothing happened ,so I closed it and restarted ppm again and saw that all the repos(ubuntu) have been deselected ;and can't seem to reselect the repo's???.help please...
I can not reproduce this.

Selected configure.
Went to options tab.
clicked do not show terminal actions
went to update tab
clicked update now
the yellow terminal came up asking to update the repos
closed the terminal (no updates)
Clicked "OK" on the configure window.
PPM restarted with everything OK.

Did you do something different?
Please be as precise as possible so we may figure out if there is any issue.
== [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] ==

john009
Posts: 45
Joined: Thu 22 Jan 2015, 13:03

#165 Post by john009 »

I can not reproduce this.

Selected configure.
Went to options tab.
clicked do not show terminal actions
went to update tab
clicked update now
the yellow terminal came up asking to update the repos
closed the terminal (no updates)
Clicked "OK" on the configure window.
PPM restarted with everything OK.

1-5-same..

6th step-no yellow terminal,nothing happened...,waited for some time,closed ppm and restarted ppm..

repo's were deselected..could not reselect them and no updates..

These are the steps I did ,didn't do anything else :? :( ..

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

#166 Post by mavrothal »

john009 wrote:
I can not reproduce this.

Selected configure.
Went to options tab.
clicked do not show terminal actions
went to update tab
clicked update now
the yellow terminal came up asking to update the repos
closed the terminal (no updates)
Clicked "OK" on the configure window.
PPM restarted with everything OK.

1-5-same..

6th step-no yellow terminal,nothing happened...,waited for some time,closed ppm and restarted ppm..

repo's were deselected..could not reselect them and no updates..

These are the steps I did ,didn't do anything else :? :( ..
As I described above, I can not reproduce it.
As a matter of fact the "do not show terminal activity" option and the yellow update terminal, are totally unrelated. The update process itself is performed by the 0setup script that was never changed in PPM2.
You can just run

Code: Select all

rxvt -bg yellow -title "download databases" -e /usr/local/petget/0setup
to see it going.

To make the databases disappear you have to start the update process (by opening the "yellow" terminal and pressing enter) and then interrupt it before it finishes. Any chance that the terminal open behind some other window or minimized or something and you missed it?
Is it happening again if you repeat the process? ie the "yellow" terminal never appears?

Anyway, if the Packages-puppy-* files are missing from /root/.packages you can copy the files from the main sfs (/initrd/pup_ro2/root/.packages) and try the update again.
== [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] ==

john009
Posts: 45
Joined: Thu 22 Jan 2015, 13:03

#167 Post by john009 »

Anyway, if the Packages-puppy-* files are missing from /root/.packages you can copy the files from the main sfs (/initrd/pup_ro2/root/.packages) and try the update again.
Thanks mavrothal.that worked;updated ppm and everything is A-okay..

ppm is now a lightweight synaptic ,Itś really good..

john009

scsijon
Posts: 1596
Joined: Thu 24 May 2007, 03:59
Location: the australian mallee
Contact:

#168 Post by scsijon »

Just came across this, looks nice but 5 faults for you to start with.

Working with 5.5.1. and todays d/l. ppm_auto.2.pet

Open to full screen:

1- go up to the 'Packages to Install' - it's marked out with two horizontal lines - pass over these with the mouse and the lines disapear, even though you've done nothing.

2- Description doesn't / won't extend to the right, although the size for 'Repository' is now enormous and a number of items under Description extend beyond it's field boundary.

3- When opening it shows for the first repository of your 'ticked set', not the last one you left it on when last closing PPM2.

4- When restarting after closing it reopens as a small window, even if you closed it as a full window.

5- When installing it, it says it's being installed to Utility, not Setup where PPM lives. Confusing to new users and those new to adding packages.

Sorry, but going back to the old one, i'll check back later though when you have things sorted out

:-)} ain't bugs fun :-) :-) :lol:

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

#169 Post by mavrothal »

scsijon wrote:Working with 5.5.1.
Thanks for testing, particularly in such an old build.
Is 5.5.1 what?
scsijon wrote:1- go up to the 'Packages to Install' - it's marked out with two horizontal lines - pass over these with the mouse and the lines disapear, even though you've done nothing.
I do not remember having seen that. And I can not reproduce it. Maybe is puppy/hardware specific. Also is not clear to me what "two horizontal lines" means. Maybe a screeny will help.
scsijon wrote:2- Description doesn't / won't extend to the right, although the size for 'Repository' is now enormous and a number of items under Description extend beyond it's field boundary.
Sorry. I'm the "visual" type :oops: A screeny would be again helpful here but I can not see any truncation of the description field (if that's what you mean). If you suggest that the description window should auto-resize at the expense (up to a limit) of the repository window, that is a design limitation. The 2 windows have a fixed width ratio. Not sure if gtkdialog can do what you suggest though, and I'm certainly sure that I can not. Have you seen that in any other gtkdialog app? We welcome pointers or better yet, patches :wink: (or bug Zigbert :D )
scsijon wrote:3- When opening it shows for the first repository of your 'ticked set', not the last one you left it on when last closing PPM2.
This is not what I see. Besides, if you open the configure window, change the "ticked" repositories and press OK, PPM will automatically restart and have the new set, which remains through restarts till further change. Isn't it what you get? If you change the repos and close the window without pressing OK, will (correctly) be considered as a cancelled operation and will be discarded.
scsijon wrote:4- When restarting after closing it reopens as a small window, even if you closed it as a full window.
PPM design (original or new) does not include an "rc" file, where current UI variables could be written. So it always opens to the configured settings. "Full screen" is not a configurable option at this point.
Maybe PPM3 should use an "rc" file.
scsijon wrote:5- When installing it, it says it's being installed to Utility, not Setup where PPM lives. Confusing to new users and those new to adding packages.
PPM in general assigns things to "Utilities if there is not a *.desktop entry to specify otherwise. The PPM2 pet does not have a desktop entry since this file is not changed from the original. Maybe I'll add one. But I wouldn't wary about that as PPM suppose to be built-in and not an installable package. It is already in woof-CE.
scsijon wrote:Sorry, but going back to the old one, i'll check back later though when you have things sorted out
This may take a really long time... But which of the above is a feature that the old one has?
== [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

#170 Post by stemsee »

Really the gui of ppm-2 + should not have the text 'Install' on the button, it would be better for newbies if it said 'DO It' or 'Execute' because if you select download (only) then it isn't installing, and noobs might feel stressed at the apparent dilemma.

Post Reply