Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 02 Oct 2014, 01:08
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
Racy Puppy 5.2.2 Final, 18 Nov. 2011
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 30 of 33 Posts_count   Goto page: Previous 1, 2, 3, ..., 28, 29, 30, 31, 32, 33 Next
Author Message
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Sat 04 Feb 2012, 16:05    Post_subject:  

willem1940NLD wrote:
Pidgin 2.7.5w5 works in racy 5.2.2 but the pidgin icon in tray bottom right in screen looks like a document with a red "X".

Tried an older version of Pidgin and the right icon popped in, but that pidgin did not work, could not be opened.

Re-installed pidgin 2.7.5w5 without uninstalling the old one; pidgin working alright but still with the dummy icon.


Pidgin needs to be compiled with --enable-trayicon-compat or you will have this problem.
Back to top
View user's profile Send_private_message Visit_website 
npierce

Joined: 28 Dec 2009
Posts: 858

PostPosted: Sat 04 Feb 2012, 16:15    Post_subject:  

Hi Karl,

Thanks for looking at my code.

Karl Godt wrote:
If i issue

setxkbmap -rules xorg -model pc102 -layout us,de -variant ",alt-intl" -option grp:rwin_toggle,lv3:ralt_switch
in terminal
i get
Error loading new keyboard description

The order of the variant list is important. It needs to be in the same order as the layout list. The initial comma in ",alt-intl" indicates that the first field is empty. So no variant is assigned to the first layout. The second variant is assigned to the second layout.

So setxkbmap tries to assign the alt-intl variant to the de layout. But there is no such variant defined for the de layout, so you get an error message.

Karl Godt wrote:
setxkbmap -rules xorg -model pc102 -layout us,de -variant "alt-intl" -option grp:rwin_toggle,lv3:ralt_switch
works ok .

Yes. Now setxkbmap tries to assign the alt-intl variant to the us layout, which is a valid combination, so it succeeds.

Using -layout de,us -variant ",alt-intl" is also legal.



Karl Godt wrote:
+++ new/XkbLayoutConfig

probably needs to be

Code:
+        VARIANTS=`echo "$VARIANTS" | sed 's/^,//;s/,$//'`

The purpose of that line is only to remove a trailing comma that gets added as a result of the echo command in the previous line. This code is adapted from a line in XkbVariantConfig. In theory, I could have eliminated the need for this line by using echo -n instead of echo, but the original author left a warning in the code:
Quote:
#the last sed is since we need to cut off the last , (echo -n doesn't work well)

So I decided to heed that warning.

Anyway, no extra comma is added at the start of the list, so there is no need for the s/^,// here.



Karl Godt wrote:
Quote:
EXPECTED RESULTS:

"intl" variant should have been removed from "XkbVariant" line.



Don't know if it should have been removed

The steps listed for reproducing bug #3, using the original XkbLayoutConfig results in these lines being placed in xorg.conf:
Code:
   Option      "XkbLayout" "be" #xkeymap0
   Option      "XkbVariant" "intl,"

The intl variant was assigned to the us layout, but the us layout has been removed, so its variant should be removed as well. When XkbApplyNow passes those two lists to setxkbmap, that utility will be unhappy with the trailing comma because this makes the variant list have two fields while the layout list has only one field. No variant will be loaded.

Even if setxkbmap wasn't unhappy with that comma, it would be unhappy with trying to assign a variant named "intl" to the layout named "be", because there is no "intl" variant for the "be" layout.



Karl Godt wrote:
but to toggle
Option "XkbOptions" "lv3:ralt_switch,grp:rwin_toggle"

the keyboard layout
Option "XkbLayout" "de,us" #xkeymap0

does not work having two variants here
Option "XkbVariant" "deadgraveacute,alt-intl"

Oh, that's interesting.

I haven't been able to test with grp:rwin_toggle, since I don't have a right Windows key on my laptop, but when I test with grp:lwin_toggle I do have trouble.

For me it loads the German layout OK, and pressing the left Windows key does, in fact, switch to the US layout. But it will not switch back again if I press the key again. Is that the same symptom that you had?

Anyway, the symptom I see doesn't seem to be related to the variants. It acts the same if I don't load any variants at all.

The funny thing is that it is happy if I reverse the order of the layouts and variants, like so:
Code:
        Option      "XkbLayout" "us,de" #xkeymap0             
        Option      "XkbVariant" "alt-intl,deadgraveacute"         
        Option          "XkbOptions"   "lv3:ralt_switch,grp:lwin_toggle"

Also, setting the left Ctrl+Shift keys for toggling the group works with the original order:
Code:
        Option      "XkbLayout" "de,us" #xkeymap0             
        Option      "XkbVariant" "deadgraveacute,alt-intl"   
        Option          "XkbOptions"   "lv3:ralt_switch,grp:ctrl_shift_toggle"

And using the left Windows key as a temporary switch, not a toggle, also responds properly:
Code:
   Option      "XkbLayout" "de,us" #xkeymap0
   Option      "XkbVariant" "deadgraveacute,alt-intl"
   Option       "XkbOptions"   "lv3:ralt_switch,grp:lwin_switch"

(Rember to switch your keyboard group back to the first layout before removing a group toggle. If you don't you will be stuck in another layout until you add a new group toggle.)

Things are a bit flaky. When I first tried grp:lwin_switch, it worked fine. When I tried later it didn't work until I tried grp:win_switch. Then grp:lwin_switch worked again. And grp:lwin_toggle no longer lets me toggle even once, as it did when I first tried it.

Anyway, you have clearly found a bug (assuming I am seeing the same symptom as you). Since I am able to reproduce it by using setxkbmap without involving the XKB Configuration Manager, it would seem that the bug is not in the XKB Configuration Manager, but further downstream (possibly in xkbcomp, the keyboard definition files, or the X server itself).

Thanks again for taking the time for looking at this.

P.S. Karl, I just saw a new reply from you come in. Thanks for testing. Glad the diffs worked for you. I'll read your new message over and get back to you later.
Back to top
View user's profile Send_private_message 
willem1940NLD

Joined: 06 Jul 2010
Posts: 205
Location: Sittard, Limburg, The Netherlands

PostPosted: Sat 04 Feb 2012, 16:41    Post_subject:  

jemimah wrote:
willem1940NLD wrote:
Pidgin 2.7.5w5 works in racy 5.2.2 but the pidgin icon in tray bottom right in screen looks like a document with a red "X".

Tried an older version of Pidgin and the right icon popped in, but that pidgin did not work, could not be opened.

Re-installed pidgin 2.7.5w5 without uninstalling the old one; pidgin working alright but still with the dummy icon.


Pidgin needs to be compiled with --enable-trayicon-compat or you will have this problem.
Great consolation to a non-technical user.
Back to top
View user's profile Send_private_message MSNM 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Sat 04 Feb 2012, 16:41    Post_subject:  

Quote:
Things are a bit flaky. When I first tried grp:lwin_switch, it worked fine. When I tried later it didn't work until I tried grp:win_switch. Then grp:lwin_switch worked again. And grp:lwin_toggle no longer lets me toggle even once, as it did when I first tried it.


npierce,

that's true !

setxkbmap worked setting it for geany once but not typing into sakura terminal emulator .

Then i changed a lot and next time it worked perfectly .

Most of the times it worked ok as i can remember .

As a side note : Maybe xkbconfigmanager coded with arrays
instead of many ^ echo "$LIST" | grep "$WHATEVER" ^
would work also .
Back to top
View user's profile Send_private_message Visit_website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Sun 05 Feb 2012, 10:10    Post_subject:  

That's my XkbVariantConfig of today :

Detected there was a fault in my previous diff in case several country layouts with same layoutvariant name like 'nodeadkeys' .

I added two more tags to the TMPLIST=/tmp/XkbVariantList
+ echo "\"${SINDEX}: $ALAY ${INDEX}: $TAG\" \""$INFO"\""
which would stand for SuperINDEX and ALAYOUT .

Code:
--- /Downloads/XkbVariantConfig   2012-02-04 10:04:03.000000000 -0100
+++ /usr/local/apps/XkbConfigurationManager/XkbVariantConfig   2012-02-05 14:52:40.000000000 -0100
@@ -6,6 +6,8 @@
 #20120201 npierce: Corrected calculation of $POS.
 #20120202 npierce: Pad $OLD to give it same number of fields as $LAYOUTS.
 #20120203 npierce: Corrected window title.
+#20120205 Karl Reimer Godt : added possibility to use one variantname like nodeadkeys for several country layouts .
+#20120205 Karl Reimer Godt : changed the original code by Dougal to create lists to be easier to debug .
 
 ##--------variables---------->>
 INFILE='/etc/X11/xorg.conf'
@@ -21,49 +23,62 @@ LIST="/etc/X11/xkb/rules/xorg.lst"
 ORIGINAL=`fgrep '"XkbVariant"' $INFILE | grep -v '^#'`
 LAYOUTSLINE=`fgrep '"XkbLayout"' $INFILE | grep -v '^#'`
 [ "$ORIGINAL" = "" ] && NEWLINE="yes"
-
 #find current variants and layouts:
 CURRENT=`echo "$ORIGINAL" | cut -d'"' -f4`
 OLD="$CURRENT" #needed if line exists but nothing in it
 LAYOUTS=`echo "$LAYOUTSLINE" | cut -d'"' -f4`
 
 # create list of variants available for our layouts:
-if [ ! `echo "$CURRENT" | tr -d ','` = "" ]; then
-   EXIST=$(echo "$CURRENT" | tr ',' '\n' | while read AVAR ;do
+POS=0
+VARLIST=`echo "$CURRENT" |tr ',' '\n' | sed 's/^$/NONE/'`
+for AVAR in $VARLIST;do
 POS=$(( $POS + 1 ))   #20120201
-[ "$AVAR" = "" ] && continue
-MYLAY=`echo "$LAYOUTS" | cut -d',' -f$POS`
-fgrep " $AVAR " $LIST | fgrep -w "$MYLAY:"
-done)
-   MESSAGE="You are currently using the following variants:
-"$EXIST"
+if [ "$AVAR" = "" ];then
+AVAR=' (not set yet)'
+elif [ "$AVAR" = 'NONE' ];then
+AVAR=' (not set yet)'
+fi
+MYLAY=`echo "$LAYOUTS" | cut -d',' -f $POS 2>/dev/null`
+[ ! "$MYLAY" ] && MYLAY='ERROR'
+DESCRIPTION=`grep " $AVAR " $LIST | grep -w "${MYLAY}:" |cut -f2 -d:`
+[ ! "$DESCRIPTION" ] && DESCRIPTION=' (none)'
+EXIST="$EXIST
+$POS $MYLAY $AVAR : $DESCRIPTION"
+done
+
+MESSAGE="You are currently using the following variants:
+$EXIST
 
 To remove a variant, select it in the list below and press OK.
 To add a new one, select it and press OK.
 
 NOTE: if you select a variant for a layout that already has one,
  the new one will replace the old."
-else
-   OLD=`echo "$LAYOUTS" | tr -d 'a-zA-Z_/'`
-   MESSAGE='Please select the variant you would like to add, then press OK.'
-fi
 
 # Pad $OLD to give it same number of fields as $LAYOUTS.   #20120202
-LAYOUTCOUNT=`echo "$LAYOUTS" | tr ',' '\n' | wc -l #grep -c ".*"`
-VARIANTCOUNT=`echo "$OLD" | tr ',' '\n' | grep -c ".*"`
+LAYOUTCOUNT=`echo "$LAYOUTS" | tr ',' '\n' | wc -l`
+VARIANTCOUNT=`echo "$OLD" | tr ',' '\n' | wc -l`
 DIFFERENCE=$(( $LAYOUTCOUNT - $VARIANTCOUNT ))
+
 while test "$DIFFERENCE" -gt "0" ; do
    OLD="${OLD},"
    DIFFERENCE=$(( $DIFFERENCE - 1 ))
 done
 
 # create list of available variants:
-INDEX=1
+rm $TMPLIST
+INDEX=1;SINDEX=0
 echo "$LAYOUTS" | tr ',' '\n' | while read ALAY;
-do fgrep " $ALAY:" $LIST | tr -s ' ' ; done | while read AVAR ; do
+do
+SINDEX=`expr $SINDEX + 1`
+fgrep " $ALAY:" $LIST | tr -s ' ' | while read AVAR
+do
    TAG=`echo "$AVAR" |cut -d' ' -f1`
    INFO=`echo "$AVAR" |cut -d' ' -f2-`
-   echo "\"$INDEX: $TAG\" \""$INFO"\""; INDEX=`expr $INDEX + 1` ; done > $TMPLIST
+   echo "\"${SINDEX}: $ALAY ${INDEX}: $TAG\" \""$INFO"\""
+   INDEX=`expr $INDEX + 1`
+done >> $TMPLIST
+done
 
 # create dialog with all options (in temp file)
 echo -n '#!/bin/sh
@@ -75,19 +90,22 @@ chmod 755 $TMPDIALOG
 # run dialog and get choice
 CHOICE=`eval $TMPDIALOG`
 [ "$CHOICE" = "" ] && echo "cancelled" && exit
-echo "$CHOICE"
+echo "CHOICE='$CHOICE'"
 
 # find the variant chosen and its position
-NEWVAR=`fgrep "$CHOICE" $TMPLIST | cut -d'"' -f2 | cut -d' ' -f2`
-ITSLAY=`fgrep "$CHOICE" $TMPLIST | cut -d'"' -f4 | cut -d: -f1`
-ITSPOS=`echo "$LAYOUTS" | tr ',' '\n' | fgrep -n "$ITSLAY" | cut -d: -f1`
-
+#KARL REIMER GODT :commented the lines by npierce ,
+#using more tags for this SINDEX and ALAY
+#NEWVAR=`fgrep -w "$CHOICE" $TMPLIST | cut -d'"' -f2 | cut -d' ' -f2`
+NEWVAR=`echo "$CHOICE" |awk '{print $4}'`
+#ITSLAY=`fgrep -w -m1 "$CHOICE" $TMPLIST | cut -d'"' -f4 | cut -d: -f1`
+ITSLAY=`echo "$CHOICE" |awk '{print $2}'`
+#ITSPOS=`echo "$LAYOUTS" | tr ',' '\n' | fgrep -n "$ITSLAY" | cut -d: -f1`
+ITSPOS=`echo "$CHOICE" |awk '{print $1}'| tr -d ':'`
 
 #the last sed is since we need to cut off the last , (echo -n doesn't work well)
-NEW=`echo "$OLD" | tr ',' '\n' | sed "${ITSPOS}s/.*/$NEWVAR/" | tr '\n' ',' | sed 's/,$//'`
-
+NEW=`echo "$OLD" | tr ',' '\n' | sed "${ITSPOS} s/.*/$NEWVAR/" | tr '\n' ',' | sed 's/,$//'`
 # if old is same as new: remove
-[ "$NEW" = "$OLD" ] && NEW=`echo "$OLD" | tr ',' '\n' | sed "${ITSPOS}s/.*//" | tr '\n' ',' | sed 's/,$//'`
+[ "$NEW" = "$OLD" ] && NEW=`echo "$OLD" | tr ',' '\n' | sed "${ITSPOS} s/.*//" | tr '\n' ',' | sed 's/,$//'`
 
 # add new variant to line, or entire line, if it doesn't exist:
 if [ "$NEWLINE" = "yes" ] ;then
@@ -107,4 +125,4 @@ else
    mv -f $OUTFILE $INFILE
    eval $SUCCESS
 fi
-exit
\ No newline at end of file
+exit
XkbVariantGUI.png
 Description   some may like it some may think it is too much information :-P
 Filesize   42.32 KB
 Viewed   921 Time(s)

XkbVariantGUI.png

Back to top
View user's profile Send_private_message Visit_website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sun 05 Feb 2012, 19:19    Post_subject:  

Thanks for the all the feedback and fixes guys. I am busy with Momanager and other internationalization issues in Woof right now, want to keep the momentum going on that. I will get back to this forum thread, and others, in a couple of days probably.
_________________
http://bkhome.org/news/
Back to top
View user's profile Send_private_message Visit_website 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Mon 06 Feb 2012, 11:59    Post_subject:  

Here's an enhancement for installpkg.sh. This is intended warn users when they attempt to install pets that clobber system files.


Code:
--- installpkg.sh.orig   2012-02-06 10:45:48.528775229 -0500
+++ installpkg.sh   2012-02-06 10:42:51.087762415 -0500
@@ -43,10 +43,32 @@
 DLPKG_BASE="`basename $DLPKG`" #ex: scite-1.77-i686-2as.tgz
 DLPKG_PATH="`dirname $DLPKG`"  #ex: /root
 
+
+clobber_check(){
+   FILELIST="`cat /root/.packages/${DLPKG_NAME}.files`"
+   rm /tmp/petget-fileclobber
+   for FILE in $FILELIST ; do
+      FILE="/`echo $FILE|cut -d/ -f2-`"
+      [[ "$FILE" =~ "/root/.packages/.*" ]] && continue
+      [ -f "$FILE" ] && echo "$FILE" >> /tmp/petget-fileclobber
+   done
+   if [ -s /tmp/petget-fileclobber ] ; then
+      grep "/lib" /tmp/petget-fileclobber
+      [ $? = 0 ] && WARN="This may cause system problems if this is not an intentional upgrade.\n\n"
+      yad --title "Confirm File Clobber" --button=Proceed:0 --button=Cancel:1 --text "The following files will be overwritten by this package:\n\n<b>$(cat /tmp/petget-fileclobber |head -n 20) </b>\n\n<b><span foreground='red'>This package may already be installed.\nChoose Proceed only if this is an upgrade.\n\n${WARN}These files will be deleted if the package is uninstalled so if you proceed\nwith installation be aware that uninstallation of this package is not\nrecommended.</span></b>"
+      [ $? = 0 ] && return 0
+        rm -f "$FILELIST"
+        rm /tmp/petget-fileclobber
+          exit 1
+    fi
+    rm /tmp/petget-fileclobber
+    return 0   
+}
+
 # 6sep10 shinobar: installing files under /mnt is danger
 install_path_check() {
   FILELIST="/root/.packages/${DLPKG_NAME}.files"
-  [ -s "$FILELIST" ] || retuen 0
+  [ -s "$FILELIST" ] || return 0
   grep -q '^/mnt' "$FILELIST" || return 0
   MNTDIRS=$(cat "$FILELIST" | grep '^/mnt/.*/$' | cut -d'/' -f1-3  | tail -n 1)
   LANG=$LANG_USER
@@ -128,12 +150,14 @@
    pPATTERN="s%^\\./${DLPKG_NAME}%%"
    echo "$PETFILES" | sed -e "$pPATTERN" > /root/.packages/${DLPKG_NAME}.files
    install_path_check
+   clobber_check
    tar -z -x --strip=2 --directory=${DIRECTSAVEPATH}/ -f ${DLPKG_MAIN}.tar.gz
   else
    #new2dir and tgz2pet creates them this way...
    pPATTERN="s%^${DLPKG_NAME}%%"
    echo "$PETFILES" | sed -e "$pPATTERN" > /root/.packages/${DLPKG_NAME}.files
    install_path_check
+   clobber_check
    tar -z -x --strip=1 --directory=${DIRECTSAVEPATH}/ -f ${DLPKG_MAIN}.tar.gz
   fi
  ;;
@@ -143,6 +167,7 @@
   [ $? -ne 0 ] && exit 1
   echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
   install_path_check
+  clobber_check
   dpkg-deb -x $DLPKG_BASE ${DIRECTSAVEPATH}/
   if [ $? -ne 0 ];then
    rm -f /root/.packages/${DLPKG_NAME}.files
@@ -158,6 +183,7 @@
   [ $? -ne 0 ] && exit 1
   echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
   install_path_check
+  clobber_check
   tar -z -x --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE
  ;;
  *.txz) #100616
@@ -169,6 +195,7 @@
   [ $? -ne 0 ] && exit 1
   echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
   install_path_check
+  clobber_check
   tar -J -x --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE
  ;;
  *.tar.gz)
@@ -179,6 +206,7 @@
   [ $? -ne 0 ] && exit 1
   echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
   install_path_check
+  clobber_check
   tar -z -x --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE
  ;;
  *.tar.bz2) #100110
@@ -189,6 +217,7 @@
   [ $? -ne 0 ] && exit 1
   echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
   install_path_check
+  clobber_check
   tar -j -x --directory=${DIRECTSAVEPATH}/ -f $DLPKG_BASE
  ;;
  *.rpm) #110523
@@ -199,6 +228,7 @@
   [ $? -ne 0 ] && exit 1
   echo "$PFILES" > /root/.packages/${DLPKG_NAME}.files
   install_path_check
+  clobber_check
   #110705 rpm -i does not work for mageia pkgs...
   #busybox rpm -i $DLPKG_BASE
   exploderpm -i $DLPKG_BASE
Back to top
View user's profile Send_private_message Visit_website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Mon 06 Feb 2012, 12:26    Post_subject:  

jemimah , interesting feature

BUT

WHY only for lib files ?

tar has got the
--backup[=CONTROL]
--suffix=STRING [ DLPKGNAME]

options , would be interesting to add it to petget

in that case ppm while uninstalling would be able to restore things .
Back to top
View user's profile Send_private_message Visit_website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Mon 06 Feb 2012, 16:14    Post_subject:  

bash-3.2# tar-orig --version
tar (GNU tar) 1.19
from Puppy 4.3
does not make backups on files inside the tar archive that do not have a dot extension like most executable files in linux have while extracting .

bash-3.2# tar-racy --version
tar (GNU tar) 1.26
from Racy 5.2.2
seems to be OK on this AND works in puppy 4.3 though lesser glibc .

a diff would look like >
Code:
--- /mnt/sda9/usr/local/petget/removepreview.sh   2011-12-24 16:13:36.689981247 -0100
+++ /usr/local/petget/removepreview.sh   2012-02-06 20:39:26.000000000 -0100
  [ "$EXIT" != "OK" ] && exit
 fi
 
+SUF="${DB_pkgname}~"
+
 if [ -f /root/.packages/${DB_pkgname}.files ];then
  cat /root/.packages/${DB_pkgname}.files |
  while read ONESPEC
@@ -61,8 +61,14 @@ if [ -f /root/.packages/${DB_pkgname}.fi
     #that hides the original file. what we want is to remove the installed file, and
     #restore the original pristine file...
     cp -a --remove-destination "/initrd/pup_ro2$ONESPEC" "$ONESPEC"
+    if [ -e "${ONESPEC}.$SUF" ];then
+    mv "${ONESPEC}.$SUF" "$ONESPEC"
+    fi
    else
     rm -f "$ONESPEC"
+    if [ -e "${ONESPEC}.$SUF" ];then
+    mv "${ONESPEC}.$SUF" "$ONESPEC"
+    fi
    fi
   fi
  done


Code:
--- /mnt/sda9/usr/local/petget/installpkg.sh   2011-12-24 16:13:36.683314581 -0100
+++ /usr/local/petget/installpkg.sh   2012-02-06 21:02:15.000000000 -0100

-   tar -z -x --strip=2 --directory=${DIRECTSAVEPATH}/ -f ${DLPKG_MAIN}.tar.gz
+   tar -z -x --backup=simple --suffix=".${DLPKG_MAIN}~" --strip=2 --directory=${DIRECTSAVEPATH}/ -f ${DLPKG_MAIN}.tar.gz

NOTE 1> the second diff is shorthand for all the several tar extraction commands in installpkg.sh

*
NOTE 2>
While i was working on the above diffs i used a xcalib_0.8.pet by GustavoVz which gave me an error at
Code:
DB_version="`echo -n "$PKGNAME" | grep -o '\\-[0-9].*' | sed -e 's%^\-%%'`"

in /usr/local/petget/petget

could make it work with
Code:
DB_version="`echo -n "$PKGNAME" | grep -o '[_-][0-9].*' | sed -e 's%^\-%%'`"  ##+2012-02-06 changed \\- to [-_]
Back to top
View user's profile Send_private_message Visit_website 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Mon 06 Feb 2012, 16:51    Post_subject:  

Karl Godt wrote:
jemimah , interesting feature

BUT

WHY only for lib files ?

tar has got the
--backup[=CONTROL]
--suffix=STRING [ DLPKGNAME]

options , would be interesting to add it to petget

in that case ppm while uninstalling would be able to restore things .


With lib files you just get an extra warning. This message comes up if any files get clobbered.

The backup idea is good, but we'd need to figure out a storage location and fix any remastering scripts to not copy in the backups.
Back to top
View user's profile Send_private_message Visit_website 
willem1940NLD

Joined: 06 Jul 2010
Posts: 205
Location: Sittard, Limburg, The Netherlands

PostPosted: Mon 06 Feb 2012, 17:43    Post_subject:  

Guvcview from package manager cannot work, because of missing dependencies. This has been handled in the forum and I followed the there given direct links to get both guvcview_wary-1.5.0.pet and guvcview_wary_DEP-1.5.0.pet, together working fine now.

===

Puzzle: instead of the dead Libreoffice_sfs offered in "install/package manager" I found an old openoffice-3.2.0.9450.pet made by Coolpup which works fine .... in my harddisk installation. I am now installing another racy 5.2.2 to USB stick for an old (yes, older than me .... he's 80) internet friend; everything working fine except the very openoffice, no matter the number of re-installs, purgings or reboots.
Question

===

Very old bug in all Pidgins: browser default setting "desktop default" does not open a browser for me, I have to scroll and select the exact browser.

===

More recent bug in all Pidgins: MSN (saved) password must be repeated to start a tedious dialogue finally opening hotmail inbox. Obviously this is due to MSN's doing.
Hotmail inbox opens without question when using browser only, after once the password has been saved in browser.

===

Like in all distros I had on board, keyboard setting (var) USA-alt-int often gets lost, must be re-selected. Sometimes even the source window gets lost, being replaced by a lot of text ..... then have to use CD startup, F2, purge; nauseating. This seems to be a common Linux bug, I experienced the same in more than 10 distros, not puppy only. I happen to need this setting, with the many quick diacritics/accents for some languages, without the need to use extra keys.
Back to top
View user's profile Send_private_message MSNM 
Argolance


Joined: 06 Jan 2008
Posts: 1830
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Tue 07 Feb 2012, 09:33    Post_subject: JWM multiple root MENUS problem with Wary/Racy 5.2
Sub_title: Activating MENUS using mouse buttons make pinboard crash!
 

=> Further details here!

Regards.

_________________

Back to top
View user's profile Send_private_message Visit_website 
willem1940NLD

Joined: 06 Jul 2010
Posts: 205
Location: Sittard, Limburg, The Netherlands

PostPosted: Tue 07 Feb 2012, 10:07    Post_subject:  

Quoting myself:
Quote:
.... Puzzle: instead of the dead Libreoffice_sfs offered in "install/package manager" I found an old openoffice-3.2.0.9450.pet made by Coolpup which works fine .... in my harddisk installation. I am now installing another racy 5.2.2 to USB stick for an old (yes, older than me .... he's 80) internet friend; everything working fine except the very openoffice, no matter the number of re-installs, purgings or reboots.
....
It seems I solved it and this may at least to me be quite instructive: 2 more apps got into danger and suddenly it struck me, that the icon of the USB-stick at single-click mounting .... and were I had placed a folder "extra software" .... called itself intermittently
/initrd/mnt/dev-save or
/mnt/home.
Of course this cannot be real but I lack technical insight.

Formatted an extra partition for that software-folder and totally re-installed clean racy 522 in boot partition. For the moment, seems stable and also old openoffice-3.2.0.9450.pet (made by Coolpup) working.
Back to top
View user's profile Send_private_message MSNM 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Tue 07 Feb 2012, 16:49    Post_subject:  

jemimah wrote:


With lib files you just get an extra warning. This message comes up if any files get clobbered.

The backup idea is good, but we'd need to figure out a storage location and fix any remastering scripts to not copy in the backups.


I really start to like the patch and have come up with something like this :
Code:
# diff -up /initrd/pup_ro2/usr/local/petget/petget /usr/local/petget/petget
--- /initrd/pup_ro2/usr/local/petget/petget     2009-08-19 14:19:56.000000000 +0100
+++ /usr/local/petget/petget    2012-02-07 21:14:22.076250487 +0100
@@ -192,10 +192,14 @@ rm -f $PKGPATH/${PKGNAME}.tar.gz 2>/dev/
 
 #announce result...
 if [ $RETVAL -ne 0 -o ! -s /tmp/petget-installed-pkgs-log ];then
+case $RETVAL in
+151)ERRMSG="<text use-markup=\"true\"><label>\"<b>Stopped installintion of ${FULLPKGNAME}  </b>\"</label></text>";;
+1|*|"")ERRMSG="<text use-markup=\"true\"><label>\"<b>Error, package ${FULLPKGNAME} failed to install.</b>\"</label></text>";;
+esac
  export FAIL_DIALOG="<window title=\"Puppy Package Manager\" icon-name=\"gtk-about\">
   <vbox>
   <pixmap><input file>/usr/local/lib/X11/pixmaps/error.xpm</input></pixmap>
-   <text use-markup=\"true\"><label>\"<b>Error, package ${FULLPKGNAME} failed to install.</b>\"</label></text>
+   $ERRMSG
    <hbox>
     <button ok></button>
    </hbox>
@@ -229,6 +233,25 @@ export INSTALL_DIALOG="<window title=\"P
 "
 gtkdialog3 --program=INSTALL_DIALOG
 
+echo ".${PKGNAME}~"
+DIRES=`ls -1 / |grep -vE 'initrd|mnt|proc|sys|tmp'`
+for dire in $DIRES;do
+find /$dire \( -type f -o -type l \) -name "*.${PKGNAME}~"
+backfiles=`find /$dire \( -type f -o -type l \) -name "*.${PKGNAME}~"`
+backupfiles="$backupfiles
+$backfiles"
+done
+backupfiles=`echo "$backupfiles" |sed '/^$/d'`
+if [ "$backupfiles" ];then
+xmessage -buttons "KEEP :140, REMOVE:141" "These backupfiles were made:
+$backupfiles"
+if [ "$?" = '141' ];then
+for file in $backupfiles;do
+rm -f $file
+done
+fi
+fi
+
 RESTARTMSG="Please wait, updating help page and menu..."
 [ "`pidof jwm`" != "" ] && RESTARTMSG="Please wait, updating help page and menu (the screen will flicker!)..." #w482
 [ "$INSTALLEDCAT" = "none" ] && RESTARTMSG="Please wait, updating help page..."

Code:
# diff -up /initrd/pup_ro2/usr/local/petget/installpkg.sh /usr/local/petget/installpkg.sh
--- /initrd/pup_ro2/usr/local/petget/installpkg.sh      2009-09-09 12:40:44.000000000 +0100
+++ /usr/local/petget/installpkg.sh     2012-02-07 20:53:36.260760778 +0100
@@ -45,8 +45,35 @@ if [ $PUPMODE -eq 3 -o $PUPMODE -eq 7 -o
  fi
 fi
 
-cd $DLPKG_PATH
+clobber_check(){
+   FILELIST="`cat /root/.packages/${DLPKG_NAME}.files`"
+   rm /tmp/petget-fileclobber
+   for FILE in $FILELIST ; do
+      FILE="/`echo $FILE|cut -d/ -f2-`"
+      [[ "$FILE" =~ "/root/.packages/.*" ]] && continue
+      [ -f "$FILE" ] && echo "$FILE" >> /tmp/petget-fileclobber
+   done
+   if [ -s /tmp/petget-fileclobber ] ; then
+      grep -E '/lib|^/bin|/sbin|/etc|/var' /tmp/petget-fileclobber
+      [ $? = 0 ] && WARN="This may cause system problems if this is not an intentional upgrade.\n\n"
+      #yad --title "Confirm File Clobber" --button=Proceed:0 --button=Cancel:1 --text "The following files will be overwritten by this package:\n\n<b>$(cat /tmp/petget-fileclobber |head -n 20) </b>\n\n<b><span foreground='red'>This package may already be installed.\nChoose Proceed only if this is an upgrade.\n\n${WARN}These files will be deleted if the package is uninstalled so if you proceed\nwith installation be aware that uninstallation of this package is not\nrecommended.</span></b>"
+      xmessage -buttons "Proceed:140,Cancel:141" "The following files will be overwritten by this package:
+`cat /tmp/petget-fileclobber`
+Note : The file list is in /tmp/petget-fileclobber .
+$IMSG
+$WARN"
+      [ $? = 140 ] && return 0
+        rm -f "$FILELIST"
+        #rm /tmp/petget-fileclobber
+          exit 151
+    fi
+    #rm /tmp/petget-fileclobber
+    return 0   
+}
 
+cd $DLPKG_PATH
+IMSG=''
+[ -s /root/.packages/${DLPKG_NAME}.files ] && IMSG='NOTE:This package may already be installed.'
 case $DLPKG_BASE in
  *.pet)
   DLPKG_MAIN="`basename $DLPKG_BASE .pet`"


Note > Real raw ware using xmessage .. would need to be translated to gtkdialog .

The remasterpup2 line is something like this :
Code:
mksquashfs / $WKGMNTPT/puppylivecdbuild/${DISTRO_FILE_PREFIX}-${DISTRO_VERSION}.sfs -e /etc /proc /initrd /var /tmp /archive /mnt /root /puppylivecdbuild $DIRHOME $DIRSYS $DIRLOST /${DISTRO_FILE_PREFIX}-${DISTRO_VERSION}.sfs ${INITRDMODS}

and accordingly to mksqashfs4 --help
-ef <exclude_file> list of exclude dirs/files. One per line
-wildcards Allow extended shell wildcards (globbing) to be used in exclude dirs/files
it could look like
Code:
mksquashfs / $WKGMNTPT/puppylivecdbuild/${DISTRO_FILE_PREFIX}-${DISTRO_VERSION}.sfs -wildcards -e "*.*~" "*.wh.*" -e /etc /proc /initrd /var /tmp /archive /mnt /root /puppylivecdbuild $DIRHOME $DIRSYS $DIRLOST

The remaster part i haven't tested yet , added exclution of aufs whiteout files if it hasn't already been done in newer remaster scripts . Racy uses unionfs but some derivates might still come with aufs .

The storage problem could be already be cared by the dialog to ask to keep or to remove in the above petget diff , but a backup layer /initrd/pup_back might be a good solution too with a second mounted save file underneath the /initrd/pup_ro1(pupmode13)||/initrd/pup_rw(pupmode12)
Back to top
View user's profile Send_private_message Visit_website 
pemasu


Joined: 08 Jul 2009
Posts: 5463
Location: Finland

PostPosted: Tue 07 Feb 2012, 19:18    Post_subject:  

Quote:
The remaster part i haven't tested yet , added exclution of aufs whiteout files if it hasn't already been done in newer remaster scripts . Racy uses unionfs but some derivates might still come with aufs .


I still use aufs: http://murga-linux.com/puppy/viewtopic.php?p=602813#602813
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 30 of 33 Posts_count   Goto page: Previous 1, 2, 3, ..., 28, 29, 30, 31, 32, 33 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2003s ][ Queries: 13 (0.0228s) ][ GZIP on ]