0

Our company adopt Perforce to realize code control. So we have to download all packages needed from P4 server. The major Linux distributions we use are RedHat and Ubuntu. Now we need a dependency tool to control the dependency between all the packages. Of course, this tool should support both RedHat and Ubuntu.

Question one:

Is there any suggestion on the issue described above?


As far as I know, APT is a good tool which provides the similar function we need. Now, both RedHat and Ubuntu can adopt it.

Question two:

Is it possible to reuse the existing APT tool to achieve my target without modifying the source code of APT?


In order to get those .deb package from repository, APT knows how to deal with archives of types http, ftp, file (local files) and ssh which are contained in the /etc/apt/sources.list file, that I know of. If the answer to question two is "NO", I think I have to modify the source code of APT.

Now, I want to add another archive type such as "p4" besides current http, ftp, file and ssh, and then edit my own code refer to that of the current type.

Question three:

Is this idea feasible? Or is there any better suggestion? Is there any references and resource I can get besides the source code of APT if I want know more about APT source?

Thanks for your answer.

1 Answers1

2

I'm a bit unclear on what you are trying to manage the dependencies of. Are these software packages intended to be installed on the the various Ubuntu and Red Hat systems intermingled with the standard OS package set, or are they a self-contained set?

If you're installing along with the OS packages, you're really going to need to bite the bullet and make proper RPMs for Red Hat and deb packages for Ubuntu. You can do things with alien or somesuch, but that's really the path of madness.

If, on the other hand, this is a self-contained set of software, apt really isn't the right tool for that. It's just going to be a mess.

So for question two: you could extend apt to have code for getting files from "p4". But that seems like a lot of work for questionable reward. Why not just check out the files to an intermediate location and distribute them in the usual way?

And finally, question three: from what I know so far, no, I don't think it's a great approach. But I'm unclear on what you're doing exactly.

mattdm
  • 6,600
  • 1
  • 26
  • 48