LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-02-2011, 04:22 PM   #1
kopatops
Member
 
Registered: Mar 2010
Distribution: Arch Linux
Posts: 45
Blog Entries: 1

Rep: Reputation: 16
Curious: How (the #) are filename conflicts avoided in a linux environment?


This might be a question for developers and distribution-specific package maintainers respectively. Since google wasn't my friend today, I'll humbly ask here:

1.
I've never ever encountered a "file already exists in filesystem" error when installing a new package (for the Arch Linux dist) - unless a previous version of the package was somehow forgotten by my package manager (pacman). Have I just been lucky, or do package maintainers keep a list of each and every path occupied by files of previous packages? Neither?

2.
What needs to be considered by the developer of a piece of software when it comes to something as trivial as names of files produced by the source? Names of binaries, for example, don't seem to be entirely random, but descriptive of what the binary/library does in runtime. If I wanted to name my new amazing piece of software (which is not GNU echo) 'echo', what would primarily make me decide otherwise?

Is there any "centralization" with regards to what names cannot (should not) be used in a given situation?

If this question hasn't made it clear - I am not experienced in software development, so this might be a stupid question, but for some reason it has bothered me for a while. I'd appreciate it if you'd share some knowledge about the matter.

Last edited by kopatops; 08-02-2011 at 04:45 PM.
 
Old 08-02-2011, 04:49 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
1 - 2 : The word / file name, say 'echo' can be used in a different spelling,
to avoid conflicts. Google translate will show 'echo' in other languages.

Echo examples : ekko eco exo kaiku.


Conflicts are not always considered. Linus developed git :
Git version control / revision control software.
And there already was a tool by that name : GIT, Gnu Interactive Tool.
( Debian then used the name git-core for the new git.)

P.S. : A lot of software names are Copyright protected.
So it is necessary to do some investigation before using a name.

..

Last edited by knudfl; 08-02-2011 at 04:57 PM.
 
1 members found this post helpful.
Old 08-02-2011, 05:12 PM   #3
kopatops
Member
 
Registered: Mar 2010
Distribution: Arch Linux
Posts: 45

Original Poster
Blog Entries: 1

Rep: Reputation: 16
So basically, if I do a 'make install' of a program, and 3 of the files built have the same name as others already in the filesystem, it's up to me to make modifications in the source?

And package maintainers (such as Debian, which you mention) generally do this for me? (I should probably post in the Arch forum as well)

It's fascinating to me how this isn't more of a problem than it seems...

Thanks for answering.

Last edited by kopatops; 08-02-2011 at 05:29 PM.
 
Old 08-02-2011, 05:23 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
I don't think there is any coordination of file names.
Everybody can develop, what they want.
But it's best to avoid reusing a name / file names.

Easy to search with Google : <name> rpm
Or Google : <name> software.

And the Debian file search : Search → Package contents
http://packages.debian.org/search?se...&keywords=echo

..
 
Old 08-02-2011, 05:33 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by kopatops View Post
It's fascinating to me how this isn't more of a problem than it seems...
It's hardly a problem at all if no one uses the same name for two pieces of software. If there's already and "echo" command, you don't name your program "echo" (or if you really want to call it "echo", use a name other than "echo" for the binary file itself).
 
Old 08-02-2011, 06:06 PM   #6
kopatops
Member
 
Registered: Mar 2010
Distribution: Arch Linux
Posts: 45

Original Poster
Blog Entries: 1

Rep: Reputation: 16
Quote:
Originally Posted by MTK358 View Post
It's hardly a problem at all if no one uses the same name for two pieces of software. If there's already and "echo" command, you don't name your program "echo" (or if you really want to call it "echo", use a name other than "echo" for the binary file itself).
This is exactly my point; The names of files built for a tool called 'cat' may coincide with other files built for a tool called 'dog'. It's not only the binaries either I suppose, but any configuration files required to run. Who knows what 'dog' developers name their files.

I'm still fascinated, be it stupidity or otherwise . I understand that, when any conflict arises, it isn't too tedious for the user to fix.

Last edited by kopatops; 08-02-2011 at 06:10 PM.
 
Old 08-02-2011, 06:48 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
I don't think there's an official list of 'already used' names for stuff generally.

Within a specific project eg the kernel, then the src ctrl sw eg git should stop you creating a 2nd item with the same name.

I think a general soln would be to search in google, or use 'find' across your whole system and/or check in http://linux.die.net/man/
 
Old 08-02-2011, 07:46 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,706
Blog Entries: 4

Rep: Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949Reputation: 3949
Linux and Unix have a few loosely-adopted conventions. One is that "official" stuff goes into places like /usr/bin, and that there is an entire /usr/local subtree that is specifically meant to be "the private play-pen of this computer."

That having been said, yes, files can be unintentionally overwritten, and no, package developers are not perfect. There is no "generally accepted standard 'installer'" on a Unix/Linux system (in general), and even packages can have flaws in their design.

The thing that keeps most things clean, most of the time, is rigorous testing before release.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel26-firmware conflicts with linux-firmware conflicts with nvidia-96xx Bratmon Arch 3 06-26-2010 07:42 PM
LXer: Avoided Costs and Competitive Benefits: Estimating the Value of Linux LXer Syndicated Linux News 0 10-23-2008 07:51 AM
input avoided in my c program. nflenz Programming 6 12-12-2006 01:47 PM
how to use environment variable as part of filename beeblequix Linux - Newbie 3 07-11-2006 04:55 PM
curious environment DazeiHead *BSD 13 08-16-2003 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration