(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 Mon 28 Sep 2020, 08:58
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
PPM2
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 13 of 18 [262 Posts]   Goto page: Previous 1, 2, 3, ..., 11, 12, 13, 14, 15, 16, 17, 18 Next
Author Message
stemsee

Joined: 27 Jun 2013
Posts: 2572
Location: In The Way

PostPosted: Fri 08 May 2015, 06:58    Post subject:  

Hi Mavrothal
I hope to get your advice.
I am using this simple code
Code:
#!/bin/sh
if [ ! -z "$2" ]; then
nm="$2"
else
. /tmp/name
fi
while read line
do
lined=`echo $line | rev | cut -f2,3,4,5,6,7,8,9,10,11,12,13,14 -d '/' | rev`
mkdir -p $HOME/"$nm"/"$lined"
cp -f $line $HOME/"$nm"/"$lined"/
done < "$1"
rox $HOME/"$nm" &
to create an apptree of any installed app. Which I can then right click and create a pet package. I simply open term and type
Code:
apptree $HOME/packages/builtin/hiawatha.files hiawatha-1.5
for example and seems to work fine. Is there anything else obvious that may be missing?

Together with slocategui i can build a similar apptree but with only those elements dirs/files which share the search term. Which seems to be ok for transferring principle parts of apps.

Thanks
stemsee

Last edited by stemsee on Fri 08 May 2015, 08:33; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Fri 08 May 2015, 07:18    Post subject:  

stemsee wrote:
I am using this simple code

I do not know how this relates to PPM(...) but it looks OK. However, modifications done by install scripts will be missed.

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

Joined: 27 Jun 2013
Posts: 2572
Location: In The Way

PostPosted: Fri 08 May 2015, 07:28    Post subject:  

Isn't ppm responsible for ~/.packages/* and ~/.package/builtin/*

Ah yeah! pinstall files, well spotted. Maybe ppm should back up pinstall files during install into an lz4 compressed archive for later use! That would be awesomeness personified! Wink
Back to top
View user's profile Send private message MSN Messenger 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Fri 08 May 2015, 07:50    Post subject:  

stemsee wrote:
Maybe ppm should back up pinstall files during install into an lz4 compressed archive for later use!

Install scripts are run during woof building by 3builddistro. Wink

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


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Fri 08 May 2015, 10:53    Post subject: Re: A last check  

gjuhasz wrote:
In most cases - feel free to kill me if I am wrong Smile - the users try out the interesting pets they find in the forum.

So here is a patch for these adventurous puppians
Code:
--- a/usr/local/petget/removepreview.sh   2015-04-16 08:32:03.626402670 +0300
+++ b/usr/local/petget/removepreview.sh   2015-05-09 09:01:47.643136701 +0300
@@ -85,7 +85,23 @@
       [ -f "/initrd${SAVE_LAYER}${DN}/.wh.${BN}" ] && rm -f "/initrd${SAVE_LAYER}${DN}/.wh.${BN}"
      fi
     else
-     rm -f "$ONESPEC"
+     cd /root/.packages
+     grep "${ONESPEC}" *.files | grep -v  "${DB_pkgname}" | cut -f 1 -d ':' | sed s'/\.files//' \
+     > /tmp/pets_with_common_files
+     cd -
+     for LINE in $(cat /tmp/pets_with_common_files)
+     do
+      [ "$(grep $LINE /tmp/pkgs_to_remove)" != "" ] && \
+       sed -i "/$LINE/d" /tmp/pets_with_common_files
+     done
+     OTHERPKG=$(cat /tmp/pets_with_common_files)
+     if [ "$OTHERPKG" ];then
+      OTHERPET=$(echo ${OTHERPKG} | tr ' ' ',')
+      . /usr/lib/gtkdialog/box_yesno "$(gettext 'Puppy Package Manager')" "$(gettext 'It appears that the') <b>${ONESPEC}</b> $(gettext 'file installed by the ') <b>${DB_pkgname}</b> $(gettext 'package you are removing,') <b> $(gettext 'was also installed by the') ${OTHERPET} $(gettext 'package(s)! ')</b> $(gettext 'This is likely because of some careless package generation but removing the file may break the other package(s). Do you want to remove it anyway?')"
+      [ "$EXIT" = "yes" ] && rm -f "$ONESPEC"
+     else
+      rm -f "$ONESPEC"
+     fi
     fi
    fi
   done

Will generate a warning as shown.
However, I do not intend to put it in woof since grep'ing and sed'ing through all your installed files can slow down the remove process significantly as install packages increase.
warning.png
 Description   
 Filesize   19.05 KB
 Viewed   588 Time(s)

warning.png


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


Joined: 21 Sep 2008
Posts: 4391
Location: Worcestershire, UK

PostPosted: Sat 09 May 2015, 14:07    Post subject: google ping  

ppm2's pinging of google is under discussion on the LxPup thread:

http://www.murga-linux.com/puppy/viewtopic.php?p=844552#844552

Maybe there is a case to make the ping destination configurable for those people who view google with suspicion?

or maybe use 8.8.8.8
http://etherealmind.com/what-is-the-best-ip-address-to-ping-to-test-my-internet-connection/

peebee

_________________
LxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Sat 09 May 2015, 14:29    Post subject: Re: google ping  

peebee wrote:
Maybe there is a case to make the ping destination configurable for those people who view google with suspicion?

Making it configurable it would appear an unnecessary hassle for the rest of us.
BTW service_pack.sh was not changed in PPM2. Is the original.

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


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Sat 09 May 2015, 23:56    Post subject: Re: google ping  

mavrothal wrote:
Making it configurable it would appear an unnecessary hassle for the rest of us.

Here is a solution that involves some hassle only from my side. Rolling Eyes
PPM will check connectivity by ping'ing google only if puppy is allowed to check external IP through icanhazip.com (configurable in ipinfo).
I'm assuming if someone freaks out about ping'ing google will be also be freaking out about wget'ing icanhazip.com.
So here is the patch:
Code:
--- a/usr/local/petget/service_pack.sh   2015-04-16 08:32:03.626402670 +0300
+++ b/usr/local/petget/service_pack.sh   2015-05-10 06:42:52.313401095 +0300
@@ -8,18 +8,24 @@
 #121206 faster internet check. remove window centralise.
 #121217 DISTRO_VERSION getting reset by 'init' in initrd, need workaround.
 
-IFCONFIG="`ifconfig | grep '^[pwe]' | grep -v 'wmaster'`"
-[ ! "$IFCONFIG" ] && exit 1 #no network connection.
-ping -4 -c 1 www.google.com
-if [ $? -ne 0 ];then
- sleep 1
- ping -4 -c 1 www.google.com
- [ $? -ne 0 ] && exit 1 #no internet.
-fi
-
 export TEXTDOMAIN=petget___service_pack.sh
 export OUTPUT_CHARSET=UTF-8
 
+[ -f $HOME/.ipinfo ] && . $HOME/.ipinfo || CB0=true
+if [ "$CB0" = "true" ];then
+ IFCONFIG="`ifconfig | grep '^[pwe]' | grep -v 'wmaster'`"
+ [ ! "$IFCONFIG" ] && exit 1 #no network connection.
+ ping -4 -c 1 www.google.com
+ if [ $? -ne 0 ];then
+  sleep 1
+  ping -4 -c 1 www.google.com
+  [ $? -ne 0 ] && exit 1 #no internet.
+ fi
+else
+ /usr/lib/gtkdialog/box_splash -timeout 5 -placement top -bg yellow -text \
+  "$(gettext 'Internet connectivity check, is skipped')" &
+fi
+
 . /etc/DISTRO_SPECS #has DISTRO_DB_SUBNAME
 . /root/.packages/DISTRO_PET_REPOS #has PET_REPOS, PKG_DOCS_PET_REPOS
 

Assuming there is some positive testing and feedback I'll commit it to woof-CE

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

Last edited by mavrothal on Sun 10 May 2015, 00:35; edited 1 time in total
Back to top
View user's profile Send private message 
James C


Joined: 26 Mar 2009
Posts: 6735
Location: Kentucky

PostPosted: Sun 10 May 2015, 00:24    Post subject:  

For those seriously concerned users all internet connectivity could be removed,

Nothing to worry about from the evil world wide web then.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2572
Location: In The Way

PostPosted: Sun 10 May 2015, 01:56    Post subject:  

Hunk # Failed at 8. Tahr pup 6.0.1 .
capture20926.jpg
 Description   
 Filesize   44.13 KB
 Viewed   492 Time(s)

capture20926.jpg

Back to top
View user's profile Send private message MSN Messenger 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Sun 10 May 2015, 02:09    Post subject:  

stemsee wrote:
Hunk # Failed at 8. Tahr pup 6.0.1 .

The patch is against woof-CE but should be OK in 6.0.1
Most likely you missed the last blank line in the copy/paste (should be 3 lines at either end of the changed lines).
Anyway, attached is the patch gzipped.

BTW, posting the reject file would be more informative than providing "poof" that indeed it failed Wink
service_pack.sh.patch.gz
Description 
gz

 Download 
Filename  service_pack.sh.patch.gz 
Filesize  679 Bytes 
Downloaded  242 Time(s) 

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

Joined: 27 Jun 2013
Posts: 2572
Location: In The Way

PostPosted: Sun 10 May 2015, 15:31    Post subject:  

That patch worked.
capture20889.jpg
 Description   
 Filesize   10.88 KB
 Viewed   418 Time(s)

capture20889.jpg

capture27814.jpg
 Description   
 Filesize   34.85 KB
 Viewed   430 Time(s)

capture27814.jpg

capture27237.jpg
 Description   
 Filesize   9.06 KB
 Viewed   437 Time(s)

capture27237.jpg

Back to top
View user's profile Send private message MSN Messenger 
peebee


Joined: 21 Sep 2008
Posts: 4391
Location: Worcestershire, UK

PostPosted: Mon 11 May 2015, 04:18    Post subject:  

mavrothal wrote:
Anyway, attached is the patch gzipped.

Hi mav

As I reported this as a concern to some people although I don't "own" the concern personally.....

My apologies for jumping to the wrong conclusion that the concern had been introduced by ppm2 and thanks to you for providing a patch anyway.....

BTW - testing patches is a bit difficult because "patch" only comes in the devx and not everybody downloads or runs all the time with devx installed....

Anyway - I got patch from pkgs.org and applied your patch to LxPup15.03 and all seems fine.

Cheers & thanks
peebee
Screenshot.png
 Description   
 Filesize   24.35 KB
 Viewed   370 Time(s)

Screenshot.png

Screenshot2.png
 Description   
 Filesize   18.45 KB
 Viewed   362 Time(s)

Screenshot2.png


_________________
LxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64
Back to top
View user's profile Send private message Visit poster's website 
stemsee

Joined: 27 Jun 2013
Posts: 2572
Location: In The Way

PostPosted: Sun 24 May 2015, 14:24    Post subject:  

To whom it may concern.

Request for archiving of pinstall and punstall scripts from .pet and .deb ( .distro-base-ext), by ppm during install, to $HOME/.packages/pinpun/app-name.lz4

regards
stemsee
Back to top
View user's profile Send private message MSN Messenger 
mavrothal


Joined: 24 Aug 2009
Posts: 3108

PostPosted: Sun 24 May 2015, 23:42    Post subject:  

stemsee wrote:
Request for archiving of pinstall and punstall scripts from .pet and .deb ( .distro-base-ext), by ppm during install, to $HOME/.packages/pinpun/app-name.lz4

Any good reason for it?
Regardless, I'm sure you can do it (and provide some patches here for other that may be interested).
The installpkg,sh script has a line that "rm -f /pinstall.sh" which you can change to "mv" to a desired location. It also has "mv -f /puninstall.sh /root/.packages/${DLPKG_NAME}.remove" which you can then "cp" to another location as needed.
Finally, removepreview.sh does "rm -f /root/.packages/${DB_pkgname}.remove". Just remember to rm also your .lz4 versions.
These should suffice Wink

_________________
== 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 13 of 18 [262 Posts]   Goto page: Previous 1, 2, 3, ..., 11, 12, 13, 14, 15, 16, 17, 18 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 » Users ( For the regulars )
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.0628s ][ Queries: 13 (0.0075s) ][ GZIP on ]