Results 1 to 7 of 7

Thread: opensuse 12.3 - duplicate name in directory

  1. #1
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,037

    Default opensuse 12.3 - duplicate name in directory

    Hello.

    First of all, my question is why this happens, and not why I do this that way.

    I copy from internet some files that I keep in a directory.
    Here an example :
    Code:
    wget -o /source/MAIN/Oracle_VirtualBox  http://download.virtualbox.org/virtualbox/${ORA_VB_VERSION}
    .

    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.
    Code:
    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.

    Help is welcome.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  2. #2

    Default Re: opensuse 12.3 - duplicate name in directory

    Quote Originally Posted by jcdole View Post
    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.
    Code:
    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.

  3. #3
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: opensuse 12.3 - duplicate name in directory

    So I am guessing how you are using wget, but I use it as following:

    Code:
    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.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  4. #4
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: opensuse 12.3 - duplicate name in directory

    On 05/20/2013 03:36 AM, jdmcdaniel3 wrote:
    > no clobber, do not over write file if it exists


    which wouldn't help in this case since the same file name does *not*
    exist..

    --
    dd

  5. #5
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,037

    Default Re: opensuse 12.3 - duplicate name in directory

    Quote Originally Posted by wolfi323 View Post
    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 _ ).
    It is a pity I did not see that.

    Quote Originally Posted by jdmcdaniel3 View Post
    So I am guessing how you are using wget, but I use it as following:
    Code:
    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.
    Thank You,
    Noted

    Quote Originally Posted by DenverD View Post
    On 05/20/2013 03:36 AM, jdmcdaniel3 wrote:
    > no clobber, do not over write file if it exists
    which wouldn't help in this case since the same file name does *not* exist..
    --
    dd
    Yes .

    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.

    Sorry for the inconvenience

    Thank you every body for helping.
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

  6. #6
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: opensuse 12.3 - duplicate name in directory

    Since you mentioned Zypper a few times here, have a look at my latest bash script on that subject you can find here: Z.A.P.I.T. - Zypper Automation Package Information Tool - Version 1.0.0 - Blogs - openSUSE Forums

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  7. #7
    Join Date
    Jun 2008
    Location
    South-West France
    Posts
    1,037

    Default Re: opensuse 12.3 - duplicate name in directory

    Quote Originally Posted by jdmcdaniel3 View Post
    Since you mentioned Zypper a few times here, have a look at my latest bash script on that subject you can find here: Z.A.P.I.T. - Zypper Automation Package Information Tool - Version 1.0.0 - Blogs - openSUSE Forums

    Thank You,
    Thank you for this info
    Thanks for helping. JCD
    __________
    server leap 15.0 -- ASUS g75vw KDE leap 15.0 -- ASUS g750JZ Optimus KDE leap 15.1 -- acer aspire s13 win 10 home -- HP Omen win 10 home - scan EPSON V500 - Brother HL2250DN - Samsung CLP-325W

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •