WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Error in sce-import  (Read 3639 times)

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
Error in sce-import
« on: February 17, 2016, 04:56:50 AM »
''sce-import name'' produces the following error with the latest release{,-candidate}.
Code: [Select]
/usr/bin/sce-import: line 483: syntax error near unexpected token `"-"'
/usr/bin/sce-import: line 483: ` { sudo grep -i "^Package: .*$TARGET" "$TCEDIR"/import/debinx/debinx*  | awk '{print $2}' ; sudo grep -i "^Package: .*$TARGET" "$DEBINX" | awk '{print $2}' ; sudo grep -i "$TARGET" "$DEBINXDIR"/PKGADDDEP | cut -f1 -d: | grep "$TARGET" ; sudo grep -i "$TARGET" "$DEBINXDIR"/PKGPREBUILTDEP | cut -f1 -d: | grep -i "$TARGET" ; } | sort | uniq | select "Select package for "$1"" "-"'
This does not happen with the release 20160116 or release-candidate 20160128 (if I got the version numbers correct!). Can anybody confirm?

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Error in sce-import
« Reply #1 on: February 17, 2016, 06:35:57 AM »
Hi
  • importing name tries to import namebench, why?
  • if there is an error like below on debinx updates sce-import continue
  • and also at the end an error


Code: [Select]
jls@box:~$ version -r
You are running dCore-trusty:2016.02.15.16.11, the latest release candidate.
jls@box:~$ sce-import name

Using the -u option.
Using the -n option.
Using the -r option.

Fetching updated DEBINX...

Distro: ubuntu

Syncing Debian Index: ubuntu_trusty_main_i386_Packages
#################### 100.0% 9.6 kBps DONE

verifying download...checksum matches OK
used 11880448 local, fetched 0

Syncing Debian Security Index: ubuntu_trusty_security_i386_Packages
#################### 100.0% 0.0 kBps DONE

#################### 100.0% 1.5 kBps DONE

verifying download...checksum matches OK
used 962560 local, fetched 26917

Using the repo http://ppa.launchpad.net/niko2040/e19/ubuntu trusty main
Using the repo http://ppa.launchpad.net/ferramroberto/lffl/ubuntu trusty main
Using the repo http://dl.google.com/linux/talkplugin/deb/ stable main
Using the repo http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main
Using the repo http://ppa.launchpad.net/pidgin-developers/ppa/ubuntu trusty main
Using the repo http://ftp5.gwdg.de/pub/opensuse/repositories/home:/jgeboski/xUbu
ntu_14.04 trusty ./
Using the repo http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt
all main

WARNING: Repo http://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt  all
  main is unavailable.
Error updating DEBINX files, exiting..

Importing namebench.

Using Package Index:
/etc/sysconfig/tcedir/import/debinx/ubuntu_trusty_main_i386_Packages

Using Security Index:
/etc/sysconfig/tcedir/import/debinx/ubuntu_trusty_security_i386_Packages

Using ubuntu Mirror: http://ubuntu.mirror.garr.it/mirrors/ubuntu-archive/

Using ubuntu Security Mirror: http://ubuntu.mirror.garr.it/mirrors/ubuntu-archiv
e/

namebench is a ubuntu trusty main package from http://ppa.launchpad.net/ferramro
berto/lffl/ubuntu.

Gathering dependency info...

Merging lsb-base
Merging x11-common
Merging libxext6
Merging libxss1
Merging libxrender1
Merging libxft2
Merging libx11-data
Merging libxdmcp6
Merging libxau6
Merging libxcb1
Merging libx11-6
Merging libpng12-0
Merging libfreetype6
Merging libpcre3
Merging libselinux1
Merging libattr1
Merging libacl1
Merging coreutils.deb2sce: dCore custom coreutils start script.
Merging coreutils
Merging ucf
Merging fonts-dejavu-core
Merging fontconfig-config
Merging libfontconfig1
Connecting to ubuntu.mirror.garr.it (90.147.160.69:80)
libtk8.6_8.6.1-3ubun 100% |*******************************|   654k  0:00:00 ETA
^[[20~Merging libtk8.6
Merging tzdata
Connecting to ubuntu.mirror.garr.it (90.147.160.69:80)
libtcl8.6_8.6.1-4ubu 100% |*******************************|   807k  0:00:00 ETA
Merging libtcl8.6
Connecting to ubuntu.mirror.garr.it (90.147.160.69:80)
python-tk_2.7.5-1ubu 100% |*******************************| 22902   0:00:00 ETA
Merging python-tk
Connecting to ubuntu.mirror.garr.it (90.147.160.69:80)
python-support_1.0.1 100% |*******************************| 26672   0:00:00 ETA
Merging python-support.deb2sce: dCore custom python-support start script.
Merging python-support
Merging libpython-stdlib
Merging python-minimal.deb2sce: dCore custom python-minimal start script.
Merging python-minimal-data.tar.gz: extra files for python-minimal.
Merging python-minimal
Merging debconf
Merging libssl1.0.0
Merging libsqlite3-0
Merging dpkg.deb2sce: dCore custom dpkg start script.
Merging dpkg
Merging readline-common
Merging libreadline6
Merging libtinfo5
Merging libncursesw5
Merging libffi6
Merging libexpat1
Merging libdb5.3
Merging libbz2-1.0
Merging mime-support
Merging libpython2.7-stdlib
Merging gcc-4.9-base
Merging libgcc1
Connecting to ubuntu.mirror.garr.it (90.147.160.69:80)
libc6_2.19-0ubuntu6. 100% |*******************************|  3918k  0:00:00 ETA
Merging libc6
Merging zlib1g
Merging libpython2.7-minimal
Merging python2.7-minimal.deb2sce: dCore custom python2.7-minimal start script.
Merging python2.7-minimal
Merging python2.7.deb2sce: dCore custom python2.7 start script.
Merging python2.7
Merging python.deb2sce: dCore custom python start script.
Merging python
wget: not an http or ftp url: /pool/main/n/namebench/namebench_1.3.1~lffl~trusty_all.deb
Failed on download of pool/main/n/namebench/namebench_1.3.1~lffl~trusty_all.deb.
wget: not an http or ftp url: /pool/main/n/namebench
ar: can't open '/etc/sysconfig/tcedir/import/debs/namebench_1.3.1~lffl~trusty_all.deb': File o directory non esistente
ar: can't open '/etc/sysconfig/tcedir/import/debs/namebench_1.3.1~lffl~trusty_all.deb': File o directory non esistente
/usr/bin/debExtract: line 43: can't create /tmp/: È una directory

Failure to extract namebench_1.3.1~lffl~trusty_all.deb, exiting..
jls@box:~$


thanks
dCore user

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Error in sce-import
« Reply #2 on: February 17, 2016, 09:41:40 AM »
I see importing name results in an import of namebench, it is surely due to the same thing here, which I will fix today:

http://forum.tinycorelinux.net/index.php/topic,19618.0.html

I can import namebench without errors on dCore-wily, I will try later on dCore-trusty but I don't have the same /opt/debextra entries so it is not really reproducing it, but will tell if an import on a stock system will work.

The error at the end is normal behavior, that is exit when error in extracting a .deb.  I will work on making fetching debinx exit on error.  Not fetching the debinx is likely the cause of the missing .deb that caused the later error.

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
Re: Error in sce-import
« Reply #3 on: February 17, 2016, 10:27:06 AM »
I forgot to mention that this is on dCore-trusty, indeed. And of course, name can be just anything really. Strange though that jls does not see this happening.
To be clear, the error does not show on dCore-trusty:2016.01.27.21.32 but on the latest release or release-candidate.
« Last Edit: February 17, 2016, 10:35:36 AM by sm8ps »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Error in sce-import
« Reply #4 on: February 17, 2016, 11:15:12 AM »
sm8ps - I don't see that error, but I will test for myself.

This was a case where the select utility autoselects if there is only one item to choose from.  Has been this way from the beginning, only a few packages will have only one match when that match is not the same as the desired package.  I have fixed this with a yes/no choice when "sce-import name" autoselects namebench.  I have fixed the lack of exit on fetching DEBINX error also.

Will be in the next RC.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: Error in sce-import
« Reply #5 on: February 17, 2016, 01:02:52 PM »
Just some testing feedback. On latest RC, dCore-jessie:2016.02.15.16.10. Just ran  sce-import nano-tiny  (Debian repo) and  sce-import gtkfind  (dCore). Both installed, load and run without issue.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Error in sce-import
« Reply #6 on: February 17, 2016, 01:26:50 PM »
Hi
don't need namebench I don't even know what it is, just wanted to test the "name" import, I undestood it could be anything but anyway
dCore user

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
Re: Error in sce-import
« Reply #7 on: February 18, 2016, 06:03:18 AM »
Progress made -- unfortunately also in the realm of confusion! :)
I upgraded to the latest release candidate (dCore-trusty:2016.02.17.17.16).
  • At first try, I encountered the very same error as initially stated.
  • I re-booted with "base norestore" which evidently did not allow me to load anything because the wireless extension was not available.
  • Re-booted again, and this time tried ''sce-import name'' while deliberately being off-line. Low and behold, the error did not show. The import did obviously not succeed, but it worked in principle.
  • After setting up a network connection, ''sce-import name'' succeeded as expected.
So problem solved. It remains mysterious however, why it had failed at all. The installation had been working before the upgrade without any issues and I recall importing packages. Anyways, I leave this post for further reference, hoping the issue is an isolated one. Thanks for everybody's support!

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
Re: Error in sce-import
« Reply #8 on: February 18, 2016, 07:44:48 AM »
Spoke too soon! Here it is again with any package name. How to trouble-shoot?
I moved /opt/debextra out of the way: no effect.
I moved tce/import/debinx out of the way: no effect.
Where else could I go looking for causes?

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
Re: Error in sce-import
« Reply #9 on: February 18, 2016, 07:54:54 AM »
Got it figured out -- sort of by coincidence. The error occurs when launching sce-import from Bash rather than standard Ash.
There must be something probably quite minor that has changed in the script recently (cf. first post) that makes it depend on the shell. I can live with using Ash for launching sce-import, however it would be great if it worked out of Bash as well.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Error in sce-import
« Reply #10 on: February 18, 2016, 09:27:22 AM »
Ok, I will look into it and hopefully we can make it bash compatible.  It seems to be syntax error according to bash in the select menu line.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: Error in sce-import
« Reply #11 on: February 18, 2016, 06:44:09 PM »
This was a case where the select utility autoselects if there is only one item to choose from.  Has been this way from the beginning, only a few packages will have only one match when that match is not the same as the desired package.  I have fixed this with a yes/no choice when "sce-import name" autoselects namebench.

This has also happened to me before, can't remember the package name, where a partial name import search goes ahead and installs the only matching package without pause. This appears fixed and i think is better behaviour, despite the extra (y)es:

Code: [Select]
tc@box:~$ sce-import name
.
.
Do you want to import namebench?:

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: Error in sce-import
« Reply #12 on: February 18, 2016, 06:47:40 PM »
Ok, I will look into it and hopefully we can make it bash compatible.  It seems to be syntax error according to bash in the select menu line.

Some single quotes were recently added to sce-import to highlight the search letters, example below 'nan'.

It does not seem be an issue with Ash, maybe Bash requires an escape?
Code: [Select]
tc@box:~$ sce-import nan
.
.
Select package for 'nan'.

         1. nano
         2. nano-tiny
         3. nanoblogger

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Error in sce-import
« Reply #13 on: February 18, 2016, 08:14:39 PM »
I think I found the solution.  Will be in next RC.