When needed to install a new system, after DVD installation, I fed the new system with what I need by the mean of some script by calling zypper with internet repositories or calling zypper with my local repos.
Of course my local repos is first filled by copying files from /source/MAIN/*
And then the local repos is refresh.
Return code for all operations are tested for success or error ( as far I have not forgot some tests or made errors )
Is somebody able to explain how this is possible : the same file ( same name ) exist in 2 version in the same directory, one with a length of 0 and one with the real size.
linux:/source/MAIN/Oracle_VirtualBox # ls -al
total 75708
drwxr-xr-x 2 root root 4096 May 18 23:33 .
drwxr-xr-x 17 root root 4096 May 2 12:16 ..
-rw-r--r-- 1 root root 11623302 May 18 13:48 Oracle_VM_VirtualBox_Extension_Pack-4.2.12-84980.vbox-extpack
-rw-r--r-- 1 root root 0 May 18 23:33 VirtualBox-4.2-4.2.12-84980_openSUSE114-1.x86_64.rpm
-rw-r--r-- 1 root root 65888952 May 18 13:47 VirtualBox-4.2-4.2.12_84980_openSUSE114-1.x86_64.rpm
linux:/source/MAIN/Oracle_VirtualBox #
Of course after copying the file from source to local repos, it is the zero length file which is copied. And then zypper ref local_repo give an error.
What matters to me is how 2 files with same names and different size can appear in a directory ? This was running for months until these days and it took a long time to me to really see that i have 2 files with the same name.
They don’t have the same name. The zero length file is named VirtualBox-4.2-4.2.12-84980…, the other one VirtualBox-4.2-4.2.12_84980… ( - vs _ )
I think wget creates a zero length file if it can’t find the source. So you just may have a typo in your script.
So I am guessing how you are using wget, but I use it as following:
wget -nc URL -O /folder/filename
where -nc means no clobber, do not over write file if it exists, URL is the online address, -O means to write file and /folder/filename is the target file and folder location. In a script, you can substitute variables for parts of the URL or filename, but the usage of ${ORA_VB_VERSION} seems curious.
By The Way, I have notice that zypper refuse to refresh a local repo if any file have a zero length ( and this was my case )
This behaviour was the reason of my post. But I did not notice that the file have zero length and a bad name.