(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 01 Oct 2020, 15:15
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
PPM: How to download packages into any directory
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 3 of 6 [85 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Author Message
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Sat 29 Nov 2014, 18:37    Post subject:  

greengeek wrote:
I don't seem to be having any success with this at all. I have just installed the v8 pet and I do not get prompted for download location. My puppy is based on Slacko 5.6 but has some weird modifications (so could be my fault...). I also have MochiMoppels previous "download only" mod installed (via remaster so I can't easily uninstall it for testing).

Anime gif via SFRs T.A.S:

I can not tell from the animation but did you go to PPM>> configure >> miscellaneous to setup your download folder/ keep-pet option?
Th option id not going to come up automatically every time you install/download something. You have to set it up.
If you did what
Code:
cat /root/.packages/download_path
says?
Any errors when you start ppm from terminal?

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

Last edited by mavrothal on Sat 29 Nov 2014, 18:48; edited 1 time in total
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 1669
Location: nyc

PostPosted: Sat 29 Nov 2014, 18:40    Post subject:  

haven't tried version 8, but 7 works in precise 5.7.1/.2 and 5.5. even adds something that prevents the (re)installation of previously installed pets.

nice.
Back to top
View user's profile Send private message 
rg66


Joined: 23 Jul 2012
Posts: 1160
Location: Vancouver, BC Canada / Entebbe, Uganda Africa!?!

PostPosted: Sun 30 Nov 2014, 13:36    Post subject:  

If you click ok when the entry box is empty it gives the "The '$SAVEPATH' download folder you specified does not exist" error. There was also a few typos in the error message. This seems to fix it:

Code:
--- /root/Downloads/ppm_down_dir-8/usr/local/petget/configure.sh   2014-11-29 18:31:31.000000000 +0300
+++ /usr/local/petget/configure.sh   2014-11-30 20:16:48.849875463 +0300
@@ -228,9 +228,10 @@
 
 # handle savepath
 SAVEPATH="`echo -n "$RETPARAMS" | grep 'SAVEPATH' | cut -f 2 -d '"'`"
+[ "$SAVEPATH" = "" ] && SAVEPATH=$dir_prefix
 [ -d "$SAVEPATH" ] && echo dir_prefix=\'$SAVEPATH\' > /root/.packages/download_path \
- || xmessage  -bg red -center "`gettext \"The '$SAVEPATH' download folder you specified does not exist.
-Pleae creat it and try again \"`"
+ || xmessage  -bg red -center "`gettext \"The '$SAVEPATH' download folder you specified does not exist
+or the partition it's on is not mounted. Please try again \"`"
 # option to save installed pets
 SAVE_PETS="`echo -n "$RETPARAMS" | grep '^varSAVE_PETS' | grep -oE 'true|false'`"
 sed -i -e "2d" /root/.packages/download_path

_________________
X-slacko-5b1 - X-tahr-2.0 - X-precise-2.4
X-series repo

Last edited by rg66 on Mon 01 Dec 2014, 03:28; edited 1 time in total
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Sun 30 Nov 2014, 14:21    Post subject:  

rg66 wrote:
If you click ok when the entry box is empty it gives the "The '$SAVEPATH' download folder you specified does not exist" error. There was also a few typos in the error message. This seems to fix it:

Good catch.
Will be fixed in v9 though I'll give it a day before I upload, in case something else come up.

Regarding typos is the major reason I was avoiding the terminal for many years Embarassed

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


Joined: 20 Jul 2010
Posts: 5834
Location: Republic of Novo Zelande

PostPosted: Sun 30 Nov 2014, 14:55    Post subject:  

mavrothal wrote:
did you go to PPM>> configure >> miscellaneous to setup your download folder/ keep-pet option?
Thanks for the tip - no I had not done that

Quote:
If you did what
Code:
cat /root/.packages/download_path
says?
Now that I have set it up to use /opt it says:
Code:
# cat /root/.packages/download_path
dir_prefix='/opt'
save_pets='true'#


However, I still have a problem. The package seems to download successfully, but it still appears in /root (not /opt as i asked) and gives two messages. One message says
Code:
error, failed to download xpr-1.0.4-1486-1.txz
and after I click on that error another dialog comes up saying
Code:
Finished. The packages have been downloaded to "/opt" directory

You can see here the package appears in /root (does not appear in /opt)
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Sun 30 Nov 2014, 15:28    Post subject:  

greengeek wrote:

However, I still have a problem. The package seems to download successfully, but it still appears in /root (not /opt as i asked) and gives two messages. One message says
Code:
error, failed to download xpr-1.0.4-1486-1.txz
and after I click on that error another dialog comes up saying
Code:
Finished. The packages have been downloaded to "/opt" directory


Embarassed
Another typo... Embarassed
Is missing a dot at line 50 of /usr/local/petget/configure.sh.
should be
Code:
 . /root/.packages/download_path

Version 9 should fix this as well as the one above reported by rg66.

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

Joined: 22 Jun 2005
Posts: 268

PostPosted: Sun 30 Nov 2014, 18:34    Post subject:  

mavrothal wrote:
Version 9 should fix this as well as the one above reported by rg66.

Very useful feature.

It works well in Dpup Wheezy 3528.

Thank you.
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 13981
Location: S.C. USA

PostPosted: Sun 30 Nov 2014, 21:19    Post subject:  

Test of Puppy full install operation..

Tahrpup 6.0
Full install to HD partition

Installed version 9

PPM seems to be working OK.

Tried download-only and save installed pets too options.
All downloaded to the directory I had set for downloads.

_________________
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 Shocked
YaPI(any iso installer)
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 13981
Location: S.C. USA

PostPosted: Sun 30 Nov 2014, 21:26    Post subject:  

MochiMoppel,

You still here Question

_________________
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 Shocked
YaPI(any iso installer)
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Sun 30 Nov 2014, 22:20    Post subject:  

Updated initial post.
Added a second solution. It keeps PPM fully functional yet allows a different download directory.

mavrothal wrote:
PPM is such a convoluted mess

I couldn't agree more. I see a lot of duplicated and redundant code, which makes maintenance so much "fun". Let's make sure that it doesn't become more convoluted. The main problem I see is that there is no one who feels responsible to clean up this stuff. There isn't even a home for it in the forum. I'm not aware of a main PPM thread in the software forum. This would be the place to publish pets, discuss new features, argue about code details. I welcome and appreciate your efforts to push PPM development forward, but I think it deserves a more prominent place than an odd MochiMoppel HOWTO thread.

Back to topic: I took a deep breath, looked at the PPM code again and think that I found the problem of the current PPM. There are two hard coded references to /root which even now make no sense and should be removed and there is one in the "Finished downloads" dialog that should be replaced with $PWD. That's basically all to make PPM accept any download path.

If this is really true - and all my tests so far indicate that it is - then our new pet can be greatly simplified.
The key is the correct setting of the working directory (PWD): Has to be done only once with a "cd <path>" statement. Once this is done (and it should really be done only once), everything else falls in place and works, because that's the way PPM was designed. I know, I scoffed at it a bit, but I see the benefits:
- No need to add the path to the package's file name, i.e. no need to add ${dir_prefix}. On the contrary: Paths must not be added
- Without paths, no need to worry about spaces in their names
- No need either to change /usr/sbin/download_file
- Automatic fall back to /root in case of trouble

Let's concentrate on the fun stuff: building a nice GUI Wink
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Mon 01 Dec 2014, 01:21    Post subject:  

MochiMoppel wrote:

Back to topic: I took a deep breath, looked at the PPM code again and think that I found the problem of the current PPM. There are two hard coded references to /root which even now make no sense and should be removed and there is one in the "Finished downloads" dialog that should be replaced with $PWD. That's basically all to make PPM accept any download path.

But this is exactly what the ppm_down_dir-9.pet does.
If you look at the patches most of the changes are to make the GUI and ensure path names with spaces are working. Only in download_file there is a seemingly unnecessary duplication of both cd'ing to $dir_prefix and also specifying it into wget command.
But maybe I'm missing something.

Regarding a PPM thread the github woof-CE page allows a lot of discussion over every specific patch or even every line of code Wink not to mention that there is already a thread in the woof-CE list Exclamation
When it comes to actual codding discussions (as oppose to feature discussions) I think that they are more efficient avenues.

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


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Mon 01 Dec 2014, 02:33    Post subject:  

mavrothal wrote:
But this is exactly what the ppm_down_dir-9.pet does.
No, it's not. What I am talking about is far less complex.
Quote:
If you look at the patches most of the changes are to make the GUI and ensure path names with spaces are working.
But we don't need path names! If PPM cd'd successfully into a directory "/mnt/home/my files/my downloads" then there is no need to worry ever again about spaces. From there on PPM is in the directory and will not leave it until it closes. Adding $dir_prefix to every filespec for files in this directory is redundant. I suggest that you try my solution 2 on an unpatched version and see how far you get. Of course this is absolutely bare-bone but IMHO can be a good starting point for adding bells and whistles.
Quote:
Only in download_file there is a seemingly unnecessary duplication of both cd'ing to $dir_prefix and also specifying it into wget command.
download_file doesn't need to be changed at all. The only change I can think of is to add the -P switch to wtget:
Code:
wget -4 ${CONTPARAM} -t 5 -w 5 -P "$PWD" "${URLSPEC}" > /tmp/download_file_spider.log2 2>&1

Quote:
But maybe I'm missing something.

Maybe development pace was a bit too fast. Relax and examine the procedures PPM already has to offer. It's not all that bad. And then change only what's absolutely necessary to change. Wink
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Mon 01 Dec 2014, 03:12    Post subject:  

MochiMoppel wrote:
mavrothal wrote:
But this is exactly what the ppm_down_dir-9.pet does.
No, it's not. What I am talking about is far less complex.

OK. Please provide a patch set and possibly a pet that implements (with a GUI) this less complex process.
Please notice that will be nice if it also offers the option to save installed pets too.

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


Joined: 11 Oct 2009
Posts: 13981
Location: S.C. USA

PostPosted: Mon 01 Dec 2014, 03:30    Post subject:  

I think Barry k. was the only one that was responsible for PPM.

I know he took suggestions on how to fix bugs and add features, but I think he was the only one that really controlled what was in it.
It seemed he was the one that talked about making it be able to do this or that. It only was changed if he made the change.

Example from 2009:
Quote:
Development of Woof is ongoing, but I have also been working on another project, the Puppy Package Manager, that runs in a Puppy built by Woof.

In a nutshell, I wanted to extend the Package Manager to transparently handle packages from almost any other distribution, not just PET packages, and also to handle dependencies nicely. That essentially is what the new Puppy Package Manager does.


Now that he is gone.
Who does decide what goes into it?

It probably would be a good idea if the entire code got looked over.

Some of it is probably the way it is, because at the time, that was the way Puppy worked.
Some of it is probably a quick fix, and at the time, it just worked.

_________________
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 Shocked
YaPI(any iso installer)

Last edited by bigpup on Mon 01 Dec 2014, 03:44; edited 1 time in total
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Mon 01 Dec 2014, 03:39    Post subject:  

bigpup wrote:
It probably would be a good idea if the entire code got looked over.


Rewriting PPM would be great if someone wants to have this kind of fun.

In the mean time, here is another little PPM project (pic) in very early stages that might be of interest.
Install_many.png
 Description   Install multiple packages with PPM
 Filesize   10.3 KB
 Viewed   144 Time(s)

Install_many.png


_________________
== 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 3 of 6 [85 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.2801s ][ Queries: 12 (0.0892s) ][ GZIP on ]