Gnewpet - makes pets from installed packages

Miscellaneous tools
Message
Author
jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#16 Post by jpeps »

RSH,

Copy your mounted SFS to a new directory. Open the new directory, which contains root, and launch. The "invalid directory" notice means that you're opening a directory that doesn't contain the desired root directory.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#17 Post by RSH »

Solved!

As i did wrote, adding the path to the paths inside example-app.files.

If you want to build new getpet ultimate ultimate ultimate version, please use this script.

Edit: gnewpet is now version 6.2 and therefor fixed. Script removed.
Last edited by RSH on Thu 01 Mar 2012, 03:48, edited 2 times in total.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#18 Post by technosaurus »

This was the code that I submitted a while back for _re_moving existing packages. Could be modified for the same purpose by replacing rm with mv
(and you probably won't need the reverse dependency check)

Code: Select all

#!/bin/sh
D=$HOME/.packages/builtin_files
PKGS=`ls -1 $D`
PKG=`Xdialog --stdout --combobox "select package to remove" 0 0 $PKGS`
[ $PKG ] && Xdialog --yesno "Reverse dependencies:
`cat $HOME/.packages/woof-installed-packages |grep +$PKG |cut -d "|" -f2`

Continue?" 0 0 && [ $? ] && for x in `cat $D/$PKG`; do [ -d $x ] && cd $x || rm $x; done && rm $D/$PKG && $0
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#19 Post by jpeps »

RSH wrote:If you want to build new getpet ultimate ultimate ultimate version, please use this script.
The only thing I see different, is that you added an instance of $dir$line in place of $line. If you open to the correct directory, that shouldn't be an issue.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#20 Post by RSH »

jpeps wrote:The only thing I see different, is that you added an instance of $dir$line in place of $line.
Yes, exactly.

Tough the difference is enormous, because only that way you can mount every iso you want, then mount the sfs inside the mounted iso and get every installed or build in application you want to. :D

No need to run the puppy where you want to get out the application/s.

No need to extract the mounted sfs.

Only adding "$dir" does give success, try it out - i did it several times.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

Please Improve

#21 Post by RSH »

:!: To make sure, you do not run into a not-seen-error. :!:

Do use a iso containing at least one application that doesn't exist in your running puppy. Otherwise you will surely enter the right path but grabbing the wanted application inside your running puppy.

Do it, please. All users of 6.1 (or maybe 7.0) will be that much grateful for that - i am sure! 8)

Greetings, Rainer :)
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#22 Post by jpeps »

$dir is just the directory name selected in the gui entry box. You're already in that directory, so there's no need to copy with $dir$files. You can't copy files from an SFS that hasn't been mounted.


Oh...I see the bug. /tmp/list has the "/" included.
Last edited by jpeps on Fri 24 Feb 2012, 06:02, edited 1 time in total.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#23 Post by RSH »

Ardour grabbed out of puppy studio. Installed and running in my LazY Puppy without rebooting my LazY Puppy. Just mount puppy studio iso, mount sfs and get ardour! :D

This is really cool! 8) 8) 8)
________________________

You did post while i am writing this here. Please do understand: there is no need to improve my modification in any way.

But please do notice: i did try it again and again and again. The result is what i did publish and to me only this works.

In file example-app.files are paths like: /usr/share/example-app/x-bin
Relative root is: /mnt/sdc3/example.sfs
To get the application you have to grab /mnt/sdc3/example.sfs/usr/share/example-app/x-bin

Otherwise it doesn't work, even if "You're already in that directory".
jpeps wrote:You can't copy files from an SFS that hasn't been mounted.
Yes, but the sfs file has always been mounted. :wink:
Attachments
ardour-out-of-puppystudio.jpg
(49.16 KiB) Downloaded 1103 times
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#24 Post by RSH »

Hi,

sorry to post this, but: improved again. Here some data...


- reboot LazY Puppy, frugal, no save file

- install gnewpet-6.0
- mount puppy studio rebuild 11 and mount the sfs inside the iso
- path: /mnt/+mnt++mnt+sdb2+LinuxImages+cpup3+cpup3-bld11.iso+cpup_330.sfs
- grab bristol-GUI-1.0.1 (written by myself, not existing in LazY Puppy)
- file size of grabbed file = 204 bytes
- contains only directory var and its content (maybe created by gnewpet?) :shock:

- install gnewpet-7.0 (using my modifications)
- path: /mnt/+mnt++mnt+sdb2+LinuxImages+cpup3+cpup3-bld11.iso+cpup_330.sfs
- grab bristol-GUI-1.0.1 (written by myself, not existing in LazY Puppy)
- file size of grabbed file = 338 kb
- contains everything and works after installing in LazY Puppy :D

What shall i say... :?
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#25 Post by jpeps »

version: 6.1 bug: removed "/" for relative paths
changed exit button to remove /tmp/gnewpetDir (flag)


RSH: You can report bugs, but you are NOT free to post new versions of my script. You can do whatever you like for your personal copy. REMOVE IT PROMPTLY.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#26 Post by RSH »

jpeps wrote:version: 6.1 bug: removed "/" for relative paths
changed exit button to remove /tmp/gnewpetDir (flag)


RSH: You can report bugs, but you are NOT free to post new versions of my script. You can do whatever you like for your personal copy. REMOVE IT PROMPTLY.
:shock: What does this mean? :shock:

Ok, before i will come to your post, let me make something clear.

After my last post i was convinced you will come to a point of view to realize that there's something to be changed/fixed in gnewpet-6.0. I was willing (right then, when you do upload the new version) to give my grateful thanks to you, for having an ear to my suggestions and ideas and for doing some work on these suggestions and ideas of mine. I do know different (strange) behavior coming from other forum members like sending pm to user to keep information away from me :shock:

Though you are sometimes a bit "lazy" you did get your "ass up" as you did see the usefulness of these my suggestions and ideas. Seems like you do need sometimes a second thought about things - but that's absolutely fine with me.

I was willing to remove the script (including my modifications) after you publish your fixed .pet because just to prevent users to destroy the fixed gnewpet by downloading and installing this script. There has been no need to invite me to do that with "NOT" and "REMOVE IT PROMPTLY"

You still remember where it has had its start? A topic of mine, asking a (now to me) simple question about shellscript - and then came recobayu
recobayu wrote:hi everyone,
i'm sorry where to put my question, i hope in this thread is ok.
i finished download aqualung with ppm, and it was installed on my laptop.
now, i look at /root/.package/aqualung-0.9b11-Lucid.files there are many rows representating the file i download.
it's like this:
/usr/
/usr/local/
/usr/local/lib/
/usr/local/lib/X11/
/usr/local/lib/X11/mini-icons/
/usr/local/lib/X11/mini-icons/aqualung.png
/usr/lib/
/usr/lib/libmpcdec.so.3.1.1
/usr/lib/libmpcdec.so.3
...
actually, i can put them one by one. but if there are some script, it can be more fast and interesting.
how to repackage again in a pet or a folder with a script? so i don't need download that aqualung again.
thanks
http://murga-linux.com/puppy/viewtopic. ... 162#588162

So, the basic idea of all of this is "owned" by recobayu.

Then after you posting a static 4-liner-code came puppyluvr.
puppyluvr wrote::D Hello,
I dont believe that is a complete list, as the binaries etc are not listed..
Add them all before making a pet..

Anyone want to help with a script to read the final /* lines in any /root/.packages file, then copy the actual files to a dir...
RePet-1.0
I cant remember how to get cat to ignore things...
After this you did post your first script.

Then it goes back to my issue for some posts.

Then you did refine your script "...to read the original pet.specs and make the duplicate..."

Then i did develop my Package-Creator and RightClick-Package-Creator, that uses your script and gives the comfort of GUI and/or rightclick-action.

So the basic idea to use it with GUI is "owned" by myself.

8.5 hours after this you did develop your gnewpet 1.1 using GUI.

Then there were suggestions etc. by recobayu, harii4 and seaside

Then i found the -P bug and did publish it...
RSH wrote:Just change "cp -p "$line" /tmp/${NAME}${DIR}" to this: "cp -p -P "$line" /tmp/${NAME}${DIR}".

-P says "don't follow symbolic links". So symbolic links will be re-copied as symbolic links inside the .pet.
So gnewpet's full functionality is "owned" by me.

You did never really improve your work in detail!

Then you published fixed version 2.1

Then i did made suggestions that has had its result in batchmode of gnewpet-3.1.

So, the basic idea of batchmode functionality is "owned" by me.

New suggestions of mine did result in refining the GUI and publishing gnewpet-4.1

So, the basic idea of the new GUI is "owned" by me.

And so on...

Version 5.1 was the last one i have had seen as i discovered Version 5.9. Then i did made some suggestions that results in version 6.0 (after a second tought about things) :)

So the basic idea of "relative path" functionality is "owned" by me.

So lets assume murga-linux.com forum is our employer and we would get payed for this our work in here. This would mean every idea and every attached .pet and/or code would be owned by this our employer.

After this much suggestions and ideas (not only of myself) to call this one "my script" is a bit "highly used" - didn't you mean that as well.

I take gnewpet 6.0 (6.1) as a script (application), owned by many forum members and (much appreciated) nicely worked out by jpeps. This is the status quo.

For today/tonight and in my special case there is something more to say:

Today/tonight i did work for hours and hours, to get your gnewpet-6.0 working and to get you convinced that there is a need to fix/change something. While i was coding, improving and posting results etc. did you execute small talk about things that should be the only one way but obviously had been the impossible other way.

I did neglected some of my main work on LazY Puppy meanwhile, because i do like the gnewpet (now fixed) that much, so i had decide to make this one a part of "my" LazY Puppy.

And then, after a full night without sleep, getting this one finally working and then fixed, came you and
wrote:RSH: You can report bugs, but you are NOT free to post new versions of my script. You can do whatever you like for your personal copy. REMOVE IT PROMPTLY.
How shall i take this from you? As a declaration of war (in a lower use)?

I would like to prefer something like this:

"RSH, would you please remove your posted script, to prevent users from downloading this script and probably destroying my new fixed version? Thank you."

This really would have been fine, but unfortunately...

As someone wrote:

"Different countries, different languages, different language-basements, different cultures etc." could result in much ugly misunderstandings.

Short story:

I was just :D and you came along with :twisted: :evil:

This is not a basement to get me to remove the script. I will edit the post to inform users not to download the script. That's all that i can do for you and "your" gnewpet" at this time. Sorry, maybe a second thought (by you) will do it? :wink:
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#27 Post by jpeps »

Apps typically evolve from the input of the community...namely requests and bug notifications from testing. I just posted 6.0 today after you requested a version that would work with mounted files. That required some major revisions. You found a trivial bug associated with an overlooked path in a /tmp file (although you didn't know it). I'm sure there are others.

The fix you seem so enamored with pointed to the symptom, but not the problem. Willy nilly adding an unnecessary path variable may seem brilliant to you, but can break the script in other ways. Bragging about it being "perfect" and not needing "any other improvements" sounds to me like mental illness. The bug was trivial to begin with, in light of all the additional code required to respond to your request. Calling me a lazy ass again sounds like mental illness.

Your initial problem wasn't related to the trivial bug, it was related to your not understanding how to open the correct directory...which caused the "invalid directory" error. I put that in so people would know if they loaded the incorrect directory. See....I was thinking of you. That had noting to do with it copying files from /root instead of ./root.

The last developments of gnewpet were responses from pemasu to include builtins, and then smokey1 to allow updates for the builtins. I don't recall getting any responses from them about being a lazy ass.

Prior to that, I responded to your request for a checklist. That went through a number of revisions until I figured out a way to do it. I guess I owe the solution to your brilliance for requesting it.

I believe I posted your name somewhere giving credit for finding a link bug (needed a cp -P) and offering requests, which stimulated the initial coding. We're all indebted to you. All my work comes out of the ideas of other coders and testers. There's a difference between offering a request and writing a finished app, though.

You're the first member I've come come across on the forum that would see nothing wrong with posting a new version of someone elses' work without their consent. I've seen plenty of posts in a thread with something like an improved gui, but even those are done respectfully... never a new version posted somewhere else; and your sense of entitlement because of requests that you feel gives you ownership of the code? Enough....

Again, the app is posted by myself (yes....a lazy ass) for the puppy community, and I, not you, will maintain it. I rely on other community members testing it out and offering suggestions. I code simply because I enjoy it. I have absolutely no concerns if you use it or don't use it.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#28 Post by Flash »

I'm going to lock this thread for a while in the hope that you two will cool off enough to let this go. :(

If I forget to unlock it in a few days, will someone please remind me?

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#29 Post by jpeps »

Version 6.2 bug fix. File List for user-apps showing dir twice.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#30 Post by Geoffrey »

Welcome back 8), I found this very useful, saves me constantly having to use the ppm while I'm working on test installs,
the only thing I found is if the app saves its setting to a file that was installed, it will have those settings,
I've only come across this once with a game I made into a pet, but that is a minor problem, keep up the good work.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#31 Post by jpeps »

Geoffrey wrote:Welcome back 8), I found this very useful, saves me constantly having to use the ppm while I'm working on test installs,
the only thing I found is if the app saves its setting to a file that was installed, it will have those settings,
I've only come across this once with a game I made into a pet, but that is a minor problem, keep up the good work.
Yeah, it copies the current files listed in /root/.packages, not the originals..thus the ability to change the name for an update. The "save directory" option is for manually adding files not listed in .packages.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#32 Post by technosaurus »

If anyone would like a simplified version:

Code: Select all

#!/bin/sh
D=$HOME/.packages/builtin_files
PKGS=`ls -1 $D`
PKG=`Xdialog --stdout --combobox "select package to petify" 0 0 $PKGS`
[ $PKG ] && {
	mkdir /tmp/$PKG
	for x in `cat $D/$PKG`; do
		[ -d $x ] && cd $x || cp --parents `pwd`/$x /tmp/$PKG
	done
echo "




" |dir2pet /tmp/$PKG && $0
}
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#33 Post by jpeps »

technosaurus wrote:If anyone would like a simplified version:
The accurate package names and pet.specs for the builtin names are found by searching the woof-installed-packages. In many cases, they're a combination of several packages. For that reason, I didn't want to include an inaccurate pet.spec. For a unique pet.spec, just check "save directory" and then run dir2pet on it in the /tmp folder.

For the user installed packages, gnewpet includes the original pet.spec file, eliminating the need to design a new one.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#34 Post by RSH »

Hi,

I am totally sorry to post again about the same issue, but i do have the same results as i did get using gnewpet version 6.0. :!:

I do get the correct list of installed applications of the mounted sfs inside the mounted iso. If i select one pet to rebuild, i do get only the "var" directory and its content (maybe created by gnewpet?).

I did this using the new diamond iso - trying to rebuild timidity. Doing this using installed gnewpet 6.2 was not successful! :shock:

After installing my previous posted and modified script, i do get all the files. and after installing timidity i just did need to search manually for some missed libs. These libs seem not to be listed in the ".files" file of timidity - so everything seems to be alright with that fact. Found all the libs inside diamond and copied into my LazY Puppy - and succeeds!

Data:

Path in gnewpath: /mnt/+mnt++mnt+sdb2+Diamond528rtp.iso+lupu_528.sfs (path /root/.packages is predefined in gnewpet)

Full path is: /mnt/+mnt++mnt+sdb2+Diamond528rtp.iso+lupu_528.sfs/root/.packages

Note, i do get the right and complete list of installed apps in diamond! :!:

Please would somebody improve this using a mounted sfs inside a mounted iso and trying to rebuild a application which is NOT installed inside the actually running puppy. Please, do so - this wonderful application should work in every detail, but actually it doesn't. :cry:

Better saying: actually it does only work correct if using my previous posted modified script.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#35 Post by jpeps »

OK, should be fixed. Thought it was working, but guess not.


edit: something still screwing up....looking at it.

Found it. Hope that fixed it.

Post Reply