handling lists in perl

2018-12-18 Thread mick crane

not really on the topic but...
I'm not very good at perl (or anything else ) and could maybe sort it 
but perhaps there is an extension that does it.

I have an list of pairs
(1=>8,2=>20,6=>100,15=>100)
and an array of unique numbers
(1 21 100 8 15 22 6 12 15 )
I want to see what pairs can be satisfied from the array of numbers, 
send that list to a file and also to another file the left over numbers.


mick



--
Key ID4BFEBB31



Re: handling lists in perl

2018-12-18 Thread mick crane

On 2018-12-18 13:34, mick crane wrote:
sorry I put 15 twice there just to confuse the issue
should be


not really on the topic but...
I'm not very good at perl (or anything else ) and could maybe sort it 
but perhaps there is an extension that does it.

I have an list of pairs
(1=>8,2=>20,6=>100,15=>100)
and an array of unique numbers
(1 21 100 8 15 22 6 12 56 )
I want to see what pairs can be satisfied from the array of numbers, 
send that list to a file and also to another file the left over numbers.

--
Key ID4BFEBB31



Re: handling lists in perl

2018-12-18 Thread Greg Wooledge
On Tue, Dec 18, 2018 at 01:34:53PM +, mick crane wrote:
> I'm not very good at perl (or anything else ) and could maybe sort it but
> perhaps there is an extension that does it.
> I have an list of pairs
> (1=>8,2=>20,6=>100,15=>100)
> and an array of unique numbers
> (1 21 100 8 15 22 6 12 15 )
> I want to see what pairs can be satisfied from the array of numbers, send
> that list to a file and also to another file the left over numbers.

Start by converting the "array of unique numbers" to a hash (associative
array, dictionary).  That way, you can quickly look up which numbers are
in, or not in, the data set.

Next, set up a second hash to record which numbers have been matched (vs.
which have not) in the following step.  It starts out empty.

Now, iterate over your "pairs".  If both members of the "pair" are
in the first hash, then write the pair to the appropriate output bin,
and add both numbers to the second hash.

When that's finished, you want to find out which numbers from the first
hash are not present in the second hash.  So, iterate over the keys of
the first hash, and any key that is not also in the second hash, write
to the appropriate output bin.

This can be done in any language that has hashes (associative arrays,
dictionaries) and the ability to iterate over a list.  Perl certainly
qualifies, if that's your language of choice.  Python and Tcl can also
do it quite easily.  Even bash could do this, although it would be slow,
and would not be my first pick.

If you need help actually *writing* it in Perl (or whatever language),
you should ask for help in a language-specific mailing list.



Resolution -- Re: Asserting local repository is trusted (man page problem?)

2018-12-18 Thread Richard Owlett

On 12/16/2018 01:03 PM, Richard Owlett wrote:

My sources.list has lines of the form
deb trusted=yes file:/media/richard/debian9/dvd1 stable main contrib

When using Synaptic's "Edit->Reload Package Information" the error 
message is:

E: Malformed entry 3 in list file /etc/apt/sources.list (URI parse)
E: The list of sources could not be read.
Go to the repository dialog to correct the problem.
E: _cache->open() failed, please report.




There were three problems -- one mine, two Synaptic's.

Mine was the content of sources.list .
As was pointed out
deb trusted=yes file:/media/richard/debian9/dvd1 stable main contrib
should have been
deb [ trusted=yes ] file:/media/richard/debian9/dvd1 stable main contrib

The Synaptic problems were:
1. There's a side effect of originally installing system from DVD(s).
   Synaptic when doing "Edit->Reload Package Information" will not
   accept there being any existing reference to DVD(s) in sources.list.
2. Although Synaptic has no problems with processing Packages.gz from
   a DVD it requires it to have been unzipped when reading from a disk.









Re: Resolution -- Re: Asserting local repository is trusted (man page problem?)

2018-12-18 Thread mick crane

On 2018-12-18 15:07, Richard Owlett wrote:

On 12/16/2018 01:03 PM, Richard Owlett wrote:

My sources.list has lines of the form
deb trusted=yes file:/media/richard/debian9/dvd1 stable main contrib

When using Synaptic's "Edit->Reload Package Information" the error 
message is:

E: Malformed entry 3 in list file /etc/apt/sources.list (URI parse)
E: The list of sources could not be read.
Go to the repository dialog to correct the problem.
E: _cache->open() failed, please report.




There were three problems -- one mine, two Synaptic's.

Mine was the content of sources.list .
As was pointed out
deb trusted=yes file:/media/richard/debian9/dvd1 stable main contrib
should have been
deb [ trusted=yes ] file:/media/richard/debian9/dvd1 stable main 
contrib


The Synaptic problems were:
1. There's a side effect of originally installing system from DVD(s).
   Synaptic when doing "Edit->Reload Package Information" will not
   accept there being any existing reference to DVD(s) in sources.list.
2. Although Synaptic has no problems with processing Packages.gz from
   a DVD it requires it to have been unzipped when reading from a disk.


I've got into trouble for replying to list emails in the past but I 
would advise rather than worrying about understanding everything that 
comes along get something you want the computer to do and worry about 
those bits.


mick
--
Key ID4BFEBB31



Re: Most reliable dual band driver/chipset

2018-12-18 Thread tony mollica

  
  
In regard to my issue below:
  
  Trying to find an internal Intel based card with remote antenna.
  
  I have Linksys USB wifi adapters and they work, but not dual
  band.  Not really 
  necessary, but why not use everything available.
  
  Not a laptop and not a heat issue.  Something in the hardware or
  driver seems
  to leave this adapter in some unstable state that requires a cold
  start, 
  either disconnecting the adapter from USB, rebooting the computer
  and sometimes
  just unloading and reloading the driver.  Very irritating since it
  works very well when
  connected, just unreliable.  Sometimes it'll stay connected for
  days, sometimes just
  for a few minutes.
  
  Tony

On 12/15/18 5:12 PM, Tjm wrote:


  
  I've been using an Alfa dual band USB3 wifi adapter and while it
  works and when it happens to stay connected it's fast and fine.
  But it disconnects often for no apparent reason and won't
  reconnect by itself without removing and then reloading the
  module. Built and tried several versions of the rtl8812au and
  found one branch that I've been using, v5.9.xxx versions work but
  with the connection reliability issue.
  
  Looking for a recommendation for an adapter and/or chip.
  
  Thanks, 
  Tony
  -- 
  Sent from my Android device with K-9 Mail. Please excuse my
  brevity.


  




Re: Resolution -- Re: Asserting local repository is trusted (man page problem?)

2018-12-18 Thread Richard Owlett

On 12/18/2018 09:25 AM, mick crane wrote:

On 2018-12-18 15:07, Richard Owlett wrote:

On 12/16/2018 01:03 PM, Richard Owlett wrote:

My sources.list has lines of the form
deb trusted=yes file:/media/richard/debian9/dvd1 stable main contrib

When using Synaptic's "Edit->Reload Package Information" the error 
message is:

E: Malformed entry 3 in list file /etc/apt/sources.list (URI parse)
E: The list of sources could not be read.
Go to the repository dialog to correct the problem.
E: _cache->open() failed, please report.




There were three problems -- one mine, two Synaptic's.

Mine was the content of sources.list .
As was pointed out
deb trusted=yes file:/media/richard/debian9/dvd1 stable main contrib
should have been
deb [ trusted=yes ] file:/media/richard/debian9/dvd1 stable main contrib

The Synaptic problems were:
1. There's a side effect of originally installing system from DVD(s).
   Synaptic when doing "Edit->Reload Package Information" will not
   accept there being any existing reference to DVD(s) in sources.list.
2. Although Synaptic has no problems with processing Packages.gz from
   a DVD it requires it to have been unzipped when reading from a disk.


I've got into trouble for replying to list emails in the past but I 
would advise rather than worrying about understanding everything that 
comes along get something you want the computer to do and worry about 
those bits.




 Actually I suspect I conform to your suggestion. It is just 
that I have an atypical permutation of background, motivations, and goals.


I'm retired, have an engineering (NOT Comp Sci) background, spent 
decades in [engineering support, QA, QC, customer service], and a need 
to understand some of low level details of Debian. My long term goal is 
a minimalist system with a low internet data cap for retrieving 
packages. To that end I've occasionally done a half dozen full installs 
in a day.


Thank you.







Re: Resolution -- Re: Asserting local repository is trusted (man page problem?)

2018-12-18 Thread Brian
On Tue 18 Dec 2018 at 10:10:21 -0600, Richard Owlett wrote:

> On 12/18/2018 09:25 AM, mick crane wrote:
> > I've got into trouble for replying to list emails in the past but I
> > would advise rather than worrying about understanding everything that
> > comes along get something you want the computer to do and worry about
> > those bits.
> > 
> 
>  Actually I suspect I conform to your suggestion. It is just that I
> have an atypical permutation of background, motivations, and goals.

You have no more atypical desires and are no more special than many
other Debian users.
 
> I'm retired, have an engineering (NOT Comp Sci) background, spent decades in
> [engineering support, QA, QC, customer service], and a need to understand
> some of low level details of Debian. My long term goal is a minimalist
> system with a low internet data cap for retrieving packages. To that end
> I've occasionally done a half dozen full installs in a day.

Getting a minimal system is easy. You are aware of two accounts on
the wiki which you have never criticised. Whether you have ever tried
them is a different matter.

-- 
Brian.



Installing Java 8 on a Google Compute Debian (Jessie) instance

2018-12-18 Thread James H. H. Lampert
I'm endeavoring to get Java 8 onto our development instance, so that the 
Tomcat environment there matches that of our cluster nodes, and apg-get 
is not cooperating.


This particular instance is a Bitnami SVN/Trac server, with Tomcat 8 
added to it, and running independently of the Apache server that came 
with SVN and Trac.


I tried what was given at
https://stackoverflow.com/q/50919305/3654526
and it didn't work. Even after doing the recommended

sudo apt-get install dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
sudo apt-get update
sudo apt-get install openjdk-8-jdk -y --allow-unauthenticated


I still get

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openjdk-8-jdk : Depends: openjdk-8-jre (= 8u171-b11-1~bpo8+1) but it is not 
going to be installed
 Depends: openjdk-8-jdk-headless (= 8u171-b11-1~bpo8+1) but it 
is not going to be installed
E: Unable to correct problems, you have held broken packages.


which is what I was getting before.

--
James H. H. Lampert



Hardware detection issue with debian

2018-12-18 Thread Mo Some One
I can not do this via bur report because I could not select a valid
package. I have researched this and was unable to find a solved case under
exact condition. The issue was mostly discussed as an mtp or mounting
problem, but I dug a bit farther into the problem. When it comes to a
certain model, hardware is not even detected.

Thank you for all your dedicated work,
Mo




Following is the issue

When connecting a "Galaxy S3 mini"  via usb, it is not detected at all;
however if connected during installation, it is temporarily detected as a
"usb mass storage device" before CDrom is detected.


Here are some general information about the system:

# cat /etc/debian_version
9.6
# gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
# uname -a
Linux dreams 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64
GNU/Linux




When Galaxy S3 mini is connected via usb:

$ ls -l /dev /dev/mapper | grep
brw-rw 1 root disk 254, 0 Dec 15 10:53 dm-0
brw-rw 1 root disk 254, 1 Dec 15 10:53 dm-1

brw-rw  1 root disk254,   2 Dec 15 10:53 dm-2
brw-rw  1 root disk254,   3 Dec 15 10:53 dm-3
brw-rw  1 root disk254,   4 Dec 15 10:53 dm-4
brw-rw  1 root disk254,   5 Dec 15 10:53 dm-5
brw-rw  1 root disk  8,   0 Dec 15 10:53 sda
brw-rw  1 root disk  8,   1 Dec 15 10:53 sda1
brw-rw  1 root disk  8,   2 Dec 15 10:53 sda2
brw-rw  1 root disk  8,   5 Dec 15 10:53 sda5
brw-rw+ 1 root cdrom11,   0 Dec 15 12:39 sr0 l

$ lsblk -o KNAME,TYPE,SIZE,MODEL gives
KNAME TYPESIZE MODEL
sda   disk  223.6G CT240BX200SSD1
sda1  part243M
sda2  part  1K
sda5  part  223.3G
sr0   rom 4.4G DVD+-RW UJ8A2
dm-0  crypt 223.3G
dm-1  lvm23.3G
dm-2  lvm 9.3G
dm-3  lvm15.9G
dm-4  lvm 1.9G
dm-5  lvm 173G

# mtp-detect
libmtp version: 1.1.13

Listing raw device(s)
   No raw devices found.

# ls -l /sys/bus/usb/devices/
total 0
lrwxrwxrwx 1 root root 0 Dec 18 11:24 1-0:1.0 ->
../../../devices/pci:00/:00:1a.0/usb1/1-0:1.0
lrwxrwxrwx 1 root root 0 Dec 18 11:24 1-1 ->
../../../devices/pci:00/:00:1a.0/usb1/1-1
lrwxrwxrwx 1 root root 0 Dec 18 11:24 1-1:1.0 ->
../../../devices/pci:00/:00:1a.0/usb1/1-1/1-1:1.0
lrwxrwxrwx 1 root root 0 Dec 18 11:24 1-1.5 ->
../../../devices/pci:00/:00:1a.0/usb1/1-1/1-1.5
lrwxrwxrwx 1 root root 0 Dec 18 11:24 1-1.5:1.0 ->
../../../devices/pci:00/:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.0
lrwxrwxrwx 1 root root 0 Dec 18 11:24 1-1.5:1.1 ->
../../../devices/pci:00/:00:1a.0/usb1/1-1/1-1.5/1-1.5:1.1
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-0:1.0 ->
../../../devices/pci:00/:00:1d.0/usb2/2-0:1.0
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-1 ->
../../../devices/pci:00/:00:1d.0/usb2/2-1
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-1:1.0 ->
../../../devices/pci:00/:00:1d.0/usb2/2-1/2-1:1.0
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-1.2 ->
../../../devices/pci:00/:00:1d.0/usb2/2-1/2-1.2
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-1.2:1.0 ->
../../../devices/pci:00/:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-1.5 ->
../../../devices/pci:00/:00:1d.0/usb2/2-1/2-1.5
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-1.5:1.0 ->
../../../devices/pci:00/:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-1.5:1.1 ->
../../../devices/pci:00/:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.1
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-1.8 ->
../../../devices/pci:00/:00:1d.0/usb2/2-1/2-1.8
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-1.8:0.0 ->
../../../devices/pci:00/:00:1d.0/usb2/2-1/2-1.8/2-1.8:0.0
lrwxrwxrwx 1 root root 0 Dec 18 11:24 2-1.8:0.1 ->
../../../devices/pci:00/:00:1d.0/usb2/2-1/2-1.8/2-1.8:0.1
lrwxrwxrwx 1 root root 0 Dec 18 11:24 usb1 ->
../../../devices/pci:00/:00:1a.0/usb1
lrwxrwxrwx 1 root root 0 Dec 18 11:24 usb2 ->
../../../devices/pci:00/:00:1d.0/usb2

#lsusb | sort
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 1bcf:2b83 Sunplus Innovation Technology Inc.
Laptop Integrated Webcam FHD
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 003: ID 04f2:0939 Chicony Electronics Co., Ltd
Bus 002 Device 004: ID 8087:07dc Intel Corp.
Bus 002 Device 005: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure
Applications Processor


But when an LG is connected:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 1bcf:2b83 Sunplus Innovation Technology Inc.
Laptop Integrated Webcam FHD
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 003: ID 04f2:0939 Chicony Electronics Co., Ltd
Bus 00

ssh trouble

2018-12-18 Thread Glenn English
4 boxes on the same network; an RPi3 running Raspian Stretch, a laptop
and a desktop running Buster, and a Cisco router running IOS 12.4
(note upper case 'I' :-).

I have an expect script to get into the router. It's the same on all the hosts.

The problem is that the RPi and the desktop get

"Unable to negotiate with 216.17.134.201 port 22: no matching key
exchange method found. Their offer: diffie-hellman-group1-sha1"

from the router -- diffie-hellman-group1-sha1 is listed as one of the
encryption types available from my SSH programs.

And from expect:

send: spawn id exp4 not open
while executing
"send "\r""
(file "./lir.sh" line 14)

On the laptop it works fine -- that says to me that there's nothing
wrong with the router. It worked on the others a couple days ago.

I've tried to get into the router by entering commands by hand, and I
get the same response.

I purged everything that looked like it had anything to do with ssh
(except some that were major dependencies for other things) from the
desktop and reinstalled and configured the packages. Also removed the
.debs from apt/archives. Exactly the same response.

And I SSH around between the hosts with no trouble. That says there's
nothing wrong with SSH. But something is, somewhere.

Anybody run into anything like this before?

-- 
Glenn English



Re: handling lists in perl

2018-12-18 Thread deloptes
Hi,

it is not exactly clear if you want to test the key or the value of the
pairs, but I assume you are after the values.

mick crane wrote:

> I have an list of pairs
> (1=>8,2=>20,6=>100,15=>100)

this would be a hash array (means key/value pairs)

> and an array of unique numbers
> (1 21 100 8 15 22 6 12 56 )

This is a standard/classic array

> I want to see what pairs can be satisfied from the array of numbers,
> send that list to a file and also to another file the left over numbers.

so iterate over the hash and check for matches in the array

my %hash = ( 1=>8,2=>20,6=>100,15=>100 );
my @array = [1, 21, 100, 8, 15, 22, 6, 12, 56];

foreach my $key (keys %hash) {
if ( @array =~ /$hash[$key]/) {
print "key $key with value " . $hash{$key} .
" is in the array of values\n";
}
}

result
key 6 with value 100 is in the array of values
key 2 with value 20 is in the array of values
key 15 with value 100 is in the array of values
key 1 with value 8 is in the array of values

regards



Re: Installing Java 8 on a Google Compute Debian (Jessie) instance

2018-12-18 Thread Roberto C . Sánchez
On Tue, Dec 18, 2018 at 10:16:25AM -0800, James H. H. Lampert wrote:
> I'm endeavoring to get Java 8 onto our development instance, so that the
> Tomcat environment there matches that of our cluster nodes, and apg-get is
> not cooperating.
> 
> This particular instance is a Bitnami SVN/Trac server, with Tomcat 8 added
> to it, and running independently of the Apache server that came with SVN and
> Trac.
> 
> I tried what was given at
> https://stackoverflow.com/q/50919305/3654526
> and it didn't work. Even after doing the recommended
> > sudo apt-get install dirmngr
> > sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 
> > EEA14886

I don't understand why this is necessary.

> > sudo apt-get update
> > sudo apt-get install openjdk-8-jdk -y --allow-unauthenticated
> 

Based on the rest of your output (which I did not repeat here), it looks
like what you need to do is this:

apt-get install -t jessie-backports openjdk-8-jdk

The --allow-unauthenticated option is dangerous.  You do not need it
here and in general you should not use it.

Regards,

-Roberto

-- 
Roberto C. Sánchez



Re: ssh trouble

2018-12-18 Thread Marc Auslander

Glenn English wrote:

4 boxes on the same network; an RPi3 running Raspian Stretch, a laptop
and a desktop running Buster, and a Cisco router running IOS 12.4
(note upper case 'I' :-).

I have an expect script to get into the router. It's the same on all the hosts.

The problem is that the RPi and the desktop get

"Unable to negotiate with 216.17.134.201 port 22: no matching key
exchange method found. Their offer: diffie-hellman-group1-sha1"

from the router -- diffie-hellman-group1-sha1 is listed as one of the
encryption types available from my SSH programs.

And from expect:

send: spawn id exp4 not open
 while executing
"send "\r""
 (file "./lir.sh" line 14)

On the laptop it works fine -- that says to me that there's nothing
wrong with the router. It worked on the others a couple days ago.

I've tried to get into the router by entering commands by hand, and I
get the same response.

I purged everything that looked like it had anything to do with ssh
(except some that were major dependencies for other things) from the
desktop and reinstalled and configured the packages. Also removed the
.debs from apt/archives. Exactly the same response.

And I SSH around between the hosts with no trouble. That says there's
nothing wrong with SSH. But something is, somewhere.

Anybody run into anything like this before?
 

Newer versions of ssh deprecate diffie-hellman-group1-sha1
Putting KexAlgorithms +diffie-hellman-group1-sha1 in config for the host 
works for me.  There is also a way to do it on the ssh command line.




Re: ssh trouble

2018-12-18 Thread Glenn English
On Tue, Dec 18, 2018 at 9:18 PM Marc Auslander  wrote:

> Newer versions of ssh deprecate diffie-hellman-group1-sha1
> Putting KexAlgorithms +diffie-hellman-group1-sha1 in config for the host
> works for me.  There is also a way to do it on the ssh command line.

I'll look into this, but one Buster install works, and another and a
Stretch don't.

Hmmm. When I search the web to find out what KexAlgorithms means, I
find I've been there before (the 76 year old memory is less than
optimal). Looking more promising. Thanks, Marc.

-- 
Glenn English



Re: ssh trouble

2018-12-18 Thread Greg Wooledge
On Tue, Dec 18, 2018 at 10:00:12PM +, Glenn English wrote:
> Hmmm. When I search the web to find out what KexAlgorithms means, I
> find I've been there before (the 76 year old memory is less than
> optimal). Looking more promising. Thanks, Marc.

Key Exchange Algorithms.  Should be documented in ssh_config(5) and
sshd_config(5).

The important point is that the client will have a list of these things,
and the server will have a list of these things, and there must be at
least *one* in common between the two lists, or else communication will
not occur.



Re: Hardware detection issue with debian

2018-12-18 Thread deloptes
Mo Some One wrote:

> When connecting a "Galaxy S3 mini"  via usb, it is not detected at all;
> however if connected during installation, it is temporarily detected as a
> "usb mass storage device" before CDrom is detected.

Did you try some program that could mount MTP device?

For example I find:

gmtp - simple file transfer program for MTP based devices
go-mtpfs - Mount MTP devices over FUSE
libmtp-common - Media Transfer Protocol (MTP) common files
libmtp-dbg - Media Transfer Protocol (MTP) debugging symbols
libmtp-dev - Media Transfer Protocol (MTP) development files
libmtp-doc - Media Transfer Protocol (MTP) library documentation
libmtp-runtime - Media Transfer Protocol (MTP) runtime tools
libmtp9 - Media Transfer Protocol (MTP) library
mtp-tools - Media Transfer Protocol (MTP) library tools

I use go-mtpfs.

regards





Re: Installing Java 8 on a Google Compute Debian (Jessie) instance

2018-12-18 Thread deloptes
James H. H. Lampert wrote:

>> The following packages have unmet dependencies:
>> openjdk-8-jdk : Depends: openjdk-8-jre (= 8u171-b11-1~bpo8+1) but it is
>> not going to be installed Depends: openjdk-8-jdk-headless (=
>> 8u171-b11-1~bpo8+1) but it is not going to be installed E: Unable to
>> correct problems, you have held broken packages.
> 
> which is what I was getting before.

from my experience you need then to do apt-get install  openjdk-8-jre
openjdk-8-jdk-headless and they will for sure pull in some dependencies,
which is why  openjdk-8-jdk does not install automatically.

just my 5cent



Debian 8.10 PowerPC issues with eMac G4 retail model

2018-12-18 Thread Alex McKeever
I remember having no luck with getting a display on Debian 8.10 on my eMac 
G4... had to go back to 7.11 to get a working system if I remember right. 
Anyhow I am wondering why 8.10 doesn’t work like it should? It’s technically 
the last official PowerPC 32 release...


Sent from Yahoo Mail for iPhone


Re: Installing Java 8 on a Google Compute Debian (Jessie) instance

2018-12-18 Thread Roberto C . Sánchez
On Tue, Dec 18, 2018 at 11:12:00PM +0100, deloptes wrote:
> James H. H. Lampert wrote:
> 
> >> The following packages have unmet dependencies:
> >> openjdk-8-jdk : Depends: openjdk-8-jre (= 8u171-b11-1~bpo8+1) but it is
> >> not going to be installed Depends: openjdk-8-jdk-headless (=
> >> 8u171-b11-1~bpo8+1) but it is not going to be installed E: Unable to
> >> correct problems, you have held broken packages.
> > 
> > which is what I was getting before.
> 
> from my experience you need then to do apt-get install  openjdk-8-jre
> openjdk-8-jdk-headless and they will for sure pull in some dependencies,
> which is why  openjdk-8-jdk does not install automatically.
> 
That will not work either.  The reason the '-t jessie-backports' option
is the right solution is that openjdk-8 requires a newer
ca-certificates-java than what is in jessie.  In a default backports
configuration, packages from the backports repository are ranked lower
than from the stable repository.  Another option would be specify the
precise version of the ca-certificates-java package like this:

apt-get install openjdk-8-jdk ca-certificates-java=

It is also possible to do this:

apt-get install openjdk-8-jdk ca-certificates-java/jessie-backports

But those are less robust than '-t jessie-backports'.  Of course, there
is a possibility that other dependencies get pulled in from
jessie-backports to accomplish the operation, so that must be weighed as
well.

Regards,

-Roberto

-- 
Roberto C. Sánchez



Re: handling lists in perl

2018-12-18 Thread deloptes
deloptes wrote:

> if ( @array =~ /$hash[$key]/) {
> print "key $key with value " . $hash{$key} .
> " is in the array of values\n";
> }

I checked and it seems the right answer is

my %hash = ( 1=>8,2=>20,6=>100,15=>100 );
my @array = (1, 21, 100, 8, 15, 22, 6, 12, 56);

foreach my $key (keys %hash) {
for (  @array ) {
if ($_ eq $hash{$key} ) {
print "key $key with value " . $hash{$key} .
" is in the array of values\n";
}
}
}





Re: handling lists in perl

2018-12-18 Thread David Christensen

On 12/18/18 5:43 AM, mick crane wrote:

On 2018-12-18 13:34, mick crane wrote:
sorry I put 15 twice there just to confuse the issue
should be


not really on the topic but...
I'm not very good at perl (or anything else ) and could maybe sort it 
but perhaps there is an extension that does it.

I have an list of pairs
(1=>8,2=>20,6=>100,15=>100)
and an array of unique numbers
(1 21 100 8 15 22 6 12 56 )
I want to see what pairs can be satisfied from the array of numbers, 
send that list to a file and also to another file the left over numbers.



The three canonical Perl (version 5) books are:

1.  Learning Perl -- gets you up the initial learning curve:

http://shop.oreilly.com/product/0636920049517.do

2.  Perl Cookbook -- "real world" code examples with explanations:

http://shop.oreilly.com/product/9780596003135.do

3.  Programming Perl -- the language reference:

http://shop.oreilly.com/product/9780596004927.do


I learned Perl via the first two.  I didn't get into the third until I 
was well on my way.



If you just want to "get it done", here is a starter script:

2018-12-18 18:26:48 dpchrist@tinkywinky ~/sandbox/perl/debian-users
$ cat 20181218-1334-mick-crane.pl
#!/usr/bin/env perl
use strict;
use warnings;
my %pairs  = (1 => 8, 2 => 20, 6 => 100, 15 => 100);
my @unique = (1, 21, 100, 8, 15, 22, 6, 12, 56);
open (my $fh_satisfies, ">satisfies.txt") or die $!;
open (my $fh_leftovers, ">leftovers.txt") or die $!;
for my $k (@unique) {
my $fh = exists $pairs{$k} ? $fh_satisfies : $fh_leftovers;
$fh->print($k, "\n");
}

2018-12-18 18:28:09 dpchrist@tinkywinky ~/sandbox/perl/debian-users
$ perl 20181218-1334-mick-crane.pl

2018-12-18 18:28:22 dpchrist@tinkywinky ~/sandbox/perl/debian-users
$ cat satisfies.txt
1
15
6

2018-12-18 18:28:26 dpchrist@tinkywinky ~/sandbox/perl/debian-users
$ cat leftovers.txt
21
100
8
22
12
56


David



Re: Hardware detection issue with debian

2018-12-18 Thread Cindy-Sue Causey
On 12/18/18, deloptes  wrote:
> Mo Some One wrote:
>
>> When connecting a "Galaxy S3 mini"  via usb, it is not detected at all;
>> however if connected during installation, it is temporarily detected as a
>> "usb mass storage device" before CDrom is detected.
>
> Did you try some program that could mount MTP device?
>
> For example I find:
>
> gmtp - simple file transfer program for MTP based devices
> go-mtpfs - Mount MTP devices over FUSE
> libmtp-common - Media Transfer Protocol (MTP) common files
> libmtp-dbg - Media Transfer Protocol (MTP) debugging symbols
> libmtp-dev - Media Transfer Protocol (MTP) development files
> libmtp-doc - Media Transfer Protocol (MTP) library documentation
> libmtp-runtime - Media Transfer Protocol (MTP) runtime tools
> libmtp9 - Media Transfer Protocol (MTP) library
> mtp-tools - Media Transfer Protocol (MTP) library tools
>
> I use go-mtpfs.


I had luck with jmtpfs when nothing else worked a while back. Things
didn't work instantly out of the box, but I've forgotten what I had to
do related to some rational reason already known out and around on the
Web. The fix, including their suggestion to even use jmtpfs, was
probably something that pulled up thanks to whatever errors I was
receiving at the time. :)

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *



Re: handling lists in perl

2018-12-18 Thread mick crane

On 2018-12-19 00:43, deloptes wrote:

deloptes wrote:


if ( @array =~ /$hash[$key]/) {
print "key $key with value " . $hash{$key} .
" is in the array of values\n";
}


I checked and it seems the right answer is

my %hash = ( 1=>8,2=>20,6=>100,15=>100 );
my @array = (1, 21, 100, 8, 15, 22, 6, 12, 56);

foreach my $key (keys %hash) {
for (  @array ) {
if ($_ eq $hash{$key} ) {
print "key $key with value " . $hash{$key} .
" is in the array of values\n";
}
}
}



much appreciated, cheers.

mick

--
Key ID4BFEBB31



Re: handling lists in perl

2018-12-18 Thread mick crane

On 2018-12-19 00:43, deloptes wrote:

deloptes wrote:


if ( @array =~ /$hash[$key]/) {
print "key $key with value " . $hash{$key} .
" is in the array of values\n";
}


I checked and it seems the right answer is

my %hash = ( 1=>8,2=>20,6=>100,15=>100 );
my @array = (1, 21, 100, 8, 15, 22, 6, 12, 56);

foreach my $key (keys %hash) {
for (  @array ) {
if ($_ eq $hash{$key} ) {
print "key $key with value " . $hash{$key} .
" is in the array of values\n";
}
}
}


except there is only one 100 in @array it gets me along.
thanks and David too.

mick

--
Key ID4BFEBB31



Re: handling lists in perl

2018-12-18 Thread deloptes
mick crane wrote:

> except there is only one 100 in @array it gets me along.
> thanks and David too.

but this one 100 satisfies both 6 and 15 so 6 and 15 match.

regards



Re: Debian 8.10 PowerPC issues with eMac G4 retail model

2018-12-18 Thread didier gaumet
Le 18/12/2018 à 23:17, Alex McKeever a écrit :
> I remember having no luck with getting a display on Debian 8.10 on my
> eMac G4... had to go back to 7.11 to get a working system if I remember
> right. Anyhow I am wondering why 8.10 doesn’t work like it should? It’s
> technically the last official PowerPC 32 release...

I do not remember: is it between Debian 7 and Debian 8 that firmware
inclusion in distros in general and in Debian in particular changed?
In the past some firmwares (non-free stuff) were installed with (or part
of) the linux kernel package and that changed with the next Debian release.

So there a possibility that Debian 8.10 works as it should and you have
to install firmware(s) required by your hardware:
 https://wiki.debian.org/Firmware